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', 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