##// 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 20 changegroup,
21 21 error,
22 22 exchange,
23 localrepo,
23 24 narrowspec,
24 25 repair,
25 26 repository,
@@ -179,14 +180,13 b' def _handlechangespec(op, inpart):'
179 180
180 181 if clkills:
181 182 # preserve bookmarks that repair.strip() would otherwise strip
182 bmstore = repo._bookmarks
183 op._bookmarksbackup = repo._bookmarks
183 184 class dummybmstore(dict):
184 185 def applychanges(self, repo, tr, changes):
185 186 pass
186 repo._bookmarks = dummybmstore()
187 localrepo.localrepository._bookmarks.set(repo, dummybmstore())
187 188 chgrpfile = repair.strip(op.ui, repo, list(clkills), backup=True,
188 189 topic='widen')
189 repo._bookmarks = bmstore
190 190 if chgrpfile:
191 191 op._widen_uninterr = repo.ui.uninterruptable()
192 192 op._widen_uninterr.__enter__()
@@ -270,5 +270,10 b' def setup():'
270 270 origcghandler(op, inpart)
271 271 if util.safehasattr(op, '_widen_bundle'):
272 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 278 wrappedcghandler.params = origcghandler.params
274 279 bundle2.parthandlermapping['changegroup'] = wrappedcghandler
General Comments 0
You need to be logged in to leave comments. Login now