author | Patrick Mezard <patrick@mezard.eu> |
Thu, 21 Jun 2012 19:24:19 +0200 | |
changeset 297 | 590ac023c536 |
parent 273 | 87e4d1eec5e8 |
child 302 | d68ccae92d52 |
permissions | -rw-r--r-- |
263
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
1 |
$ cat >> $HGRCPATH <<EOF |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
2 |
> [defaults] |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
3 |
> amend=-d "0 0" |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
4 |
> [extensions] |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
5 |
> hgext.rebase= |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
6 |
> hgext.graphlog= |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
7 |
> EOF |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
8 |
$ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
9 |
$ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
10 |
|
265
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
11 |
$ glog() { |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
12 |
> hg glog --template '{rev}@{branch}({phase}) {desc|firstline}\n' "$@" |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
13 |
> } |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
14 |
|
263
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
15 |
$ hg init repo |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
16 |
$ cd repo |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
17 |
$ echo a > a |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
18 |
$ hg ci -Am adda |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
19 |
adding a |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
20 |
|
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
21 |
Test amend captures branches |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
22 |
|
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
23 |
$ hg branch foo |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
24 |
marked working directory as branch foo |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
25 |
(branches are permanent and global, did you want a bookmark?) |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
26 |
$ hg amend |
273
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
27 |
$ hg debugsuccessors |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
28 |
07f494440405 a34b93d251e4 |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
29 |
07f494440405 bd19cbe78fbf |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
30 |
bd19cbe78fbf a34b93d251e4 |
263
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
31 |
$ hg branch |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
32 |
foo |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
33 |
$ hg branches |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
34 |
foo 2:a34b93d251e4 |
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
35 |
default 0:07f494440405 (inactive) |
265
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
36 |
$ glog |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
37 |
@ 2@foo(draft) adda |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
38 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
39 |
Test no-op |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
40 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
41 |
$ hg amend |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
42 |
abort: no updates found |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
43 |
[255] |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
44 |
$ glog |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
45 |
@ 2@foo(draft) adda |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
46 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
47 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
48 |
Test forcing the message to the same value, no intermediate revision. |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
49 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
50 |
$ hg amend -m 'adda' |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
51 |
abort: no updates found |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
52 |
[255] |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
53 |
$ glog |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
54 |
@ 2@foo(draft) adda |
263
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
55 |
|
de62daaf2054
amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
56 |
|
265
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
57 |
Test collapsing into an existing revision, no intermediate revision. |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
58 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
59 |
$ echo a >> a |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
60 |
$ hg ci -m changea |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
61 |
$ echo a > a |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
62 |
$ hg ci -m reseta |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
63 |
$ hg amend --change 2 |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
64 |
abort: no updates found |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
65 |
[255] |
273
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
66 |
$ hg debugsuccessors |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
67 |
07f494440405 a34b93d251e4 |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
68 |
07f494440405 bd19cbe78fbf |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
69 |
bd19cbe78fbf a34b93d251e4 |
265
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
70 |
$ hg phase 2 |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
71 |
2: draft |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
72 |
$ glog |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
73 |
@ 4@foo(draft) reseta |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
74 |
| |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
75 |
o 3@foo(draft) changea |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
76 |
| |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
77 |
o 2@foo(draft) adda |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
78 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
79 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
80 |
Test collapsing into an existing rev, with an intermediate revision. |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
81 |
|
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
82 |
$ hg branch --force default |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
83 |
marked working directory as branch default |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
84 |
(branches are permanent and global, did you want a bookmark?) |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
85 |
$ hg ci -m resetbranch |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
86 |
created new head |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
87 |
$ hg branch --force foo |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
88 |
marked working directory as branch foo |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
89 |
(branches are permanent and global, did you want a bookmark?) |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
90 |
$ hg amend --change 2 |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
91 |
abort: no updates found |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
92 |
[255] |
273
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
93 |
$ hg debugsuccessors |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
94 |
07f494440405 a34b93d251e4 |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
95 |
07f494440405 bd19cbe78fbf |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
96 |
7384bbcba36f 000000000000 |
87e4d1eec5e8
obsolete: add debugsuccessors command
Patrick Mezard <patrick@mezard.eu>
parents:
265
diff
changeset
|
97 |
bd19cbe78fbf a34b93d251e4 |
265
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
98 |
$ glog |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
99 |
@ 6@foo(secret) amends a34b93d251e49c93d5685ebacad785c73a7e8605 |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
100 |
| |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
101 |
o 5@default(draft) resetbranch |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
102 |
| |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
103 |
o 4@foo(draft) reseta |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
104 |
| |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
105 |
o 3@foo(draft) changea |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
106 |
| |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
107 |
o 2@foo(draft) adda |
24943df310d4
amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents:
263
diff
changeset
|
108 |