equal
deleted
inserted
replaced
406 repo._bookmarks = dummybmstore() |
406 repo._bookmarks = dummybmstore() |
407 chgrpfile = repair.strip(op.ui, repo, list(clkills), backup=True, |
407 chgrpfile = repair.strip(op.ui, repo, list(clkills), backup=True, |
408 topic='widen') |
408 topic='widen') |
409 repo._bookmarks = bmstore |
409 repo._bookmarks = bmstore |
410 if chgrpfile: |
410 if chgrpfile: |
|
411 op._widen_uninterr = repo.ui.uninterruptable() |
|
412 op._widen_uninterr.__enter__() |
411 # presence of _widen_bundle attribute activates widen handler later |
413 # presence of _widen_bundle attribute activates widen handler later |
412 op._widen_bundle = chgrpfile |
414 op._widen_bundle = chgrpfile |
413 # Set the new narrowspec if we're widening. The setnewnarrowpats() method |
415 # Set the new narrowspec if we're widening. The setnewnarrowpats() method |
414 # will currently always be there when using the core+narrowhg server, but |
416 # will currently always be there when using the core+narrowhg server, but |
415 # other servers may include a changespec part even when not widening (e.g. |
417 # other servers may include a changespec part even when not widening (e.g. |
453 if e.errno != errno.ENOENT: |
455 if e.errno != errno.ENOENT: |
454 ui.warn(_('error removing %s: %s\n') % |
456 ui.warn(_('error removing %s: %s\n') % |
455 (undovfs.join(undofile), stringutil.forcebytestr(e))) |
457 (undovfs.join(undofile), stringutil.forcebytestr(e))) |
456 |
458 |
457 # Remove partial backup only if there were no exceptions |
459 # Remove partial backup only if there were no exceptions |
|
460 op._widen_uninterr.__exit__(None, None, None) |
458 vfs.unlink(chgrpfile) |
461 vfs.unlink(chgrpfile) |
459 |
462 |
460 def setup(): |
463 def setup(): |
461 """Enable narrow repo support in bundle2-related extension points.""" |
464 """Enable narrow repo support in bundle2-related extension points.""" |
462 extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow) |
465 extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow) |