martinvonz updated this revision to Diff 1829.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D715?vs=1827&id=1829

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

AFFECTED FILES
  mercurial/changegroup.py
  mercurial/repair.py
  tests/test-rebase-scenario-global.t

CHANGE DETAILS

diff --git a/tests/test-rebase-scenario-global.t 
b/tests/test-rebase-scenario-global.t
--- a/tests/test-rebase-scenario-global.t
+++ b/tests/test-rebase-scenario-global.t
@@ -399,11 +399,10 @@
   $ hg rebase -s 1 -d 2
   rebasing 1:d2ae7f538514 "b"
   saved backup bundle to 
$TESTTMP/issue5678/.hg/strip-backup/d2ae7f538514-2953539b-rebase.hg (glob)
-BROKEN: d36c should remain public
   $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n'
   o  2:c882 draft b
   |
-  @  1:d36c draft c
+  @  1:d36c public c
   |
   o  0:cb9a public a
   
diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -38,7 +38,7 @@
     totalhash = hashlib.sha1(''.join(allhashes)).hexdigest()
     name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix)
 
-    cgversion = changegroup.safeversion(repo)
+    cgversion = changegroup.localversion(repo)
     comp = None
     if cgversion != '01':
         bundletype = "HG20"
diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -872,6 +872,11 @@
         versions.discard('02')
     return versions
 
+def localversion(repo):
+    # Finds the best version to use for bundles that are meant to be used
+    # locally, such as those from strip and shelve, and temporary bundles.
+    return max(supportedoutgoingversions(repo))
+
 def safeversion(repo):
     # Finds the smallest version that it's safe to assume clients of the repo
     # will support. For example, all hg versions that support generaldelta also



To: martinvonz, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to