Mercurial > public > mercurial-scm > hg-stable
diff hgext/mq.py @ 22454:ac31d87608d6 stable
mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
Before this patch, "hg qselect --reapply" is aborted when "--verbose"
is specified, because "mq.appliedname()" returns "INDEX PATCHNAME"
instead of "PATCHNAME" in such case and "mq.push" can't accept the
former as the name of patch.
This patch uses "mq.applied[i].name" instead of "mq.appliedname(i)" as
the name of the patch to be pushed for safety.
Now, there is no code path using "mq.appliedname()", and it should be
removed to prevent developers from using it in the wrong way like this
issue.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 12 Sep 2014 02:29:19 +0900 |
parents | fd0f0b0d316d |
children | c89379d47e95 |
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 @@ -3015,7 +3015,7 @@ ui.write(g, '\n') else: ui.write(_('no active guards\n')) - reapply = opts.get('reapply') and q.applied and q.appliedname(-1) + reapply = opts.get('reapply') and q.applied and q.applied[-1].name popped = False if opts.get('pop') or opts.get('reapply'): for i in xrange(len(q.applied)):