tests/test-mq-qimport-fail-cleanup
author Greg Ward <greg-hg@gerg.ca>
Tue, 20 Jul 2010 14:00:47 -0400
branchstable
changeset 11628 68a30daead3f
parent 11462 1b82a26635d7
permissions -rwxr-xr-x
inotify: make inotifydirstate.status() returns a tuple of lists. This makes it consistent with dirstate.status(), which is important if there are other extensions messing with the output of status(). Those extensions can safely assume that dirstate.status() returns a tuple of lists, because its docstring says it does. But inotifystatus.dirstate() returns a list of lists, which can break those other extensions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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