Show More
@@ -1,17 +1,25 b'' | |||
|
1 | #!/bin/sh | |
|
1 | # http://mercurial.selenic.com/bts/issue1089 | |
|
2 | ||
|
3 | $ hg init | |
|
4 | $ mkdir a | |
|
5 | $ echo a > a/b | |
|
6 | $ hg ci -Am m | |
|
7 | adding a/b | |
|
8 | ||
|
9 | $ hg rm a | |
|
10 | removing a/b | |
|
11 | $ hg ci -m m a | |
|
2 | 12 | |
|
3 | hg init a | |
|
4 | cd a | |
|
5 | mkdir a | |
|
6 | echo a > a/b | |
|
7 | hg ci -Am m | |
|
8 | hg rm a | |
|
9 | hg ci -m m a | |
|
13 | $ mkdir a b | |
|
14 | $ echo a > a/b | |
|
15 | $ hg ci -Am m | |
|
16 | adding a/b | |
|
10 | 17 | |
|
11 | mkdir a b | |
|
12 | echo a > a/b | |
|
13 | hg ci -Am m | |
|
14 | hg rm a | |
|
15 | cd b | |
|
16 | # relative delete | |
|
17 | hg ci -m m ../a | |
|
18 | $ hg rm a | |
|
19 | removing a/b | |
|
20 | $ cd b | |
|
21 | ||
|
22 | Relative delete: | |
|
23 | ||
|
24 | $ hg ci -m m ../a | |
|
25 |
@@ -1,20 +1,53 b'' | |||
|
1 | #!/bin/sh | |
|
2 | rm -rf a | |
|
3 |
hg init |
|
|
4 | cd a | |
|
5 | touch a | |
|
6 | hg ci -Am0 | |
|
7 | hg mv a a1 | |
|
8 | hg ci -m1 | |
|
9 | hg co 0 | |
|
10 | hg mv a a2 | |
|
11 | hg up | |
|
12 | hg ci -m2 | |
|
1 | # http://mercurial.selenic.com/bts/issue1175 | |
|
2 | ||
|
3 | $ hg init | |
|
4 | $ touch a | |
|
5 | $ hg ci -Am0 | |
|
6 | adding a | |
|
7 | ||
|
8 | $ hg mv a a1 | |
|
9 | $ hg ci -m1 | |
|
10 | ||
|
11 | $ hg co 0 | |
|
12 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
13 | ||
|
14 | $ hg mv a a2 | |
|
15 | $ hg up | |
|
16 | warning: detected divergent renames of a to: | |
|
17 | a2 | |
|
18 | a1 | |
|
19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
20 | ||
|
21 | $ hg ci -m2 | |
|
22 | ||
|
23 | $ touch a | |
|
24 | $ hg ci -Am3 | |
|
25 | adding a | |
|
13 | 26 | |
|
14 | touch a | |
|
15 |
hg ci -Am |
|
|
16 | hg mv a b | |
|
17 | hg ci -Am4 a | |
|
18 | hg ci --debug --traceback -Am5 b | |
|
19 | hg verify | |
|
20 | hg export --git tip | |
|
27 | $ hg mv a b | |
|
28 | $ hg ci -Am4 a | |
|
29 | ||
|
30 | $ hg ci --debug --traceback -Am5 b | |
|
31 | b | |
|
32 | b: searching for copy revision for a | |
|
33 | b: copy a:b80de5d138758541c5f05265ad144ab9fa86d1db | |
|
34 | committed changeset 5:89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b | |
|
35 | ||
|
36 | $ hg verify | |
|
37 | checking changesets | |
|
38 | checking manifests | |
|
39 | crosschecking files in changesets and manifests | |
|
40 | checking files | |
|
41 | 4 files, 6 changesets, 4 total revisions | |
|
42 | ||
|
43 | $ hg export --git tip | |
|
44 | # HG changeset patch | |
|
45 | # User test | |
|
46 | # Date 0 0 | |
|
47 | # Node ID 89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b | |
|
48 | # Parent 7fc86ba705e717a721dbc361bf8c9bc05a18ca2f | |
|
49 | 5 | |
|
50 | ||
|
51 | diff --git a/b b/b | |
|
52 | new file mode 100644 | |
|
53 |
@@ -1,25 +1,98 b'' | |||
|
1 | #!/bin/sh | |
|
1 | # http://mercurial.selenic.com/bts/issue1306 | |
|
2 | ||
|
3 | Initialize remote repo with branches: | |
|
4 | ||
|
5 | $ hg init remote | |
|
6 | $ cd remote | |
|
7 | ||
|
8 | $ echo a > a | |
|
9 | $ hg ci -Ama | |
|
10 | adding a | |
|
11 | ||
|
12 | $ hg branch br | |
|
13 | marked working directory as branch br | |
|
14 | $ hg ci -Amb | |
|
15 | ||
|
16 | $ echo c > c | |
|
17 | $ hg ci -Amc | |
|
18 | adding c | |
|
2 | 19 | |
|
3 | echo % initialize remote repo with branches | |
|
4 | hg init remote | |
|
5 | cd remote | |
|
6 | echo a > a | |
|
7 | hg ci -Ama | |
|
8 | hg branch br | |
|
9 | hg ci -Amb | |
|
10 | echo c > c | |
|
11 | hg ci -Amc | |
|
12 | hg log | |
|
20 | $ hg log | |
|
21 | changeset: 2:1630aed6ed2b | |
|
22 | branch: br | |
|
23 | tag: tip | |
|
24 | user: test | |
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
26 | summary: c | |
|
27 | ||
|
28 | changeset: 1:234f53e6c5ff | |
|
29 | branch: br | |
|
30 | user: test | |
|
31 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
32 | summary: b | |
|
33 | ||
|
34 | changeset: 0:cb9a9f314b8b | |
|
35 | user: test | |
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
37 | summary: a | |
|
38 | ||
|
39 | ||
|
40 | $ cd .. | |
|
41 | ||
|
42 | Try cloning -r branch: | |
|
13 | 43 | |
|
14 | cd .. | |
|
15 | echo % try cloning -r branch | |
|
16 | hg clone -rbr remote local1 | |
|
17 | hg -R local1 parents | |
|
44 | $ hg clone -rbr remote local1 | |
|
45 | requesting all changes | |
|
46 | adding changesets | |
|
47 | adding manifests | |
|
48 | adding file changes | |
|
49 | added 3 changesets with 2 changes to 2 files | |
|
50 | updating to branch br | |
|
51 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
52 | ||
|
53 | $ hg -R local1 parents | |
|
54 | changeset: 2:1630aed6ed2b | |
|
55 | branch: br | |
|
56 | tag: tip | |
|
57 | user: test | |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
59 | summary: c | |
|
60 | ||
|
61 | ||
|
62 | Try cloning -rother clone#branch: | |
|
18 | 63 | |
|
19 | echo % try cloning -rother clone#branch | |
|
20 | hg clone -r0 remote#br local2 | |
|
21 | hg -R local2 parents | |
|
64 | $ hg clone -r0 remote#br local2 | |
|
65 | requesting all changes | |
|
66 | adding changesets | |
|
67 | adding manifests | |
|
68 | adding file changes | |
|
69 | added 3 changesets with 2 changes to 2 files | |
|
70 | updating to branch default | |
|
71 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
72 | ||
|
73 | $ hg -R local2 parents | |
|
74 | changeset: 0:cb9a9f314b8b | |
|
75 | user: test | |
|
76 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
77 | summary: a | |
|
78 | ||
|
79 | ||
|
80 | Try cloning -r1 clone#branch: | |
|
22 | 81 | |
|
23 | echo % try cloning -r1 clone#branch | |
|
24 | hg clone -r1 remote#br local3 | |
|
25 | hg -R local3 parents | |
|
82 | $ hg clone -r1 remote#br local3 | |
|
83 | requesting all changes | |
|
84 | adding changesets | |
|
85 | adding manifests | |
|
86 | adding file changes | |
|
87 | added 3 changesets with 2 changes to 2 files | |
|
88 | updating to branch br | |
|
89 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
90 | ||
|
91 | $ hg -R local3 parents | |
|
92 | changeset: 1:234f53e6c5ff | |
|
93 | branch: br | |
|
94 | user: test | |
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
96 | summary: b | |
|
97 | ||
|
98 |
@@ -1,49 +1,58 b'' | |||
|
1 | #!/bin/sh | |
|
2 | 1 | # http://mercurial.selenic.com/bts/issue322 |
|
3 | 2 | |
|
4 |
|
|
|
3 | File replaced with directory: | |
|
5 | 4 | |
|
6 | hg init a | |
|
7 | cd a | |
|
8 | echo a > a | |
|
9 | hg commit -Ama | |
|
10 | rm a | |
|
11 | mkdir a | |
|
12 | echo a > a/a | |
|
5 | $ hg init a | |
|
6 | $ cd a | |
|
7 | $ echo a > a | |
|
8 | $ hg commit -Ama | |
|
9 | adding a | |
|
10 | $ rm a | |
|
11 | $ mkdir a | |
|
12 | $ echo a > a/a | |
|
13 | ||
|
14 | Should fail - would corrupt dirstate: | |
|
13 | 15 | |
|
14 | echo % should fail - would corrupt dirstate | |
|
15 | hg add a/a | |
|
16 | $ hg add a/a | |
|
17 | abort: file 'a' in dirstate clashes with 'a/a' | |
|
16 | 18 | |
|
17 | cd .. | |
|
19 | $ cd .. | |
|
20 | ||
|
21 | Directory replaced with file: | |
|
18 | 22 | |
|
19 | echo % directory replaced with file | |
|
20 | ||
|
21 | hg init c | |
|
22 | cd c | |
|
23 | mkdir a | |
|
24 | echo a > a/a | |
|
25 | hg commit -Ama | |
|
23 | $ hg init c | |
|
24 | $ cd c | |
|
25 | $ mkdir a | |
|
26 | $ echo a > a/a | |
|
27 | $ hg commit -Ama | |
|
28 | adding a/a | |
|
26 | 29 | |
|
27 | rm -r a | |
|
28 | echo a > a | |
|
30 | $ rm -r a | |
|
31 | $ echo a > a | |
|
32 | ||
|
33 | Should fail - would corrupt dirstate: | |
|
29 | 34 | |
|
30 | echo % should fail - would corrupt dirstate | |
|
31 | hg add a | |
|
35 | $ hg add a | |
|
36 | abort: directory 'a' already in dirstate | |
|
32 | 37 | |
|
33 | cd .. | |
|
38 | $ cd .. | |
|
34 | 39 | |
|
35 |
|
|
|
40 | Directory replaced with file: | |
|
36 | 41 | |
|
37 | hg init d | |
|
38 | cd d | |
|
39 | mkdir b | |
|
40 | mkdir b/c | |
|
41 | echo a > b/c/d | |
|
42 | hg commit -Ama | |
|
43 | rm -r b | |
|
44 | echo a > b | |
|
42 | $ hg init d | |
|
43 | $ cd d | |
|
44 | $ mkdir b | |
|
45 | $ mkdir b/c | |
|
46 | $ echo a > b/c/d | |
|
47 | $ hg commit -Ama | |
|
48 | adding b/c/d | |
|
49 | $ rm -r b | |
|
50 | $ echo a > b | |
|
45 | 51 | |
|
46 |
|
|
|
47 | hg add b | |
|
52 | Should fail - would corrupt dirstate: | |
|
48 | 53 | |
|
49 | exit 0 | |
|
54 | $ hg add b | |
|
55 | abort: directory 'b' already in dirstate | |
|
56 | ||
|
57 | $ exit 0 | |
|
58 |
@@ -1,10 +1,12 b'' | |||
|
1 | #!/bin/sh | |
|
2 | 1 | # http://mercurial.selenic.com/bts/issue433 |
|
3 | 2 | |
|
4 |
hg init |
|
|
5 | cd a | |
|
6 | echo a > a | |
|
7 | hg commit -Ama | |
|
3 | $ hg init | |
|
4 | $ echo a > a | |
|
5 | $ hg commit -Ama | |
|
6 | adding a | |
|
8 | 7 | |
|
9 | hg parents -r 0 doesnotexist | |
|
10 | true | |
|
8 | $ hg parents -r 0 doesnotexist | |
|
9 | abort: 'doesnotexist' not found in manifest! | |
|
10 | ||
|
11 | $ true | |
|
12 |
@@ -1,7 +1,6 b'' | |||
|
1 | #!/bin/sh | |
|
1 | # http://mercurial.selenic.com/bts/issue436 | |
|
2 | 2 | |
|
3 |
hg init |
|
|
4 | cd a | |
|
5 | hg -v log -v | |
|
6 | hg -v log -v x | |
|
7 | true | |
|
3 | $ hg init | |
|
4 | $ hg -v log -v | |
|
5 | $ hg -v log -v x | |
|
6 |
@@ -1,4 +1,4 b'' | |||
|
1 | #!/bin/sh | |
|
1 | # http://mercurial.selenic.com/bts/issue522 | |
|
2 | 2 | |
|
3 | 3 | # In the merge below, the file "foo" has the same contents in both |
|
4 | 4 | # parents, but if we look at the file-level history, we'll notice that |
@@ -6,26 +6,51 b'' | |||
|
6 | 6 | # makes sure that we'll use the version from p2 in the manifest of the |
|
7 | 7 | # merge revision. |
|
8 | 8 | |
|
9 |
hg init |
|
|
10 | cd repo | |
|
9 | $ hg init | |
|
10 | ||
|
11 | $ echo foo > foo | |
|
12 | $ hg ci -qAm 'add foo' | |
|
13 | ||
|
14 | $ echo bar >> foo | |
|
15 | $ hg ci -m 'change foo' | |
|
11 | 16 | |
|
12 | echo foo > foo | |
|
13 | hg ci -qAm 'add foo' | |
|
17 | $ hg backout -r tip -m 'backout changed foo' | |
|
18 | reverting foo | |
|
19 | changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e | |
|
14 | 20 | |
|
15 | echo bar >> foo | |
|
16 | hg ci -m 'change foo' | |
|
21 | $ hg up -C 0 | |
|
22 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
17 | 23 | |
|
18 | hg backout -r tip -m 'backout changed foo' | |
|
24 | $ touch bar | |
|
25 | $ hg ci -qAm 'add bar' | |
|
19 | 26 | |
|
20 | hg up -C 0 | |
|
21 | touch bar | |
|
22 | hg ci -qAm 'add bar' | |
|
27 | $ hg merge --debug | |
|
28 | searching for copies back to rev 1 | |
|
29 | unmatched files in local: | |
|
30 | bar | |
|
31 | resolving manifests | |
|
32 | overwrite None partial False | |
|
33 | ancestor bbd179dfa0a7 local 71766447bdbb+ remote 4d9e78aaceee | |
|
34 | foo: remote is newer -> g | |
|
35 | updating: foo 1/1 files (100.00%) | |
|
36 | getting foo | |
|
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
38 | (branch merge, don't forget to commit) | |
|
23 | 39 | |
|
24 | hg merge --debug | |
|
25 | hg debugstate | grep foo | |
|
26 | hg st -A foo | |
|
27 | hg ci -m 'merge' | |
|
40 | $ hg debugstate | grep foo | |
|
41 | n 0 -2 unset foo | |
|
42 | ||
|
43 | $ hg st -A foo | |
|
44 | M foo | |
|
45 | ||
|
46 | $ hg ci -m 'merge' | |
|
28 | 47 | |
|
29 | hg manifest --debug | grep foo | |
|
30 | hg debugindex .hg/store/data/foo.i | |
|
48 | $ hg manifest --debug | grep foo | |
|
49 | c6fc755d7e68f49f880599da29f15add41f42f5a 644 foo | |
|
31 | 50 | |
|
51 | $ hg debugindex .hg/store/data/foo.i | |
|
52 | rev offset length base linkrev nodeid p1 p2 | |
|
53 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 | |
|
54 | 1 5 9 1 1 6f4310b00b9a 2ed2a3912a0b 000000000000 | |
|
55 | 2 14 5 2 2 c6fc755d7e68 6f4310b00b9a 000000000000 | |
|
56 |
@@ -1,24 +1,34 b'' | |||
|
1 | #!/bin/sh | |
|
1 | # http://mercurial.selenic.com/bts/issue612 | |
|
2 | 2 | |
|
3 | mkdir t | |
|
4 | cd t | |
|
3 | $ hg init | |
|
4 | $ mkdir src | |
|
5 | $ echo a > src/a.c | |
|
6 | $ hg ci -Ama | |
|
7 | adding src/a.c | |
|
5 | 8 | |
|
6 | hg init | |
|
7 | mkdir src | |
|
8 | echo a > src/a.c | |
|
9 |
hg ci -Am |
|
|
9 | $ hg mv src source | |
|
10 | moving src/a.c to source/a.c | |
|
11 | ||
|
12 | $ hg ci -Ammove | |
|
13 | ||
|
14 | $ hg co -C 0 | |
|
15 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
10 | 16 | |
|
11 | hg mv src source | |
|
12 | hg ci -Ammove | |
|
17 | $ echo new > src/a.c | |
|
18 | $ echo compiled > src/a.o | |
|
19 | $ hg ci -mupdate | |
|
20 | created new head | |
|
21 | ||
|
22 | $ hg status | |
|
23 | ? src/a.o | |
|
13 | 24 | |
|
14 | hg co -C 0 | |
|
15 | echo new > src/a.c | |
|
16 | echo compiled > src/a.o | |
|
17 | hg ci -mupdate | |
|
25 | $ hg merge | |
|
26 | merging src/a.c and source/a.c to source/a.c | |
|
27 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
28 | (branch merge, don't forget to commit) | |
|
18 | 29 | |
|
19 | hg st | |
|
30 | $ hg status | |
|
31 | M source/a.c | |
|
32 | R src/a.c | |
|
33 | ? source/a.o | |
|
20 | 34 | |
|
21 | hg merge | |
|
22 | ||
|
23 | hg st | |
|
24 |
@@ -1,20 +1,30 b'' | |||
|
1 | #!/bin/sh | |
|
1 | # http://mercurial.selenic.com/bts/issue619 | |
|
2 | ||
|
3 | $ hg init | |
|
4 | $ echo a > a | |
|
5 | $ hg ci -Ama | |
|
6 | adding a | |
|
7 | ||
|
8 | $ echo b > b | |
|
9 | $ hg branch b | |
|
10 | marked working directory as branch b | |
|
11 | $ hg ci -Amb | |
|
12 | adding b | |
|
2 | 13 | |
|
3 | mkdir t | |
|
4 | cd t | |
|
5 | hg init | |
|
6 | echo a > a | |
|
7 | hg ci -Ama | |
|
8 | echo b > b | |
|
9 | hg branch b | |
|
10 | hg ci -Amb | |
|
11 | hg co -C 0 | |
|
14 | $ hg co -C 0 | |
|
15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
16 | ||
|
17 | Fast-forward: | |
|
12 | 18 | |
|
13 | echo fast-forward | |
|
14 | hg merge b | |
|
15 | hg ci -Ammerge | |
|
19 | $ hg merge b | |
|
20 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
21 | (branch merge, don't forget to commit) | |
|
22 | $ hg ci -Ammerge | |
|
16 | 23 | |
|
17 |
|
|
|
18 | hg merge b | |
|
24 | Bogus fast-forward should fail: | |
|
19 | 25 | |
|
20 | echo done | |
|
26 | $ hg merge b | |
|
27 | abort: merging with a working directory ancestor has no effect | |
|
28 | ||
|
29 | $ true | |
|
30 |
@@ -1,94 +1,140 b'' | |||
|
1 | #!/bin/sh | |
|
2 | 1 | # http://mercurial.selenic.com/bts/issue660 |
|
3 | 2 | |
|
3 | $ hg init | |
|
4 | $ echo a > a | |
|
5 | $ mkdir b | |
|
6 | $ echo b > b/b | |
|
7 | $ hg commit -A -m "a is file, b is dir" | |
|
8 | adding a | |
|
9 | adding b/b | |
|
4 | 10 | |
|
5 | hg init a | |
|
6 | cd a | |
|
7 | echo a > a | |
|
8 | mkdir b | |
|
9 | echo b > b/b | |
|
10 | hg commit -A -m "a is file, b is dir" | |
|
11 | File replaced with directory: | |
|
11 | 12 | |
|
12 | echo % file replaced with directory | |
|
13 | $ rm a | |
|
14 | $ mkdir a | |
|
15 | $ echo a > a/a | |
|
16 | ||
|
17 | Should fail - would corrupt dirstate: | |
|
13 | 18 | |
|
14 | rm a | |
|
15 | mkdir a | |
|
16 | echo a > a/a | |
|
19 | $ hg add a/a | |
|
20 | abort: file 'a' in dirstate clashes with 'a/a' | |
|
21 | ||
|
22 | Removing shadow: | |
|
23 | ||
|
24 | $ hg rm --after a | |
|
25 | ||
|
26 | Should succeed - shadow removed: | |
|
17 | 27 | |
|
18 | echo % should fail - would corrupt dirstate | |
|
19 | hg add a/a | |
|
28 | $ hg add a/a | |
|
29 | ||
|
30 | Directory replaced with file: | |
|
20 | 31 | |
|
21 | echo % removing shadow | |
|
22 | hg rm --after a | |
|
32 | $ rm -r b | |
|
33 | $ echo b > b | |
|
34 | ||
|
35 | Should fail - would corrupt dirstate: | |
|
23 | 36 | |
|
24 | echo % should succeed - shadow removed | |
|
25 | hg add a/a | |
|
37 | $ hg add b | |
|
38 | abort: directory 'b' already in dirstate | |
|
26 | 39 | |
|
27 | echo % directory replaced with file | |
|
40 | Removing shadow: | |
|
28 | 41 | |
|
29 | rm -r b | |
|
30 | echo b > b | |
|
42 | $ hg rm --after b/b | |
|
43 | ||
|
44 | Should succeed - shadow removed: | |
|
31 | 45 | |
|
32 | echo % should fail - would corrupt dirstate | |
|
33 | hg add b | |
|
46 | $ hg add b | |
|
47 | ||
|
48 | Look what we got: | |
|
34 | 49 | |
|
35 | echo % removing shadow | |
|
36 | hg rm --after b/b | |
|
50 | $ hg st | |
|
51 | A a/a | |
|
52 | A b | |
|
53 | R a | |
|
54 | R b/b | |
|
37 | 55 | |
|
38 | echo % should succeed - shadow removed | |
|
39 | hg add b | |
|
56 | Revert reintroducing shadow - should fail: | |
|
40 | 57 | |
|
41 | echo % look what we got | |
|
42 | hg st | |
|
58 | $ rm -r a b | |
|
59 | $ hg revert b/b | |
|
60 | abort: file 'b' in dirstate clashes with 'b/b' | |
|
61 | ||
|
62 | Revert all - should succeed: | |
|
43 | 63 | |
|
44 | echo % revert reintroducing shadow - should fail | |
|
45 | rm -r a b | |
|
46 | hg revert b/b | |
|
64 | $ hg revert --all | |
|
65 | undeleting a | |
|
66 | forgetting a/a | |
|
67 | forgetting b | |
|
68 | undeleting b/b | |
|
69 | ||
|
70 | $ hg st | |
|
47 | 71 | |
|
48 | echo % revert all - should succeed | |
|
49 | hg revert --all | |
|
50 | hg st | |
|
72 | addremove: | |
|
51 | 73 | |
|
52 | echo % addremove | |
|
74 | $ rm -r a b | |
|
75 | $ mkdir a | |
|
76 | $ echo a > a/a | |
|
77 | $ echo b > b | |
|
78 | ||
|
79 | $ hg addremove -s 0 | |
|
80 | removing a | |
|
81 | adding a/a | |
|
82 | adding b | |
|
83 | removing b/b | |
|
53 | 84 | |
|
54 | rm -r a b | |
|
55 | mkdir a | |
|
56 | echo a > a/a | |
|
57 | echo b > b | |
|
85 | $ hg st | |
|
86 | A a/a | |
|
87 | A b | |
|
88 | R a | |
|
89 | R b/b | |
|
90 | ||
|
91 | commit: | |
|
58 | 92 | |
|
59 | hg addremove -s 0 | |
|
60 | hg st | |
|
93 | $ hg ci -A -m "a is dir, b is file" | |
|
94 | $ hg st --all | |
|
95 | C a/a | |
|
96 | C b | |
|
61 | 97 | |
|
62 | echo % commit | |
|
63 | hg ci -A -m "a is dir, b is file" | |
|
64 | hg st --all | |
|
98 | Long directory replaced with file: | |
|
65 | 99 | |
|
66 | echo % long directory replaced with file | |
|
100 | $ mkdir d | |
|
101 | $ mkdir d/d | |
|
102 | $ echo d > d/d/d | |
|
103 | $ hg commit -A -m "d is long directory" | |
|
104 | adding d/d/d | |
|
67 | 105 | |
|
68 | mkdir d | |
|
69 | mkdir d/d | |
|
70 | echo d > d/d/d | |
|
71 | hg commit -A -m "d is long directory" | |
|
72 | rm -r d | |
|
73 | echo d > d | |
|
106 | $ rm -r d | |
|
107 | $ echo d > d | |
|
108 | ||
|
109 | Should fail - would corrupt dirstate: | |
|
110 | ||
|
111 | $ hg add d | |
|
112 | abort: directory 'd' already in dirstate | |
|
74 | 113 | |
|
75 | echo % should fail - would corrupt dirstate | |
|
76 | hg add d | |
|
114 | Removing shadow: | |
|
115 | ||
|
116 | $ hg rm --after d/d/d | |
|
77 | 117 | |
|
78 | echo % removing shadow | |
|
79 | hg rm --after d/d/d | |
|
118 | Should succeed - shadow removed: | |
|
119 | ||
|
120 | $ hg add d | |
|
121 | $ hg ci -md | |
|
80 | 122 | |
|
81 | echo % should succeed - shadow removed | |
|
82 | hg add d | |
|
83 | hg ci -md | |
|
123 | Update should work at least with clean working directory: | |
|
84 | 124 | |
|
85 | echo % update should work at least with clean workdir | |
|
125 | $ rm -r a b d | |
|
126 | $ hg up -r 0 | |
|
127 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
86 | 128 | |
|
87 | rm -r a b d | |
|
88 | hg up -r 0 | |
|
89 | hg st --all | |
|
90 | rm -r a b | |
|
91 | hg up -r 1 | |
|
92 | hg st --all | |
|
129 | $ hg st --all | |
|
130 | C a | |
|
131 | C b/b | |
|
93 | 132 | |
|
94 | exit 0 | |
|
133 | $ rm -r a b | |
|
134 | $ hg up -r 1 | |
|
135 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
136 | ||
|
137 | $ hg st --all | |
|
138 | C a/a | |
|
139 | C b | |
|
140 |
@@ -1,4 +1,4 b'' | |||
|
1 | #!/bin/sh | |
|
1 | # http://mercurial.selenic.com/bts/issue672 | |
|
2 | 2 | |
|
3 | 3 | # 0-2-4 |
|
4 | 4 | # \ \ \ |
@@ -6,30 +6,96 b'' | |||
|
6 | 6 | # |
|
7 | 7 | # rename in #1, content change in #4. |
|
8 | 8 | |
|
9 |
hg init |
|
|
10 | cd t | |
|
9 | $ hg init | |
|
10 | ||
|
11 | $ touch 1 | |
|
12 | $ touch 2 | |
|
13 | $ hg commit -Am init # 0 | |
|
14 | adding 1 | |
|
15 | adding 2 | |
|
11 | 16 | |
|
12 | touch 1 | |
|
13 | touch 2 | |
|
14 | hg commit -Am init # 0 | |
|
17 | $ hg rename 1 1a | |
|
18 | $ hg commit -m rename # 1 | |
|
19 | ||
|
20 | $ hg co -C 0 | |
|
21 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
22 | ||
|
23 | $ echo unrelated >> 2 | |
|
24 | $ hg ci -m unrelated1 # 2 | |
|
25 | created new head | |
|
15 | 26 | |
|
16 | hg rename 1 1a | |
|
17 | hg commit -m rename # 1 | |
|
27 | $ hg merge --debug 1 | |
|
28 | searching for copies back to rev 1 | |
|
29 | unmatched files in other: | |
|
30 | 1a | |
|
31 | all copies found (* = to merge, ! = divergent): | |
|
32 | 1a -> 1 | |
|
33 | checking for directory renames | |
|
34 | resolving manifests | |
|
35 | overwrite None partial False | |
|
36 | ancestor 81f4b099af3d local c64f439569a9+ remote c12dcd37c90a | |
|
37 | 1: other deleted -> r | |
|
38 | 1a: remote created -> g | |
|
39 | updating: 1 1/2 files (50.00%) | |
|
40 | removing 1 | |
|
41 | updating: 1a 2/2 files (100.00%) | |
|
42 | getting 1a | |
|
43 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
44 | (branch merge, don't forget to commit) | |
|
18 | 45 | |
|
19 | hg co -C 0 | |
|
20 | echo unrelated >> 2 | |
|
21 | hg ci -m unrelated1 # 2 | |
|
46 | $ hg ci -m merge1 # 3 | |
|
47 | ||
|
48 | $ hg co -C 2 | |
|
49 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
50 | ||
|
51 | $ echo hello >> 1 | |
|
52 | $ hg ci -m unrelated2 # 4 | |
|
53 | created new head | |
|
22 | 54 | |
|
23 | hg merge --debug 1 | |
|
24 | hg ci -m merge1 # 3 | |
|
55 | $ hg co -C 3 | |
|
56 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
25 | 57 | |
|
26 | hg co -C 2 | |
|
27 | echo hello >> 1 | |
|
28 | hg ci -m unrelated2 # 4 | |
|
58 | $ hg merge -y --debug 4 | |
|
59 | searching for copies back to rev 1 | |
|
60 | unmatched files in local: | |
|
61 | 1a | |
|
62 | all copies found (* = to merge, ! = divergent): | |
|
63 | 1a -> 1 * | |
|
64 | checking for directory renames | |
|
65 | resolving manifests | |
|
66 | overwrite None partial False | |
|
67 | ancestor c64f439569a9 local e327dca35ac8+ remote 746e9549ea96 | |
|
68 | 1a: local copied/moved to 1 -> m | |
|
69 | preserving 1a for resolve of 1a | |
|
70 | updating: 1a 1/1 files (100.00%) | |
|
71 | picked tool 'internal:merge' for 1a (binary False symlink False) | |
|
72 | merging 1a and 1 to 1a | |
|
73 | my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d | |
|
74 | premerge successful | |
|
75 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
76 | (branch merge, don't forget to commit) | |
|
29 | 77 | |
|
30 |
hg co -C |
|
|
31 | hg merge -y --debug 4 | |
|
78 | $ hg co -C 4 | |
|
79 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
32 | 80 | |
|
33 | hg co -C 4 | |
|
34 | hg merge -y --debug 3 | |
|
81 | $ hg merge -y --debug 3 | |
|
82 | searching for copies back to rev 1 | |
|
83 | unmatched files in other: | |
|
84 | 1a | |
|
85 | all copies found (* = to merge, ! = divergent): | |
|
86 | 1a -> 1 * | |
|
87 | checking for directory renames | |
|
88 | resolving manifests | |
|
89 | overwrite None partial False | |
|
90 | ancestor c64f439569a9 local 746e9549ea96+ remote e327dca35ac8 | |
|
91 | 1: remote moved to 1a -> m | |
|
92 | preserving 1 for resolve of 1a | |
|
93 | removing 1 | |
|
94 | updating: 1 1/1 files (100.00%) | |
|
95 | picked tool 'internal:merge' for 1a (binary False symlink False) | |
|
96 | merging 1 and 1a to 1a | |
|
97 | my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d | |
|
98 | premerge successful | |
|
99 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
100 | (branch merge, don't forget to commit) | |
|
35 | 101 |
@@ -1,22 +1,38 b'' | |||
|
1 | #!/bin/sh | |
|
1 | # http://mercurial.selenic.com/bts/issue842 | |
|
2 | ||
|
3 | $ hg init | |
|
4 | $ echo foo > a | |
|
5 | $ hg ci -Ama | |
|
6 | adding a | |
|
2 | 7 | |
|
3 | hg init test | |
|
4 | cd test | |
|
5 | echo foo > a | |
|
6 | hg ci -Ama | |
|
8 | $ hg up -r0000 | |
|
9 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
10 | ||
|
11 | $ echo bar > a | |
|
12 | ||
|
13 | Should issue new head warning: | |
|
14 | ||
|
15 | $ hg ci -Amb | |
|
16 | adding a | |
|
17 | created new head | |
|
7 | 18 | |
|
8 | hg up -r0000 | |
|
9 | echo bar > a | |
|
10 | echo % should issue warning | |
|
11 | hg ci -Amb | |
|
19 | $ hg up -r0000 | |
|
20 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
21 | ||
|
22 | $ echo stuffy > a | |
|
23 | ||
|
24 | Should not issue new head warning: | |
|
25 | ||
|
26 | $ hg ci -q -Amc | |
|
12 | 27 | |
|
13 | hg up -r0000 | |
|
14 | echo stuffy > a | |
|
15 | echo % should not issue warning | |
|
16 | hg ci -q -Amc | |
|
28 | $ hg up -r0000 | |
|
29 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
17 | 30 | |
|
18 | hg up -r0000 | |
|
19 | echo crap > a | |
|
20 | hg branch testing | |
|
21 | echo % should not issue warning | |
|
22 | hg ci -q -Amd | |
|
31 | $ echo crap > a | |
|
32 | $ hg branch testing | |
|
33 | marked working directory as branch testing | |
|
34 | ||
|
35 | Should not issue warning: | |
|
36 | ||
|
37 | $ hg ci -q -Amd | |
|
38 |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now