Patchwork [bugfix,2] phases.py analyzeremotephases(): ignore data related to bookmark “@”

login
register
mail settings
Submitter Roland Eggner
Date Dec. 31, 2013, 1:35 a.m.
Message ID <20131231013556.GK23913@mobil.systemanalysen.net>
Download mbox | patch
Permalink /patch/3248/
State Superseded
Headers show

Comments

Roland Eggner - Dec. 31, 2013, 1:35 a.m.
# HG changeset patch
# Parent f893ef0bd673012083be2e7c57e6b76a4d19a777
# User Roland Eggner < odv@systomanalyson.not s/o/e/g >
# Date 1388261728 -3600

phases.py analyzeremotephases(): ignore data related to bookmark “@”

Appears to fix
[bugreport mercurial-2.6.2] "hg pull --debug" aborted: "... /mercurial/phases.py", line 363, in analyzeremotephases node = bin(nhex) TypeError:  Odd-length string
reported at
http://thread.gmane.org/gmane.comp.version-control.mercurial.devel/62060
Bugfix does not cause any mercurial-2.8.1 “make test” errors for me.

Users hit by this bug can not simply “hg pull” from a repository providing this bugfix, probably they need either a trick (perhaps somehow switch off bookmarks support) or another way of bugfix deployment.
Probably an entry in
http://mercurial.selenic.com/wiki/UpgradeNotes
providing a convenient upgrade path would be useful for this users.

Patch

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -362,6 +362,8 @@  def analyzeremotephases(repo, subset, ro
     for nhex, phase in roots.iteritems():
         if nhex == 'publishing': # ignore data related to publish option
             continue
+        if nhex == '@': # ignore data related to bookmark '@'
+            continue
         node = bin(nhex)
         phase = int(phase)
         if phase == 0: