This revision was automatically updated to reflect the committed changes. Closed by commit rHG109a267acc1e: narrow: keep bookmarks temporarily stripped for as long as commits are (authored by martinvonz, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5398?vs=12760&id=12763 REVISION DETAIL https://phab.mercurial-scm.org/D5398 AFFECTED FILES hgext/narrow/narrowbundle2.py CHANGE DETAILS diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -20,6 +20,7 @@ changegroup, error, exchange, + localrepo, narrowspec, repair, repository, @@ -179,14 +180,13 @@ if clkills: # preserve bookmarks that repair.strip() would otherwise strip - bmstore = repo._bookmarks + op._bookmarksbackup = repo._bookmarks class dummybmstore(dict): def applychanges(self, repo, tr, changes): pass - repo._bookmarks = dummybmstore() + localrepo.localrepository._bookmarks.set(repo, dummybmstore()) chgrpfile = repair.strip(op.ui, repo, list(clkills), backup=True, topic='widen') - repo._bookmarks = bmstore if chgrpfile: op._widen_uninterr = repo.ui.uninterruptable() op._widen_uninterr.__enter__() @@ -270,5 +270,10 @@ origcghandler(op, inpart) if util.safehasattr(op, '_widen_bundle'): handlechangegroup_widen(op, inpart) + if util.safehasattr(op, '_bookmarksbackup'): + localrepo.localrepository._bookmarks.set(op.repo, + op._bookmarksbackup) + del op._bookmarksbackup + wrappedcghandler.params = origcghandler.params bundle2.parthandlermapping['changegroup'] = wrappedcghandler To: martinvonz, durin42, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel