changeset 39965:1a4c1a3cc3f5

narrow: pass old includes and excludes to _widen() In future patches we will need to pass them in the widen wireprotocol command which we are building. Differential Revision: https://phab.mercurial-scm.org/D4812
author Pulkit Goyal <pulkit@yandex-team.ru>
date Sun, 30 Sep 2018 18:45:16 +0300
parents 06e75fbf9d6b
children 707c3804e607
files hgext/narrow/narrowcommands.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py	Fri Sep 28 23:53:09 2018 +0300
+++ b/hgext/narrow/narrowcommands.py	Sun Sep 30 18:45:16 2018 +0300
@@ -248,7 +248,8 @@
 
         repo.destroyed()
 
-def _widen(ui, repo, remote, commoninc, newincludes, newexcludes):
+def _widen(ui, repo, remote, commoninc, oldincludes, oldexcludes,
+           newincludes, newexcludes):
     newmatch = narrowspec.match(repo.root, newincludes, newexcludes)
 
     # for now we assume that if a server has ellipses enabled, we will be
@@ -433,6 +434,7 @@
         if widening:
             newincludes = oldincludes | addedincludes
             newexcludes = oldexcludes - removedexcludes
-            _widen(ui, repo, remote, commoninc, newincludes, newexcludes)
+            _widen(ui, repo, remote, commoninc, oldincludes, oldexcludes,
+                    newincludes, newexcludes)
 
     return 0