D5510: narrow: reuse narrowspec.updateworkingcopy() when widening
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Jan 16 09:34:38 UTC 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG092700100f94: narrow: reuse narrowspec.updateworkingcopy() when widening (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5510?vs=13059&id=13247
REVISION DETAIL
https://phab.mercurial-scm.org/D5510
AFFECTED FILES
hgext/narrow/narrowcommands.py
tests/test-narrow-widen-no-ellipsis.t
CHANGE DETAILS
diff --git a/tests/test-narrow-widen-no-ellipsis.t b/tests/test-narrow-widen-no-ellipsis.t
--- a/tests/test-narrow-widen-no-ellipsis.t
+++ b/tests/test-narrow-widen-no-ellipsis.t
@@ -128,7 +128,7 @@
added 0 changesets with 1 changes to 1 files
bundle2-input-part: total payload size * (glob)
bundle2-input-bundle: 0 parts total
- widest/f: add from widened narrow clone -> g
+ widest/f: narrowspec updated -> g
getting widest/f
$ hg tracked
I path:inside
diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -316,20 +316,10 @@
bundle2.processbundle(repo, bundle,
transactiongetter=tgetter)
- repo.setnewnarrowpats()
- narrowspec.copytoworkingcopy(repo)
- actions = merge.emptyactions()
- addgaction = actions['g'].append
-
- mf = repo['.'].manifest().matches(newmatch)
- for f, fn in mf.iteritems():
- if f not in repo.dirstate:
- addgaction((f, (mf.flags(f), False),
- "add from widened narrow clone"))
-
- merge.applyupdates(repo, actions, wctx=repo[None],
- mctx=repo['.'], overwrite=False)
- merge.recordupdates(repo, actions, branchmerge=False)
+ with repo.transaction('widening'):
+ repo.setnewnarrowpats()
+ narrowspec.updateworkingcopy(repo)
+ narrowspec.copytoworkingcopy(repo)
# TODO(rdamazio): Make new matcher format and update description
@command('tracked',
To: martinvonz, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list