D4812: narrow: pass old includes and excludes to _widen()

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Sep 30 16:11:15 UTC 2018


pulkit created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  In future patches we will need to pass them in the widen wireprotocol command
  which we are building.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4812

AFFECTED FILES
  hgext/narrow/narrowcommands.py

CHANGE DETAILS

diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -248,7 +248,8 @@
 
         repo.destroyed()
 
-def _widen(ui, repo, remote, commoninc, newincludes, newexcludes):
+def _widen(ui, repo, remote, commoninc, newincludes, newexcludes,
+           oldincludes, oldexcludes):
     newmatch = narrowspec.match(repo.root, newincludes, newexcludes)
 
     # for now we assume that if a server has ellipses enabled, we will be
@@ -431,6 +432,7 @@
         if widening:
             newincludes = oldincludes | addedincludes
             newexcludes = oldexcludes - removedexcludes
-            _widen(ui, repo, remote, commoninc, newincludes, newexcludes)
+            _widen(ui, repo, remote, commoninc, newincludes, newexcludes,
+                    oldincludes, oldexcludes)
 
     return 0



To: pulkit, durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list