diff hgext/mq.py @ 22455:c89379d47e95 stable

mq: pop correct patches when changing pushable-ness of already applied ones Before this patch, "hg qselect" with --pop/--reapply may pop incorrect patches, because the index in "applied patches" is used to pop patches by "mq.pop()", even though the index in "the series" should be used. For example, when the already applied patch becomes guarded and it follows the already guarded (= not yet applied) one, "hg qselect" is aborted, because it tries to pop to guarded one. This patch uses "mq.applied[i - 1].name" to pop to the patch, of which the index in the "applied ones" is "i - 1".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 12 Sep 2014 02:29:19 +0900
parents ac31d87608d6
children 4bbcee186fc6
line wrap: on
line diff
--- a/hgext/mq.py	Fri Sep 12 02:29:19 2014 +0900
+++ b/hgext/mq.py	Fri Sep 12 02:29:19 2014 +0900
@@ -3026,7 +3026,7 @@
                 if i == 0:
                     q.pop(repo, all=True)
                 else:
-                    q.pop(repo, str(i - 1))
+                    q.pop(repo, q.applied[i - 1].name)
                 break
     if popped:
         try: