mq: pass qbase node instead of mq statusentry in phasedefaults stable
authorAugie Fackler <durin42@gmail.com>
Sat, 21 Jan 2012 21:39:27 -0600
branchstable
changeset 15972 341c58282b25
parent 15971 089ee59a8658
child 15976 d1c74c6151c9
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.
hgext/mq.py
--- a/hgext/mq.py	Sat Jan 21 23:50:58 2012 +0100
+++ b/hgext/mq.py	Sat Jan 21 21:39:27 2012 -0600
@@ -3133,7 +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]]
+        qbase = repo[repo.mq.applied[0].node]
         roots[phases.secret].add(qbase.node())
     return roots