##// END OF EJS Templates
tests: clean up test-rollback.t...
Nicolas Dumazet -
r13185:c6e00dfc default
parent child Browse files
Show More
@@ -1,92 +1,91
1 1
2 2 $ mkdir t
3 3 $ cd t
4 4 $ hg init
5 5 $ echo a > a
6 6 $ hg add a
7 7 $ hg commit -m "test"
8 8 $ hg verify
9 9 checking changesets
10 10 checking manifests
11 11 crosschecking files in changesets and manifests
12 12 checking files
13 13 1 files, 1 changesets, 1 total revisions
14 14 $ hg parents
15 15 changeset: 0:acb14030fe0a
16 16 tag: tip
17 17 user: test
18 18 date: Thu Jan 01 00:00:00 1970 +0000
19 19 summary: test
20 20
21 21 $ hg status
22 22 $ hg rollback
23 23 rolling back to revision -1 (undo commit)
24 24 $ hg verify
25 25 checking changesets
26 26 checking manifests
27 27 crosschecking files in changesets and manifests
28 28 checking files
29 29 0 files, 0 changesets, 0 total revisions
30 30 $ hg parents
31 31 $ hg status
32 32 A a
33 33
34 34 Test issue 902
35 35
36 36 $ hg commit -m "test2"
37 37 $ hg branch test
38 38 marked working directory as branch test
39 39 $ hg rollback
40 40 rolling back to revision -1 (undo commit)
41 41 $ hg branch
42 42 default
43 43
44 44 Test issue 1635 (commit message saved)
45 45 .hg/last-message.txt:
46 46
47 47 $ cat .hg/last-message.txt ; echo
48 48 test2
49 49
50 50 Test rollback of hg before issue 902 was fixed
51 51
52 52 $ hg commit -m "test3"
53 53 $ hg branch test
54 54 marked working directory as branch test
55 55 $ rm .hg/undo.branch
56 56 $ hg rollback
57 57 rolling back to revision -1 (undo commit)
58 58 Named branch could not be reset, current branch still is: test
59 59 $ hg branch
60 60 test
61 61
62 62 rollback by pretxncommit saves commit message (issue 1635)
63 63
64 64 $ echo a >> a
65 65 $ hg --config hooks.pretxncommit=false commit -m"precious commit message"
66 66 transaction abort!
67 67 rollback completed
68 68 abort: pretxncommit hook exited with status * (glob)
69 69 [255]
70 70
71 71 .hg/last-message.txt:
72 72
73 73 $ cat .hg/last-message.txt ; echo
74 74 precious commit message
75 $ echo '% same thing, but run $EDITOR'
76 % same thing, but run $EDITOR
75
76 same thing, but run $EDITOR
77
77 78 $ cat > editor << '__EOF__'
78 79 > #!/bin/sh
79 80 > echo "another precious commit message" > "$1"
80 81 > __EOF__
81 82 $ chmod +x editor
82 83 $ HGEDITOR="'`pwd`'"/editor hg --config hooks.pretxncommit=false commit 2>&1
83 84 transaction abort!
84 85 rollback completed
85 86 note: commit message saved in .hg/last-message.txt
86 87 abort: pretxncommit hook exited with status * (glob)
87 88 [255]
88 89 $ cat .hg/last-message.txt
89 90 another precious commit message
90 91
91 .hg/last-message.txt:
92
General Comments 0
You need to be logged in to leave comments. Login now