Mercurial > hg
comparison tests/test-merge-remove.t @ 12260:0a63e91c519d
tests: unify test-merge-remove
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 12 Sep 2010 12:11:39 +0200 |
parents | tests/test-merge-remove@653ddd1d7cd7 |
children | e4d7cbc94219 |
comparison
equal
deleted
inserted
replaced
12259:7b05cb9ac6d2 | 12260:0a63e91c519d |
---|---|
1 $ hg init | |
2 | |
3 $ echo foo > foo | |
4 $ echo bar > bar | |
5 $ hg ci -qAm 'add foo bar' | |
6 | |
7 $ echo foo2 >> foo | |
8 $ echo bleh > bar | |
9 $ hg ci -m 'change foo bar' | |
10 | |
11 $ hg up -qC 0 | |
12 $ hg mv foo foo1 | |
13 $ echo foo1 > foo1 | |
14 $ hg cat foo >> foo1 | |
15 $ hg ci -m 'mv foo foo1' | |
16 created new head | |
17 | |
18 $ hg merge | |
19 merging foo1 and foo to foo1 | |
20 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
21 (branch merge, don't forget to commit) | |
22 | |
23 $ hg debugstate --nodates | |
24 n 0 -2 bar | |
25 m 644 14 foo1 | |
26 copy: foo -> foo1 | |
27 | |
28 $ hg st -q | |
29 M bar | |
30 M foo1 | |
31 | |
32 | |
33 Removing foo1 and bar: | |
34 | |
35 $ cp foo1 F | |
36 $ cp bar B | |
37 $ hg rm -f foo1 bar | |
38 | |
39 $ hg debugstate --nodates | |
40 r 0 -2 bar | |
41 r 0 -1 foo1 | |
42 copy: foo -> foo1 | |
43 | |
44 $ hg st -qC | |
45 R bar | |
46 R foo1 | |
47 | |
48 | |
49 Re-adding foo1 and bar: | |
50 | |
51 $ cp F foo1 | |
52 $ cp B bar | |
53 $ hg add -v foo1 bar | |
54 adding bar | |
55 adding foo1 | |
56 | |
57 $ hg debugstate --nodates | |
58 n 0 -2 bar | |
59 m 644 14 foo1 | |
60 copy: foo -> foo1 | |
61 | |
62 $ hg st -qC | |
63 M bar | |
64 M foo1 | |
65 foo | |
66 | |
67 | |
68 Reverting foo1 and bar: | |
69 | |
70 $ hg revert -vr . foo1 bar | |
71 saving current version of bar as bar.orig | |
72 reverting bar | |
73 saving current version of foo1 as foo1.orig | |
74 reverting foo1 | |
75 | |
76 $ hg debugstate --nodates | |
77 n 0 -2 bar | |
78 m 644 14 foo1 | |
79 copy: foo -> foo1 | |
80 | |
81 $ hg st -qC | |
82 M bar | |
83 M foo1 | |
84 foo | |
85 | |
86 $ hg diff | |
87 |