repair: make strip() return backup file path
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 31 Oct 2016 15:40:30 -0700
changeset 30274 c1345969f6c5
parent 30273 86f4ef63d507
child 30275 e81d72b4b0ae
repair: make strip() return backup file path narrowhg wants to strip some commits and then re-apply them after applying another bundle. Having repair.strip() return the bundle path will be helpful for it.
mercurial/repair.py
--- a/mercurial/repair.py	Wed Nov 02 18:59:29 2016 +0000
+++ b/mercurial/repair.py	Mon Oct 31 15:40:30 2016 -0700
@@ -244,6 +244,9 @@
             vfs.unlink(tmpbundlefile)
 
     repo.destroyed()
+    # return the backup file path (or None if 'backup' was False) so
+    # extensions can use it
+    return backupfile
 
 def rebuildfncache(ui, repo):
     """Rebuilds the fncache file from repo history.