Mercurial > hg-stable
annotate tests/test-obsolete.t @ 17071:11f26e2669aa
command: creation of obsolete marker
* add metadata encoding/decoding ability
* add a method to obsstore to help creating marker
* add a debug command to create marker
author | Pierre-Yves.David@ens-lyon.org |
---|---|
date | Thu, 07 Jun 2012 19:15:23 +0200 |
parents | |
children | 178a2e85d426 |
rev | line source |
---|---|
17071
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
1 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
2 $ mkcommit() { |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
3 > echo "$1" > "$1" |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
4 > hg add "$1" |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
5 > hg ci -m "add $1" |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
6 > } |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
7 $ getid() { |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
8 > hg id --debug -ir "desc('$1')" |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
9 > } |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
10 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
11 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
12 $ hg init tmpa |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
13 $ cd tmpa |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
14 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
15 Killing a single changeset without replacement |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
16 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
17 $ mkcommit kill_me |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
18 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
19 $ cd .. |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
20 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
21 Killing a single changeset with replacement |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
22 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
23 $ hg init tmpb |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
24 $ cd tmpb |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
25 $ mkcommit a |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
26 $ mkcommit b |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
27 $ mkcommit original_c |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
28 $ hg up "desc('b')" |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
29 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
30 $ mkcommit new_c |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
31 created new head |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
32 $ hg debugobsolete `getid original_c` `getid new_c` -d '56 12' |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
33 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
34 do it again (it read the obsstore before adding new changeset) |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
35 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
36 $ hg up '.^' |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
37 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
38 $ mkcommit new_2_c |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
39 created new head |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
40 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
41 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
42 Register two markers with a missing node |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
43 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
44 $ hg up '.^' |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
45 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
46 $ mkcommit new_3_c |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
47 created new head |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
48 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
11f26e2669aa
command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff
changeset
|
49 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |