# HG changeset patch # User Pulkit Goyal # Date 2018-09-30 15:45:16 # Node ID 1a4c1a3cc3f5b54de7f56753c0ea8b02b4443958 # Parent 06e75fbf9d6b57f030220254d908d84d5a2fb41e 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 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 @@ def _narrow(ui, repo, remote, commoninc, 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 @@ def trackedcmd(ui, repo, remotepath=None 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