##// END OF EJS Templates
narrow: keep bookmarks temporarily stripped for as long as commits are...
Martin von Zweigbergk -
r40903:109a267a default
parent child Browse files
Show More
@@ -20,6 +20,7 b' from mercurial import ('
20 changegroup,
20 changegroup,
21 error,
21 error,
22 exchange,
22 exchange,
23 localrepo,
23 narrowspec,
24 narrowspec,
24 repair,
25 repair,
25 repository,
26 repository,
@@ -179,14 +180,13 b' def _handlechangespec(op, inpart):'
179
180
180 if clkills:
181 if clkills:
181 # preserve bookmarks that repair.strip() would otherwise strip
182 # preserve bookmarks that repair.strip() would otherwise strip
182 bmstore = repo._bookmarks
183 op._bookmarksbackup = repo._bookmarks
183 class dummybmstore(dict):
184 class dummybmstore(dict):
184 def applychanges(self, repo, tr, changes):
185 def applychanges(self, repo, tr, changes):
185 pass
186 pass
186 repo._bookmarks = dummybmstore()
187 localrepo.localrepository._bookmarks.set(repo, dummybmstore())
187 chgrpfile = repair.strip(op.ui, repo, list(clkills), backup=True,
188 chgrpfile = repair.strip(op.ui, repo, list(clkills), backup=True,
188 topic='widen')
189 topic='widen')
189 repo._bookmarks = bmstore
190 if chgrpfile:
190 if chgrpfile:
191 op._widen_uninterr = repo.ui.uninterruptable()
191 op._widen_uninterr = repo.ui.uninterruptable()
192 op._widen_uninterr.__enter__()
192 op._widen_uninterr.__enter__()
@@ -270,5 +270,10 b' def setup():'
270 origcghandler(op, inpart)
270 origcghandler(op, inpart)
271 if util.safehasattr(op, '_widen_bundle'):
271 if util.safehasattr(op, '_widen_bundle'):
272 handlechangegroup_widen(op, inpart)
272 handlechangegroup_widen(op, inpart)
273 if util.safehasattr(op, '_bookmarksbackup'):
274 localrepo.localrepository._bookmarks.set(op.repo,
275 op._bookmarksbackup)
276 del op._bookmarksbackup
277
273 wrappedcghandler.params = origcghandler.params
278 wrappedcghandler.params = origcghandler.params
274 bundle2.parthandlermapping['changegroup'] = wrappedcghandler
279 bundle2.parthandlermapping['changegroup'] = wrappedcghandler
General Comments 0
You need to be logged in to leave comments. Login now