Patchwork D3719: narrowbundle2: when we handle a widen, mark the operation as unsafe

login
register
mail settings
Submitter phabricator
Date July 3, 2018, 5:40 p.m.
Message ID <ca913d862260aa1defe4880c7ffa1fa3@localhost.localdomain>
Download mbox | patch
Permalink /patch/32590/
State Not Applicable
Headers show

Comments

phabricator - July 3, 2018, 5:40 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1ad873c3e4a4: narrowbundle2: when we handle a widen, mark the operation as unsafe (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3719?vs=9329&id=9414

REVISION DETAIL
  https://phab.mercurial-scm.org/D3719

AFFECTED FILES
  hgext/narrow/narrowbundle2.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -408,6 +408,8 @@ 
                                  topic='widen')
         repo._bookmarks = bmstore
         if chgrpfile:
+            op._widen_uninterr = repo.ui.uninterruptable()
+            op._widen_uninterr.__enter__()
             # presence of _widen_bundle attribute activates widen handler later
             op._widen_bundle = chgrpfile
     # Set the new narrowspec if we're widening. The setnewnarrowpats() method
@@ -455,6 +457,7 @@ 
                         (undovfs.join(undofile), stringutil.forcebytestr(e)))
 
     # Remove partial backup only if there were no exceptions
+    op._widen_uninterr.__exit__(None, None, None)
     vfs.unlink(chgrpfile)
 
 def setup():