Show More
@@ -1,108 +1,110 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 |
|
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 | |
2 |
|
2 | |||
3 | $ hg init |
|
3 | $ hg init | |
4 |
|
4 | |||
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -Amadd |
|
6 | $ hg ci -Amadd | |
7 | adding a |
|
7 | adding a | |
8 |
|
8 | |||
9 | $ chmod +x a |
|
9 | $ chmod +x a | |
10 | $ hg ci -mexecutable |
|
10 | $ hg ci -mexecutable | |
11 |
|
11 | |||
12 | $ hg up 0 |
|
12 | $ hg up 0 | |
13 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
14 | $ rm a |
|
14 | $ rm a | |
15 | $ ln -s symlink a |
|
15 | $ ln -s symlink a | |
16 | $ hg ci -msymlink |
|
16 | $ hg ci -msymlink | |
17 | created new head |
|
17 | created new head | |
18 |
|
18 | |||
19 | $ hg merge --debug |
|
19 | $ hg merge --debug | |
20 | searching for copies back to rev 1 |
|
20 | searching for copies back to rev 1 | |
21 | resolving manifests |
|
21 | resolving manifests | |
22 | overwrite: False, partial: False |
|
22 | overwrite: False, partial: False | |
23 | ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c |
|
23 | ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c | |
24 | conflicting flags for a |
|
24 | conflicting flags for a | |
25 | (n)one, e(x)ec or sym(l)ink? n |
|
25 | (n)one, e(x)ec or sym(l)ink? n | |
26 | a: update permissions -> e |
|
26 | a: update permissions -> e | |
27 | updating: a 1/1 files (100.00%) |
|
27 | updating: a 1/1 files (100.00%) | |
28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
29 | (branch merge, don't forget to commit) |
|
29 | (branch merge, don't forget to commit) | |
30 |
|
30 | |||
31 |
|
31 | |||
32 | Symlink is local parent, executable is other: |
|
32 | Symlink is local parent, executable is other: | |
33 |
|
33 | |||
34 | $ if [ -h a ]; then |
|
34 | $ if [ -h a ]; then | |
35 | > echo a is a symlink |
|
35 | > echo a is a symlink | |
36 | > $TESTDIR/readlink.py a |
|
36 | > $TESTDIR/readlink.py a | |
37 | > elif [ -x a ]; then |
|
37 | > elif [ -x a ]; then | |
38 | > echo a is executable |
|
38 | > echo a is executable | |
39 | > else |
|
39 | > else | |
40 | > echo "a has no flags (default for conflicts)" |
|
40 | > echo "a has no flags (default for conflicts)" | |
41 | > fi |
|
41 | > fi | |
42 | a has no flags (default for conflicts) |
|
42 | a has no flags (default for conflicts) | |
43 |
|
43 | |||
44 | $ hg update -C 1 |
|
44 | $ hg update -C 1 | |
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 |
|
46 | |||
47 | $ hg merge --debug |
|
47 | $ hg merge --debug | |
48 | searching for copies back to rev 1 |
|
48 | searching for copies back to rev 1 | |
49 | resolving manifests |
|
49 | resolving manifests | |
50 | overwrite: False, partial: False |
|
50 | overwrite: False, partial: False | |
51 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f |
|
51 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f | |
52 | conflicting flags for a |
|
52 | conflicting flags for a | |
53 | (n)one, e(x)ec or sym(l)ink? n |
|
53 | (n)one, e(x)ec or sym(l)ink? n | |
54 | a: remote is newer -> g |
|
54 | a: remote is newer -> g | |
55 | updating: a 1/1 files (100.00%) |
|
55 | updating: a 1/1 files (100.00%) | |
56 | getting a |
|
56 | getting a | |
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | (branch merge, don't forget to commit) |
|
58 | (branch merge, don't forget to commit) | |
59 |
|
59 | |||
60 |
|
60 | |||
61 | Symlink is other parent, executable is local: |
|
61 | Symlink is other parent, executable is local: | |
62 |
|
62 | |||
63 | $ if [ -h a ]; then |
|
63 | $ if [ -h a ]; then | |
64 | > echo a is a symlink |
|
64 | > echo a is a symlink | |
65 | > $TESTDIR/readlink.py a |
|
65 | > $TESTDIR/readlink.py a | |
66 | > elif [ -x a ]; then |
|
66 | > elif [ -x a ]; then | |
67 | > echo a is executable |
|
67 | > echo a is executable | |
68 | > else |
|
68 | > else | |
69 | > echo "a has no flags (default for conflicts)" |
|
69 | > echo "a has no flags (default for conflicts)" | |
70 | > fi |
|
70 | > fi | |
71 | a has no flags (default for conflicts) |
|
71 | a has no flags (default for conflicts) | |
72 |
|
72 | |||
73 | Update to link without local change should get us a symlink (issue3316): |
|
73 | Update to link without local change should get us a symlink (issue3316): | |
74 |
|
74 | |||
75 | $ hg up -C 0 |
|
75 | $ hg up -C 0 | |
76 | $ hg up |
|
76 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
77 |
$ hg |
|
77 | $ hg up | |
|
78 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
79 | $ hg st | |||
78 |
|
80 | |||
79 | Update to link with local change should cause a merge prompt (issue3200): |
|
81 | Update to link with local change should cause a merge prompt (issue3200): | |
80 |
|
82 | |||
81 | $ hg up -C 0 |
|
83 | $ hg up -C 0 | |
82 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
83 | $ echo data > a |
|
85 | $ echo data > a | |
84 | $ HGMERGE= hg up -y --debug |
|
86 | $ HGMERGE= hg up -y --debug | |
85 | searching for copies back to rev 2 |
|
87 | searching for copies back to rev 2 | |
86 | resolving manifests |
|
88 | resolving manifests | |
87 | overwrite: False, partial: False |
|
89 | overwrite: False, partial: False | |
88 | ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f |
|
90 | ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f | |
89 | a: versions differ -> m |
|
91 | a: versions differ -> m | |
90 | preserving a for resolve of a |
|
92 | preserving a for resolve of a | |
91 | updating: a 1/1 files (100.00%) |
|
93 | updating: a 1/1 files (100.00%) | |
92 | (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re) |
|
94 | (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re) | |
93 | picked tool 'internal:prompt' for a (binary False symlink True) |
|
95 | picked tool 'internal:prompt' for a (binary False symlink True) | |
94 | no tool found to merge a |
|
96 | no tool found to merge a | |
95 | keep (l)ocal or take (o)ther? l |
|
97 | keep (l)ocal or take (o)ther? l | |
96 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
98 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
97 | $ hg diff --git |
|
99 | $ hg diff --git | |
98 | diff --git a/a b/a |
|
100 | diff --git a/a b/a | |
99 | old mode 120000 |
|
101 | old mode 120000 | |
100 | new mode 100644 |
|
102 | new mode 100644 | |
101 | --- a/a |
|
103 | --- a/a | |
102 | +++ b/a |
|
104 | +++ b/a | |
103 | @@ -1,1 +1,1 @@ |
|
105 | @@ -1,1 +1,1 @@ | |
104 | -symlink |
|
106 | -symlink | |
105 | \ No newline at end of file |
|
107 | \ No newline at end of file | |
106 | +data |
|
108 | +data | |
107 |
|
109 | |||
108 |
|
110 |
General Comments 0
You need to be logged in to leave comments.
Login now