[PATCH stable] mq: pass qbase node instead of mq statusentry in phasedefaults

Augie Fackler durin42 at gmail.com
Sun Jan 22 20:49:31 CST 2012


# HG changeset patch
# User Augie Fackler <durin42 at gmail.com>
# Date 1327203567 21600
# Branch stable
# Node ID c3e7de50e07fb750fa3dc4a1bcc17511ce8b2540
# Parent  e35f10a8d795a1a8919f0db02cbe0ccc69d54c5c
mq: pass qbase node instead of mq statusentry in phasedefaults

This was breaking my remotebranches extension in a completely
mystifying way, because repo.lookup was failing to resolve the
statusentry. I'm not sure how this works absent my remotebranches
extension, but doing it this way looks more correct and doesn't break
anything.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -3133,8 +3133,7 @@
 def mqphasedefaults(repo, roots):
     """callback used to set mq changeset as secret when no phase data exists"""
     if repo.mq.applied:
-        qbase = repo[repo.mq.applied[0]]
-        roots[phases.secret].add(qbase.node())
+        roots[phases.secret].add(repo.mq.applied[0].node)
     return roots
 
 def reposetup(ui, repo):


More information about the Mercurial-devel mailing list