D4829: narrow: avoid looking up dirstate again when editing dirstate
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Oct 2 12:46:22 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe29d83d9599d: narrow: avoid looking up dirstate again when editing dirstate (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4829?vs=11539&id=11557
REVISION DETAIL
https://phab.mercurial-scm.org/D4829
AFFECTED FILES
hgext/narrow/narrowdirstate.py
CHANGE DETAILS
diff --git a/hgext/narrow/narrowdirstate.py b/hgext/narrow/narrowdirstate.py
--- a/hgext/narrow/narrowdirstate.py
+++ b/hgext/narrow/narrowdirstate.py
@@ -18,10 +18,9 @@
def _editfunc(fn):
def _wrapper(self, *args):
- dirstate = repo.dirstate
narrowmatch = repo.narrowmatch()
for f in args:
- if f is not None and not narrowmatch(f) and f not in dirstate:
+ if f is not None and not narrowmatch(f) and f not in self:
raise error.Abort(_("cannot track '%s' - it is outside " +
"the narrow clone") % f)
return fn(self, *args)
To: martinvonz, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list