[PATCH stable] mq: don't refer to a random name-captured repo object

Bryan O'Sullivan bos at serpentine.com
Tue Nov 20 13:53:12 CST 2012


# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1353441167 28800
# Node ID 4dc438ddd246abae0708c6ac285f5f8ff315a66a
# Parent  49c85541617baff9fea11ae3af55dee15bde2573
mq: don't refer to a random name-captured repo object

Previously, we used a repo object captured at the time of monkeypatching.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -3436,7 +3436,7 @@ def reposetup(ui, repo):
                             outapplied.pop()
                 # looking for pushed and shared changeset
                 for node in outapplied:
-                    if repo[node].phase() < phases.secret:
+                    if self[node].phase() < phases.secret:
                         raise util.Abort(_('source has mq patches applied'))
                 # no non-secret patches pushed
             super(mqrepo, self).checkpush(force, revs)


More information about the Mercurial-devel mailing list