Mercurial > hg
annotate tests/test-mq-qimport-fail-cleanup @ 12039:18e1e7520b67 stable
alias: make shadowing behavior more consistent (issue2054)
Currently, given an alias like the following:
[alias]
summary = summary --remote
The alias might be executed - or it might not - depending on the order
of the cmdtable dict.
This happens because cmdalias gets assigned back to the cmdtable like so:
cmdtable['summary'] = ...
Yet '^summary|sum' is still in the table, so which one cmdutil.findcmd()
chooses isn't deterministic.
This patch makes cmdalias assign back to '^summary|sum'. It uses the same
cmdtable key lookup that extensions.wrapcommand() does.
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Sat, 21 Aug 2010 22:48:14 -0400 |
parents | 1b82a26635d7 |
children |
rev | line source |
---|---|
11462
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
2 #failed qimport of patches from files should cleanup by recording successfully |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
3 #imported patches in series file. |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
4 |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
5 echo "[extensions]" >> $HGRCPATH |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
6 echo "mq=" >> $HGRCPATH |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
7 |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
8 hg init repo |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
9 cd repo |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
10 |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
11 echo a > a |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
12 hg ci -Am'add a' |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
13 |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
14 cat >b.patch<<EOF |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
15 diff --git a/a b/a |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
16 --- a/a |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
17 +++ b/a |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
18 @@ -1,1 +1,2 @@ |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
19 a |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
20 +b |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
21 EOF |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
22 |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
23 echo |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
24 echo '#empty series' |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
25 hg qseries |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
26 |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
27 echo |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
28 echo '#qimport valid patch followed by invalid patch' |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
29 hg qimport b.patch fakepatch |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
30 |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
31 echo |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
32 echo '#valid patches before fail added to series' |
1b82a26635d7
mq: qimport cleanup on fail (issue2214)
Vishakh H <vsh426@gmail.com>
parents:
diff
changeset
|
33 hg qseries |