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 |
|
13 | $ mkdir a b | |
4 | cd a |
|
14 | $ echo a > a/b | |
5 | mkdir a |
|
15 | $ hg ci -Am m | |
6 | echo a > a/b |
|
16 | adding a/b | |
7 | hg ci -Am m |
|
|||
8 | hg rm a |
|
|||
9 | hg ci -m m a |
|
|||
10 |
|
17 | |||
11 | mkdir a b |
|
18 | $ hg rm a | |
12 | echo a > a/b |
|
19 | removing a/b | |
13 | hg ci -Am m |
|
20 | $ cd b | |
14 | hg rm a |
|
21 | ||
15 | cd b |
|
22 | Relative delete: | |
16 | # relative delete |
|
23 | ||
17 | hg ci -m m ../a |
|
24 | $ hg ci -m m ../a | |
|
25 |
@@ -1,20 +1,53 b'' | |||||
1 | #!/bin/sh |
|
1 | # http://mercurial.selenic.com/bts/issue1175 | |
2 | rm -rf a |
|
2 | ||
3 |
hg init |
|
3 | $ hg init | |
4 | cd a |
|
4 | $ touch a | |
5 | touch a |
|
5 | $ hg ci -Am0 | |
6 | hg ci -Am0 |
|
6 | adding a | |
7 | hg mv a a1 |
|
7 | ||
8 | hg ci -m1 |
|
8 | $ hg mv a a1 | |
9 | hg co 0 |
|
9 | $ hg ci -m1 | |
10 | hg mv a a2 |
|
10 | ||
11 | hg up |
|
11 | $ hg co 0 | |
12 | hg ci -m2 |
|
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 |
|
27 | $ hg mv a b | |
15 |
hg ci -Am |
|
28 | $ hg ci -Am4 a | |
16 | hg mv a b |
|
29 | ||
17 | hg ci -Am4 a |
|
30 | $ hg ci --debug --traceback -Am5 b | |
18 | hg ci --debug --traceback -Am5 b |
|
31 | b | |
19 | hg verify |
|
32 | b: searching for copy revision for a | |
20 | hg export --git tip |
|
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 |
|
20 | $ hg log | |
4 | hg init remote |
|
21 | changeset: 2:1630aed6ed2b | |
5 | cd remote |
|
22 | branch: br | |
6 | echo a > a |
|
23 | tag: tip | |
7 | hg ci -Ama |
|
24 | user: test | |
8 | hg branch br |
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
9 | hg ci -Amb |
|
26 | summary: c | |
10 | echo c > c |
|
27 | ||
11 | hg ci -Amc |
|
28 | changeset: 1:234f53e6c5ff | |
12 | hg log |
|
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 .. |
|
44 | $ hg clone -rbr remote local1 | |
15 | echo % try cloning -r branch |
|
45 | requesting all changes | |
16 | hg clone -rbr remote local1 |
|
46 | adding changesets | |
17 | hg -R local1 parents |
|
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 |
|
64 | $ hg clone -r0 remote#br local2 | |
20 | hg clone -r0 remote#br local2 |
|
65 | requesting all changes | |
21 | hg -R local2 parents |
|
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 |
|
82 | $ hg clone -r1 remote#br local3 | |
24 | hg clone -r1 remote#br local3 |
|
83 | requesting all changes | |
25 | hg -R local3 parents |
|
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 | # http://mercurial.selenic.com/bts/issue322 |
|
1 | # http://mercurial.selenic.com/bts/issue322 | |
3 |
|
2 | |||
4 |
|
|
3 | File replaced with directory: | |
5 |
|
4 | |||
6 | hg init a |
|
5 | $ hg init a | |
7 | cd a |
|
6 | $ cd a | |
8 | echo a > a |
|
7 | $ echo a > a | |
9 | hg commit -Ama |
|
8 | $ hg commit -Ama | |
10 | rm a |
|
9 | adding a | |
11 | mkdir a |
|
10 | $ rm a | |
12 | echo a > a/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 |
|
16 | $ hg add a/a | |
15 | 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 |
|
23 | $ hg init c | |
20 |
|
24 | $ cd c | ||
21 | hg init c |
|
25 | $ mkdir a | |
22 | cd c |
|
26 | $ echo a > a/a | |
23 | mkdir a |
|
27 | $ hg commit -Ama | |
24 | echo a > a/a |
|
28 | adding a/a | |
25 | hg commit -Ama |
|
|||
26 |
|
29 | |||
27 | rm -r a |
|
30 | $ rm -r a | |
28 | echo a > a |
|
31 | $ echo a > a | |
|
32 | ||||
|
33 | Should fail - would corrupt dirstate: | |||
29 |
|
34 | |||
30 | echo % should fail - would corrupt dirstate |
|
35 | $ hg add a | |
31 | 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 |
|
42 | $ hg init d | |
38 | cd d |
|
43 | $ cd d | |
39 | mkdir b |
|
44 | $ mkdir b | |
40 | mkdir b/c |
|
45 | $ mkdir b/c | |
41 | echo a > b/c/d |
|
46 | $ echo a > b/c/d | |
42 | hg commit -Ama |
|
47 | $ hg commit -Ama | |
43 | rm -r b |
|
48 | adding b/c/d | |
44 | echo a > b |
|
49 | $ rm -r b | |
|
50 | $ echo a > b | |||
45 |
|
51 | |||
46 |
|
|
52 | Should fail - would corrupt dirstate: | |
47 | hg add b |
|
|||
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 | # http://mercurial.selenic.com/bts/issue433 |
|
1 | # http://mercurial.selenic.com/bts/issue433 | |
3 |
|
2 | |||
4 |
hg init |
|
3 | $ hg init | |
5 | cd a |
|
4 | $ echo a > a | |
6 | echo a > a |
|
5 | $ hg commit -Ama | |
7 | hg commit -Ama |
|
6 | adding a | |
8 |
|
7 | |||
9 | hg parents -r 0 doesnotexist |
|
8 | $ hg parents -r 0 doesnotexist | |
10 | true |
|
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 |
|
3 | $ hg init | |
4 | cd a |
|
4 | $ hg -v log -v | |
5 | hg -v log -v |
|
5 | $ hg -v log -v x | |
6 | hg -v log -v x |
|
6 | ||
7 | true |
|
@@ -1,4 +1,4 b'' | |||||
1 | #!/bin/sh |
|
1 | # http://mercurial.selenic.com/bts/issue522 | |
2 |
|
2 | |||
3 | # In the merge below, the file "foo" has the same contents in both |
|
3 | # In the merge below, the file "foo" has the same contents in both | |
4 | # parents, but if we look at the file-level history, we'll notice that |
|
4 | # parents, but if we look at the file-level history, we'll notice that | |
@@ -6,26 +6,51 b'' | |||||
6 | # makes sure that we'll use the version from p2 in the manifest of the |
|
6 | # makes sure that we'll use the version from p2 in the manifest of the | |
7 | # merge revision. |
|
7 | # merge revision. | |
8 |
|
8 | |||
9 |
hg init |
|
9 | $ hg init | |
10 | cd repo |
|
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 |
|
17 | $ hg backout -r tip -m 'backout changed foo' | |
13 | hg ci -qAm 'add foo' |
|
18 | reverting foo | |
|
19 | changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e | |||
14 |
|
20 | |||
15 | echo bar >> foo |
|
21 | $ hg up -C 0 | |
16 | hg ci -m 'change foo' |
|
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 |
|
27 | $ hg merge --debug | |
21 | touch bar |
|
28 | searching for copies back to rev 1 | |
22 | hg ci -qAm 'add bar' |
|
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 |
|
40 | $ hg debugstate | grep foo | |
25 | hg debugstate | grep foo |
|
41 | n 0 -2 unset foo | |
26 | hg st -A foo |
|
42 | ||
27 | hg ci -m 'merge' |
|
43 | $ hg st -A foo | |
|
44 | M foo | |||
|
45 | ||||
|
46 | $ hg ci -m 'merge' | |||
28 |
|
47 | |||
29 | hg manifest --debug | grep foo |
|
48 | $ hg manifest --debug | grep foo | |
30 | hg debugindex .hg/store/data/foo.i |
|
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 |
|
3 | $ hg init | |
4 | cd t |
|
4 | $ mkdir src | |
|
5 | $ echo a > src/a.c | |||
|
6 | $ hg ci -Ama | |||
|
7 | adding src/a.c | |||
5 |
|
8 | |||
6 | hg init |
|
9 | $ hg mv src source | |
7 | mkdir src |
|
10 | moving src/a.c to source/a.c | |
8 | echo a > src/a.c |
|
11 | ||
9 |
hg ci -Am |
|
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 |
|
17 | $ echo new > src/a.c | |
12 | hg ci -Ammove |
|
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 |
|
25 | $ hg merge | |
15 | echo new > src/a.c |
|
26 | merging src/a.c and source/a.c to source/a.c | |
16 | echo compiled > src/a.o |
|
27 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
17 | hg ci -mupdate |
|
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 |
|
14 | $ hg co -C 0 | |
4 | cd t |
|
15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
5 | hg init |
|
16 | ||
6 | echo a > a |
|
17 | Fast-forward: | |
7 | hg ci -Ama |
|
|||
8 | echo b > b |
|
|||
9 | hg branch b |
|
|||
10 | hg ci -Amb |
|
|||
11 | hg co -C 0 |
|
|||
12 |
|
18 | |||
13 | echo fast-forward |
|
19 | $ hg merge b | |
14 | hg merge b |
|
20 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
15 | hg ci -Ammerge |
|
21 | (branch merge, don't forget to commit) | |
|
22 | $ hg ci -Ammerge | |||
16 |
|
23 | |||
17 |
|
|
24 | Bogus fast-forward should fail: | |
18 | hg merge b |
|
|||
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 | # http://mercurial.selenic.com/bts/issue660 |
|
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 |
|
11 | File replaced with directory: | |
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 |
|
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 |
|
19 | $ hg add a/a | |
15 | mkdir a |
|
20 | abort: file 'a' in dirstate clashes with 'a/a' | |
16 | echo a > 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 |
|
28 | $ hg add a/a | |
19 | hg add a/a |
|
29 | ||
|
30 | Directory replaced with file: | |||
20 |
|
31 | |||
21 | echo % removing shadow |
|
32 | $ rm -r b | |
22 | hg rm --after a |
|
33 | $ echo b > b | |
|
34 | ||||
|
35 | Should fail - would corrupt dirstate: | |||
23 |
|
36 | |||
24 | echo % should succeed - shadow removed |
|
37 | $ hg add b | |
25 | hg add a/a |
|
38 | abort: directory 'b' already in dirstate | |
26 |
|
39 | |||
27 | echo % directory replaced with file |
|
40 | Removing shadow: | |
28 |
|
41 | |||
29 | rm -r b |
|
42 | $ hg rm --after b/b | |
30 | echo b > b |
|
43 | ||
|
44 | Should succeed - shadow removed: | |||
31 |
|
45 | |||
32 | echo % should fail - would corrupt dirstate |
|
46 | $ hg add b | |
33 | hg add b |
|
47 | ||
|
48 | Look what we got: | |||
34 |
|
49 | |||
35 | echo % removing shadow |
|
50 | $ hg st | |
36 | hg rm --after b/b |
|
51 | A a/a | |
|
52 | A b | |||
|
53 | R a | |||
|
54 | R b/b | |||
37 |
|
55 | |||
38 | echo % should succeed - shadow removed |
|
56 | Revert reintroducing shadow - should fail: | |
39 | hg add b |
|
|||
40 |
|
57 | |||
41 | echo % look what we got |
|
58 | $ rm -r a b | |
42 | hg st |
|
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 |
|
64 | $ hg revert --all | |
45 | rm -r a b |
|
65 | undeleting a | |
46 | hg revert b/b |
|
66 | forgetting a/a | |
|
67 | forgetting b | |||
|
68 | undeleting b/b | |||
|
69 | ||||
|
70 | $ hg st | |||
47 |
|
71 | |||
48 | echo % revert all - should succeed |
|
72 | addremove: | |
49 | hg revert --all |
|
|||
50 | hg st |
|
|||
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 |
|
85 | $ hg st | |
55 | mkdir a |
|
86 | A a/a | |
56 | echo a > a/a |
|
87 | A b | |
57 | echo b > b |
|
88 | R a | |
|
89 | R b/b | |||
|
90 | ||||
|
91 | commit: | |||
58 |
|
92 | |||
59 | hg addremove -s 0 |
|
93 | $ hg ci -A -m "a is dir, b is file" | |
60 | hg st |
|
94 | $ hg st --all | |
|
95 | C a/a | |||
|
96 | C b | |||
61 |
|
97 | |||
62 | echo % commit |
|
98 | Long directory replaced with file: | |
63 | hg ci -A -m "a is dir, b is file" |
|
|||
64 | hg st --all |
|
|||
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 |
|
106 | $ rm -r d | |
69 | mkdir d/d |
|
107 | $ echo d > d | |
70 | echo d > d/d/d |
|
108 | ||
71 | hg commit -A -m "d is long directory" |
|
109 | Should fail - would corrupt dirstate: | |
72 | rm -r d |
|
110 | ||
73 | echo d > d |
|
111 | $ hg add d | |
|
112 | abort: directory 'd' already in dirstate | |||
74 |
|
113 | |||
75 | echo % should fail - would corrupt dirstate |
|
114 | Removing shadow: | |
76 | hg add d |
|
115 | ||
|
116 | $ hg rm --after d/d/d | |||
77 |
|
117 | |||
78 | echo % removing shadow |
|
118 | Should succeed - shadow removed: | |
79 | hg rm --after d/d/d |
|
119 | ||
|
120 | $ hg add d | |||
|
121 | $ hg ci -md | |||
80 |
|
122 | |||
81 | echo % should succeed - shadow removed |
|
123 | Update should work at least with clean working directory: | |
82 | hg add d |
|
|||
83 | hg ci -md |
|
|||
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 |
|
129 | $ hg st --all | |
88 | hg up -r 0 |
|
130 | C a | |
89 | hg st --all |
|
131 | C b/b | |
90 | rm -r a b |
|
|||
91 | hg up -r 1 |
|
|||
92 | hg st --all |
|
|||
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 | # 0-2-4 |
|
3 | # 0-2-4 | |
4 | # \ \ \ |
|
4 | # \ \ \ | |
@@ -6,30 +6,96 b'' | |||||
6 | # |
|
6 | # | |
7 | # rename in #1, content change in #4. |
|
7 | # rename in #1, content change in #4. | |
8 |
|
8 | |||
9 |
hg init |
|
9 | $ hg init | |
10 | cd t |
|
10 | ||
|
11 | $ touch 1 | |||
|
12 | $ touch 2 | |||
|
13 | $ hg commit -Am init # 0 | |||
|
14 | adding 1 | |||
|
15 | adding 2 | |||
11 |
|
16 | |||
12 | touch 1 |
|
17 | $ hg rename 1 1a | |
13 | touch 2 |
|
18 | $ hg commit -m rename # 1 | |
14 | hg commit -Am init # 0 |
|
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 |
|
27 | $ hg merge --debug 1 | |
17 | hg commit -m rename # 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 |
|
46 | $ hg ci -m merge1 # 3 | |
20 | echo unrelated >> 2 |
|
47 | ||
21 | hg ci -m unrelated1 # 2 |
|
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 |
|
55 | $ hg co -C 3 | |
24 | hg ci -m merge1 # 3 |
|
56 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
25 |
|
57 | |||
26 | hg co -C 2 |
|
58 | $ hg merge -y --debug 4 | |
27 | echo hello >> 1 |
|
59 | searching for copies back to rev 1 | |
28 | hg ci -m unrelated2 # 4 |
|
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 |
|
78 | $ hg co -C 4 | |
31 | hg merge -y --debug 4 |
|
79 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
32 |
|
80 | |||
33 | hg co -C 4 |
|
81 | $ hg merge -y --debug 3 | |
34 | 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 |
|
8 | $ hg up -r0000 | |
4 | cd test |
|
9 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
5 | echo foo > a |
|
10 | ||
6 | hg ci -Ama |
|
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 |
|
19 | $ hg up -r0000 | |
9 | echo bar > a |
|
20 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
10 | echo % should issue warning |
|
21 | ||
11 | hg ci -Amb |
|
22 | $ echo stuffy > a | |
|
23 | ||||
|
24 | Should not issue new head warning: | |||
|
25 | ||||
|
26 | $ hg ci -q -Amc | |||
12 |
|
27 | |||
13 | hg up -r0000 |
|
28 | $ hg up -r0000 | |
14 | echo stuffy > a |
|
29 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
15 | echo % should not issue warning |
|
|||
16 | hg ci -q -Amc |
|
|||
17 |
|
30 | |||
18 | hg up -r0000 |
|
31 | $ echo crap > a | |
19 | echo crap > a |
|
32 | $ hg branch testing | |
20 | hg branch testing |
|
33 | marked working directory as branch testing | |
21 | echo % should not issue warning |
|
34 | ||
22 | hg ci -q -Amd |
|
35 | Should not issue warning: | |
|
36 | ||||
|
37 | $ hg ci -q -Amd | |||
|
38 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now