Patchwork D2666: repair: rename _backup to backupbundle

login
register
mail settings
Submitter phabricator
Date March 20, 2018, 7:39 a.m.
Message ID <83c99885b525c4e330ca802152d46b0b@localhost.localdomain>
Download mbox | patch
Permalink /patch/29672/
State Not Applicable
Headers show

Comments

phabricator - March 20, 2018, 7:39 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG17692fefc8f2: repair: rename _backup to backupbundle (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2666?vs=6636&id=7160

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

AFFECTED FILES
  hgext/histedit.py
  mercurial/repair.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -27,7 +27,8 @@ 
     util,
 )
 
-def _bundle(repo, bases, heads, node, suffix, compress=True, obsolescence=True):
+def backupbundle(repo, bases, heads, node, suffix, compress=True,
+                 obsolescence=True):
     """create a bundle with the specified revisions as a backup"""
 
     backupdir = "strip-backup"
@@ -166,7 +167,7 @@ 
     vfs = repo.vfs
     node = nodelist[-1]
     if backup:
-        backupfile = _bundle(repo, stripbases, cl.heads(), node, topic)
+        backupfile = backupbundle(repo, stripbases, cl.heads(), node, topic)
         repo.ui.status(_("saved backup bundle to %s\n") %
                        vfs.join(backupfile))
         repo.ui.log("backupbundle", "saved backup bundle to %s\n",
@@ -179,8 +180,8 @@ 
         # we are trying to strip.  This is harmless since the stripped markers
         # are already backed up and we did not touched the markers for the
         # saved changesets.
-        tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp',
-                                compress=False, obsolescence=False)
+        tmpbundlefile = backupbundle(repo, savebases, saveheads, node, 'temp',
+                                     compress=False, obsolescence=False)
 
     try:
         with repo.transaction("strip") as tr:
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1317,8 +1317,8 @@ 
     # Create a backup so we can always abort completely.
     backupfile = None
     if not obsolete.isenabled(repo, obsolete.createmarkersopt):
-        backupfile = repair._bundle(repo, [parentctxnode], [topmost], root,
-                                    'histedit')
+        backupfile = repair.backupbundle(repo, [parentctxnode],
+                                         [topmost], root, 'histedit')
     state.backupfile = backupfile
 
 def _getsummary(ctx):