Show More
@@ -1,210 +1,210 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink || exit 80 |
|
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/bzr-definitions" |
|
3 | $ . "$TESTDIR/bzr-definitions" | |
4 |
|
4 | |||
5 | create and rename on the same file in the same step |
|
5 | create and rename on the same file in the same step | |
6 |
|
6 | |||
7 | $ mkdir test-createandrename |
|
7 | $ mkdir test-createandrename | |
8 | $ cd test-createandrename |
|
8 | $ cd test-createandrename | |
9 | $ bzr init -q source |
|
9 | $ bzr init -q source | |
10 | $ cd source |
|
10 | $ cd source | |
11 | $ echo a > a |
|
11 | $ echo a > a | |
12 | $ echo c > c |
|
12 | $ echo c > c | |
13 | $ echo e > e |
|
13 | $ echo e > e | |
14 | $ bzr add -q a c e |
|
14 | $ bzr add -q a c e | |
15 | $ bzr commit -q -m 'Initial add: a, c, e' |
|
15 | $ bzr commit -q -m 'Initial add: a, c, e' | |
16 | $ bzr mv a b |
|
16 | $ bzr mv a b | |
17 | a => b |
|
17 | a => b | |
18 | $ bzr mv c d |
|
18 | $ bzr mv c d | |
19 | c => d |
|
19 | c => d | |
20 | $ bzr mv e f |
|
20 | $ bzr mv e f | |
21 | e => f |
|
21 | e => f | |
22 | $ echo a2 >> a |
|
22 | $ echo a2 >> a | |
23 | $ mkdir e |
|
23 | $ mkdir e | |
24 | $ bzr add -q a e |
|
24 | $ bzr add -q a e | |
25 | $ bzr commit -q -m 'rename a into b, create a, rename c into d' |
|
25 | $ bzr commit -q -m 'rename a into b, create a, rename c into d' | |
26 | $ cd .. |
|
26 | $ cd .. | |
27 | $ hg convert source source-hg |
|
27 | $ hg convert source source-hg | |
28 | initializing destination source-hg repository |
|
28 | initializing destination source-hg repository | |
29 | scanning source... |
|
29 | scanning source... | |
30 | sorting... |
|
30 | sorting... | |
31 | converting... |
|
31 | converting... | |
32 | 1 Initial add: a, c, e |
|
32 | 1 Initial add: a, c, e | |
33 | 0 rename a into b, create a, rename c into d |
|
33 | 0 rename a into b, create a, rename c into d | |
34 | $ glog -R source-hg |
|
34 | $ glog -R source-hg | |
35 | o 1 "rename a into b, create a, rename c into d" files: a b c d e f |
|
35 | o 1 "rename a into b, create a, rename c into d" files: a b c d e f | |
36 | | |
|
36 | | | |
37 | o 0 "Initial add: a, c, e" files: a c e |
|
37 | o 0 "Initial add: a, c, e" files: a c e | |
38 |
|
38 | |||
39 |
|
39 | |||
40 | manifest |
|
40 | manifest | |
41 |
|
41 | |||
42 | $ hg manifest -R source-hg -r tip |
|
42 | $ hg manifest -R source-hg -r tip | |
43 | a |
|
43 | a | |
44 | b |
|
44 | b | |
45 | d |
|
45 | d | |
46 | f |
|
46 | f | |
47 |
|
47 | |||
48 | test --rev option |
|
48 | test --rev option | |
49 |
|
49 | |||
50 | $ hg convert -r 1 source source-1-hg |
|
50 | $ hg convert -r 1 source source-1-hg | |
51 | initializing destination source-1-hg repository |
|
51 | initializing destination source-1-hg repository | |
52 | scanning source... |
|
52 | scanning source... | |
53 | sorting... |
|
53 | sorting... | |
54 | converting... |
|
54 | converting... | |
55 | 0 Initial add: a, c, e |
|
55 | 0 Initial add: a, c, e | |
56 | $ glog -R source-1-hg |
|
56 | $ glog -R source-1-hg | |
57 | o 0 "Initial add: a, c, e" files: a c e |
|
57 | o 0 "Initial add: a, c, e" files: a c e | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | test with filemap |
|
60 | test with filemap | |
61 |
|
61 | |||
62 | $ cat > filemap <<EOF |
|
62 | $ cat > filemap <<EOF | |
63 | > exclude a |
|
63 | > exclude a | |
64 | > EOF |
|
64 | > EOF | |
65 | $ hg convert --filemap filemap source source-filemap-hg |
|
65 | $ hg convert --filemap filemap source source-filemap-hg | |
66 | initializing destination source-filemap-hg repository |
|
66 | initializing destination source-filemap-hg repository | |
67 | scanning source... |
|
67 | scanning source... | |
68 | sorting... |
|
68 | sorting... | |
69 | converting... |
|
69 | converting... | |
70 | 1 Initial add: a, c, e |
|
70 | 1 Initial add: a, c, e | |
71 | 0 rename a into b, create a, rename c into d |
|
71 | 0 rename a into b, create a, rename c into d | |
72 | $ hg -R source-filemap-hg manifest -r tip |
|
72 | $ hg -R source-filemap-hg manifest -r tip | |
73 | b |
|
73 | b | |
74 | d |
|
74 | d | |
75 | f |
|
75 | f | |
76 |
|
76 | |||
77 | convert from lightweight checkout |
|
77 | convert from lightweight checkout | |
78 |
|
78 | |||
79 | $ bzr checkout --lightweight source source-light |
|
79 | $ bzr checkout --lightweight source source-light | |
80 | $ hg convert source-light source-light-hg |
|
80 | $ hg convert source-light source-light-hg | |
81 | initializing destination source-light-hg repository |
|
81 | initializing destination source-light-hg repository | |
82 | warning: lightweight checkouts may cause conversion failures, try with a regular branch instead. |
|
82 | warning: lightweight checkouts may cause conversion failures, try with a regular branch instead. | |
83 | scanning source... |
|
83 | scanning source... | |
84 | sorting... |
|
84 | sorting... | |
85 | converting... |
|
85 | converting... | |
86 | 1 Initial add: a, c, e |
|
86 | 1 Initial add: a, c, e | |
87 | 0 rename a into b, create a, rename c into d |
|
87 | 0 rename a into b, create a, rename c into d | |
88 |
|
88 | |||
89 | lightweight manifest |
|
89 | lightweight manifest | |
90 |
|
90 | |||
91 | $ hg manifest -R source-light-hg -r tip |
|
91 | $ hg manifest -R source-light-hg -r tip | |
92 | a |
|
92 | a | |
93 | b |
|
93 | b | |
94 | d |
|
94 | d | |
95 | f |
|
95 | f | |
96 |
|
96 | |||
97 | extract timestamps that look just like hg's {date|isodate}: |
|
97 | extract timestamps that look just like hg's {date|isodate}: | |
98 | yyyy-mm-dd HH:MM zzzz (no seconds!) |
|
98 | yyyy-mm-dd HH:MM zzzz (no seconds!) | |
99 | compare timestamps |
|
99 | compare timestamps | |
100 |
|
100 | |||
101 | $ cd source |
|
101 | $ cd source | |
102 | $ bzr log | \ |
|
102 | $ bzr log | \ | |
103 | > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \ |
|
103 | > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \ | |
104 | > > ../bzr-timestamps |
|
104 | > > ../bzr-timestamps | |
105 | $ cd .. |
|
105 | $ cd .. | |
106 | $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps |
|
106 | $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps | |
107 | $ diff -u bzr-timestamps hg-timestamps |
|
107 | $ diff -u bzr-timestamps hg-timestamps | |
108 | $ cd .. |
|
108 | $ cd .. | |
109 |
|
109 | |||
110 | merge |
|
110 | merge | |
111 |
|
111 | |||
112 | $ mkdir test-merge |
|
112 | $ mkdir test-merge | |
113 | $ cd test-merge |
|
113 | $ cd test-merge | |
114 | $ cat > helper.py <<EOF |
|
114 | $ cat > helper.py <<EOF | |
115 | > import sys |
|
115 | > import sys | |
116 | > from bzrlib import workingtree |
|
116 | > from bzrlib import workingtree | |
117 | > wt = workingtree.WorkingTree.open('.') |
|
117 | > wt = workingtree.WorkingTree.open('.') | |
118 | > |
|
118 | > | |
119 | > message, stamp = sys.argv[1:] |
|
119 | > message, stamp = sys.argv[1:] | |
120 | > wt.commit(message, timestamp=int(stamp)) |
|
120 | > wt.commit(message, timestamp=int(stamp)) | |
121 | > EOF |
|
121 | > EOF | |
122 | $ bzr init -q source |
|
122 | $ bzr init -q source | |
123 | $ cd source |
|
123 | $ cd source | |
124 | $ echo content > a |
|
124 | $ echo content > a | |
125 | $ echo content2 > b |
|
125 | $ echo content2 > b | |
126 | $ bzr add -q a b |
|
126 | $ bzr add -q a b | |
127 | $ bzr commit -q -m 'Initial add' |
|
127 | $ bzr commit -q -m 'Initial add' | |
128 | $ cd .. |
|
128 | $ cd .. | |
129 | $ bzr branch -q source source-improve |
|
129 | $ bzr branch -q source source-improve | |
130 | $ cd source |
|
130 | $ cd source | |
131 | $ echo more >> a |
|
131 | $ echo more >> a | |
132 | $ python ../helper.py 'Editing a' 100 |
|
132 | $ python ../helper.py 'Editing a' 100 | |
133 | $ cd ../source-improve |
|
133 | $ cd ../source-improve | |
134 | $ echo content3 >> b |
|
134 | $ echo content3 >> b | |
135 | $ python ../helper.py 'Editing b' 200 |
|
135 | $ python ../helper.py 'Editing b' 200 | |
136 | $ cd ../source |
|
136 | $ cd ../source | |
137 | $ bzr merge -q ../source-improve |
|
137 | $ bzr merge -q ../source-improve | |
138 | $ bzr commit -q -m 'Merged improve branch' |
|
138 | $ bzr commit -q -m 'Merged improve branch' | |
139 | $ cd .. |
|
139 | $ cd .. | |
140 | $ hg convert --datesort source source-hg |
|
140 | $ hg convert --datesort source source-hg | |
141 | initializing destination source-hg repository |
|
141 | initializing destination source-hg repository | |
142 | scanning source... |
|
142 | scanning source... | |
143 | sorting... |
|
143 | sorting... | |
144 | converting... |
|
144 | converting... | |
145 | 3 Initial add |
|
145 | 3 Initial add | |
146 | 2 Editing a |
|
146 | 2 Editing a | |
147 | 1 Editing b |
|
147 | 1 Editing b | |
148 | 0 Merged improve branch |
|
148 | 0 Merged improve branch | |
149 | $ glog -R source-hg |
|
149 | $ glog -R source-hg | |
150 | o 3 "Merged improve branch" files: |
|
150 | o 3 "Merged improve branch" files: | |
151 | |\ |
|
151 | |\ | |
152 | | o 2 "Editing b" files: b |
|
152 | | o 2 "Editing b" files: b | |
153 | | | |
|
153 | | | | |
154 | o | 1 "Editing a" files: a |
|
154 | o | 1 "Editing a" files: a | |
155 | |/ |
|
155 | |/ | |
156 | o 0 "Initial add" files: a b |
|
156 | o 0 "Initial add" files: a b | |
157 |
|
157 | |||
158 | $ cd .. |
|
158 | $ cd .. | |
159 |
|
159 | |||
160 | symlinks and executable files |
|
160 | symlinks and executable files | |
161 |
|
161 | |||
162 | $ mkdir test-symlinks |
|
162 | $ mkdir test-symlinks | |
163 | $ cd test-symlinks |
|
163 | $ cd test-symlinks | |
164 | $ bzr init -q source |
|
164 | $ bzr init -q source | |
165 | $ cd source |
|
165 | $ cd source | |
166 | $ touch program |
|
166 | $ touch program | |
167 | $ chmod +x program |
|
167 | $ chmod +x program | |
168 | $ ln -s program altname |
|
168 | $ ln -s program altname | |
169 | $ mkdir d |
|
169 | $ mkdir d | |
170 | $ echo a > d/a |
|
170 | $ echo a > d/a | |
171 | $ ln -s a syma |
|
171 | $ ln -s a syma | |
172 | $ bzr add -q altname program syma d/a |
|
172 | $ bzr add -q altname program syma d/a | |
173 | $ bzr commit -q -m 'Initial setup' |
|
173 | $ bzr commit -q -m 'Initial setup' | |
174 | $ touch newprog |
|
174 | $ touch newprog | |
175 | $ chmod +x newprog |
|
175 | $ chmod +x newprog | |
176 | $ rm altname |
|
176 | $ rm altname | |
177 | $ ln -s newprog altname |
|
177 | $ ln -s newprog altname | |
178 | $ chmod -x program |
|
178 | $ chmod -x program | |
179 | $ bzr add -q newprog |
|
179 | $ bzr add -q newprog | |
180 | $ bzr commit -q -m 'Symlink changed, x bits changed' |
|
180 | $ bzr commit -q -m 'Symlink changed, x bits changed' | |
181 | $ cd .. |
|
181 | $ cd .. | |
182 | $ hg convert source source-hg |
|
182 | $ hg convert source source-hg | |
183 | initializing destination source-hg repository |
|
183 | initializing destination source-hg repository | |
184 | scanning source... |
|
184 | scanning source... | |
185 | sorting... |
|
185 | sorting... | |
186 | converting... |
|
186 | converting... | |
187 | 1 Initial setup |
|
187 | 1 Initial setup | |
188 | 0 Symlink changed, x bits changed |
|
188 | 0 Symlink changed, x bits changed | |
189 | $ manifest source-hg 0 |
|
189 | $ manifest source-hg 0 | |
190 | % manifest of 0 |
|
190 | % manifest of 0 | |
191 | 644 @ altname |
|
191 | 644 @ altname | |
192 | 644 d/a |
|
192 | 644 d/a | |
193 | 755 * program |
|
193 | 755 * program | |
194 | 644 @ syma |
|
194 | 644 @ syma | |
195 | $ manifest source-hg tip |
|
195 | $ manifest source-hg tip | |
196 | % manifest of tip |
|
196 | % manifest of tip | |
197 | 644 @ altname |
|
197 | 644 @ altname | |
198 | 644 d/a |
|
198 | 644 d/a | |
199 | 755 * newprog |
|
199 | 755 * newprog | |
200 | 644 program |
|
200 | 644 program | |
201 | 644 @ syma |
|
201 | 644 @ syma | |
202 | $ cd source-hg |
|
202 | $ cd source-hg | |
203 |
|
203 | |||
204 | test the symlinks can be recreated |
|
204 | test the symlinks can be recreated | |
205 |
|
205 | |||
206 | $ hg up |
|
206 | $ hg up | |
207 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
207 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
208 | $ hg cat syma; echo |
|
208 | $ hg cat syma; echo | |
209 | a |
|
209 | a | |
210 |
|
210 |
@@ -1,139 +1,140 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
1 |
|
2 | |||
2 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
3 | > [extensions] |
|
4 | > [extensions] | |
4 | > convert= |
|
5 | > convert= | |
5 | > [convert] |
|
6 | > [convert] | |
6 | > hg.saverev=False |
|
7 | > hg.saverev=False | |
7 | > EOF |
|
8 | > EOF | |
8 | $ hg init orig |
|
9 | $ hg init orig | |
9 | $ cd orig |
|
10 | $ cd orig | |
10 | $ echo foo > foo |
|
11 | $ echo foo > foo | |
11 | $ echo bar > bar |
|
12 | $ echo bar > bar | |
12 | $ hg ci -qAm 'add foo bar' -d '0 0' |
|
13 | $ hg ci -qAm 'add foo bar' -d '0 0' | |
13 | $ echo >> foo |
|
14 | $ echo >> foo | |
14 | $ hg ci -m 'change foo' -d '1 0' |
|
15 | $ hg ci -m 'change foo' -d '1 0' | |
15 | $ hg up -qC 0 |
|
16 | $ hg up -qC 0 | |
16 | $ hg copy --after --force foo bar |
|
17 | $ hg copy --after --force foo bar | |
17 | $ hg copy foo baz |
|
18 | $ hg copy foo baz | |
18 | $ hg ci -m 'make bar and baz copies of foo' -d '2 0' |
|
19 | $ hg ci -m 'make bar and baz copies of foo' -d '2 0' | |
19 | created new head |
|
20 | created new head | |
20 | $ hg bookmark premerge1 |
|
21 | $ hg bookmark premerge1 | |
21 | $ hg merge |
|
22 | $ hg merge | |
22 | merging baz and foo to baz |
|
23 | merging baz and foo to baz | |
23 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
24 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
24 | (branch merge, don't forget to commit) |
|
25 | (branch merge, don't forget to commit) | |
25 | $ hg ci -m 'merge local copy' -d '3 0' |
|
26 | $ hg ci -m 'merge local copy' -d '3 0' | |
26 | $ hg up -C 1 |
|
27 | $ hg up -C 1 | |
27 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
28 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
28 | $ hg bookmark premerge2 |
|
29 | $ hg bookmark premerge2 | |
29 | $ hg merge 2 |
|
30 | $ hg merge 2 | |
30 | merging foo and baz to baz |
|
31 | merging foo and baz to baz | |
31 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
32 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
32 | (branch merge, don't forget to commit) |
|
33 | (branch merge, don't forget to commit) | |
33 | $ hg ci -m 'merge remote copy' -d '4 0' |
|
34 | $ hg ci -m 'merge remote copy' -d '4 0' | |
34 | created new head |
|
35 | created new head | |
35 | $ chmod +x baz |
|
36 | $ chmod +x baz | |
36 | $ hg ci -m 'mark baz executable' -d '5 0' |
|
37 | $ hg ci -m 'mark baz executable' -d '5 0' | |
37 | $ cd .. |
|
38 | $ cd .. | |
38 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
39 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
39 | initializing destination new repository |
|
40 | initializing destination new repository | |
40 | scanning source... |
|
41 | scanning source... | |
41 | sorting... |
|
42 | sorting... | |
42 | converting... |
|
43 | converting... | |
43 | 5 add foo bar |
|
44 | 5 add foo bar | |
44 | 4 change foo |
|
45 | 4 change foo | |
45 | 3 make bar and baz copies of foo |
|
46 | 3 make bar and baz copies of foo | |
46 | 2 merge local copy |
|
47 | 2 merge local copy | |
47 | 1 merge remote copy |
|
48 | 1 merge remote copy | |
48 | 0 mark baz executable |
|
49 | 0 mark baz executable | |
49 | updating bookmarks |
|
50 | updating bookmarks | |
50 | $ cd new |
|
51 | $ cd new | |
51 | $ hg out ../orig |
|
52 | $ hg out ../orig | |
52 | comparing with ../orig |
|
53 | comparing with ../orig | |
53 | searching for changes |
|
54 | searching for changes | |
54 | no changes found |
|
55 | no changes found | |
55 | [1] |
|
56 | [1] | |
56 | $ hg bookmarks |
|
57 | $ hg bookmarks | |
57 | premerge1 3:973ef48a98a4 |
|
58 | premerge1 3:973ef48a98a4 | |
58 | premerge2 5:13d9b87cf8f8 |
|
59 | premerge2 5:13d9b87cf8f8 | |
59 | $ cd .. |
|
60 | $ cd .. | |
60 |
|
61 | |||
61 | check shamap LF and CRLF handling |
|
62 | check shamap LF and CRLF handling | |
62 |
|
63 | |||
63 | $ cat > rewrite.py <<EOF |
|
64 | $ cat > rewrite.py <<EOF | |
64 | > import sys |
|
65 | > import sys | |
65 | > # Interlace LF and CRLF |
|
66 | > # Interlace LF and CRLF | |
66 | > lines = [(l.rstrip() + ((i % 2) and '\n' or '\r\n')) |
|
67 | > lines = [(l.rstrip() + ((i % 2) and '\n' or '\r\n')) | |
67 | > for i, l in enumerate(file(sys.argv[1]))] |
|
68 | > for i, l in enumerate(file(sys.argv[1]))] | |
68 | > file(sys.argv[1], 'wb').write(''.join(lines)) |
|
69 | > file(sys.argv[1], 'wb').write(''.join(lines)) | |
69 | > EOF |
|
70 | > EOF | |
70 | $ python rewrite.py new/.hg/shamap |
|
71 | $ python rewrite.py new/.hg/shamap | |
71 | $ cd orig |
|
72 | $ cd orig | |
72 | $ hg up -qC 1 |
|
73 | $ hg up -qC 1 | |
73 | $ echo foo >> foo |
|
74 | $ echo foo >> foo | |
74 | $ hg ci -qm 'change foo again' |
|
75 | $ hg ci -qm 'change foo again' | |
75 | $ hg up -qC 2 |
|
76 | $ hg up -qC 2 | |
76 | $ echo foo >> foo |
|
77 | $ echo foo >> foo | |
77 | $ hg ci -qm 'change foo again again' |
|
78 | $ hg ci -qm 'change foo again again' | |
78 | $ cd .. |
|
79 | $ cd .. | |
79 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
80 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
80 | scanning source... |
|
81 | scanning source... | |
81 | sorting... |
|
82 | sorting... | |
82 | converting... |
|
83 | converting... | |
83 | 1 change foo again again |
|
84 | 1 change foo again again | |
84 | 0 change foo again |
|
85 | 0 change foo again | |
85 | updating bookmarks |
|
86 | updating bookmarks | |
86 |
|
87 | |||
87 | init broken repository |
|
88 | init broken repository | |
88 |
|
89 | |||
89 | $ hg init broken |
|
90 | $ hg init broken | |
90 | $ cd broken |
|
91 | $ cd broken | |
91 | $ echo a >> a |
|
92 | $ echo a >> a | |
92 | $ echo b >> b |
|
93 | $ echo b >> b | |
93 | $ hg ci -qAm init |
|
94 | $ hg ci -qAm init | |
94 | $ echo a >> a |
|
95 | $ echo a >> a | |
95 | $ echo b >> b |
|
96 | $ echo b >> b | |
96 | $ hg copy b c |
|
97 | $ hg copy b c | |
97 | $ hg ci -qAm changeall |
|
98 | $ hg ci -qAm changeall | |
98 | $ hg up -qC 0 |
|
99 | $ hg up -qC 0 | |
99 | $ echo bc >> b |
|
100 | $ echo bc >> b | |
100 | $ hg ci -m changebagain |
|
101 | $ hg ci -m changebagain | |
101 | created new head |
|
102 | created new head | |
102 | $ HGMERGE=internal:local hg -q merge |
|
103 | $ HGMERGE=internal:local hg -q merge | |
103 | $ hg ci -m merge |
|
104 | $ hg ci -m merge | |
104 | $ hg mv b d |
|
105 | $ hg mv b d | |
105 | $ hg ci -m moveb |
|
106 | $ hg ci -m moveb | |
106 |
|
107 | |||
107 | break it |
|
108 | break it | |
108 |
|
109 | |||
109 | $ rm .hg/store/data/b.* |
|
110 | $ rm .hg/store/data/b.* | |
110 | $ cd .. |
|
111 | $ cd .. | |
111 | $ hg --config convert.hg.ignoreerrors=True convert broken fixed |
|
112 | $ hg --config convert.hg.ignoreerrors=True convert broken fixed | |
112 | initializing destination fixed repository |
|
113 | initializing destination fixed repository | |
113 | scanning source... |
|
114 | scanning source... | |
114 | sorting... |
|
115 | sorting... | |
115 | converting... |
|
116 | converting... | |
116 | 4 init |
|
117 | 4 init | |
117 | ignoring: data/b.i@1e88685f5dde: no match found |
|
118 | ignoring: data/b.i@1e88685f5dde: no match found | |
118 | 3 changeall |
|
119 | 3 changeall | |
119 | 2 changebagain |
|
120 | 2 changebagain | |
120 | 1 merge |
|
121 | 1 merge | |
121 | 0 moveb |
|
122 | 0 moveb | |
122 | $ hg -R fixed verify |
|
123 | $ hg -R fixed verify | |
123 | checking changesets |
|
124 | checking changesets | |
124 | checking manifests |
|
125 | checking manifests | |
125 | crosschecking files in changesets and manifests |
|
126 | crosschecking files in changesets and manifests | |
126 | checking files |
|
127 | checking files | |
127 | 3 files, 5 changesets, 5 total revisions |
|
128 | 3 files, 5 changesets, 5 total revisions | |
128 |
|
129 | |||
129 | manifest -r 0 |
|
130 | manifest -r 0 | |
130 |
|
131 | |||
131 | $ hg -R fixed manifest -r 0 |
|
132 | $ hg -R fixed manifest -r 0 | |
132 | a |
|
133 | a | |
133 |
|
134 | |||
134 | manifest -r tip |
|
135 | manifest -r tip | |
135 |
|
136 | |||
136 | $ hg -R fixed manifest -r tip |
|
137 | $ hg -R fixed manifest -r tip | |
137 | a |
|
138 | a | |
138 | c |
|
139 | c | |
139 | d |
|
140 | d |
@@ -1,548 +1,548 b'' | |||||
1 | $ "$TESTDIR/hghave" svn13 no-outer-repo symlink || exit 80 |
|
1 | $ "$TESTDIR/hghave" svn13 no-outer-repo symlink execbit || exit 80 | |
2 |
|
2 | |||
3 | $ fixpath() |
|
3 | $ fixpath() | |
4 | > { |
|
4 | > { | |
5 | > tr '\\' / |
|
5 | > tr '\\' / | |
6 | > } |
|
6 | > } | |
7 | $ svnupanddisplay() |
|
7 | $ svnupanddisplay() | |
8 | > { |
|
8 | > { | |
9 | > ( |
|
9 | > ( | |
10 | > cd $1; |
|
10 | > cd $1; | |
11 | > svn up; |
|
11 | > svn up; | |
12 | > svn st -v | fixpath | sed 's/ */ /g' |
|
12 | > svn st -v | fixpath | sed 's/ */ /g' | |
13 | > limit='' |
|
13 | > limit='' | |
14 | > if [ $2 -gt 0 ]; then |
|
14 | > if [ $2 -gt 0 ]; then | |
15 | > limit="--limit=$2" |
|
15 | > limit="--limit=$2" | |
16 | > fi |
|
16 | > fi | |
17 | > svn log --xml -v $limit \ |
|
17 | > svn log --xml -v $limit \ | |
18 | > | fixpath \ |
|
18 | > | fixpath \ | |
19 | > | sed 's,<date>.*,<date/>,' \ |
|
19 | > | sed 's,<date>.*,<date/>,' \ | |
20 | > | grep -v 'kind="' |
|
20 | > | grep -v 'kind="' | |
21 | > ) |
|
21 | > ) | |
22 | > } |
|
22 | > } | |
23 |
|
23 | |||
24 | $ cat >> $HGRCPATH <<EOF |
|
24 | $ cat >> $HGRCPATH <<EOF | |
25 | > [extensions] |
|
25 | > [extensions] | |
26 | > convert = |
|
26 | > convert = | |
27 | > graphlog = |
|
27 | > graphlog = | |
28 | > EOF |
|
28 | > EOF | |
29 |
|
29 | |||
30 | $ hg init a |
|
30 | $ hg init a | |
31 |
|
31 | |||
32 | Add |
|
32 | Add | |
33 |
|
33 | |||
34 | $ echo a > a/a |
|
34 | $ echo a > a/a | |
35 | $ mkdir -p a/d1/d2 |
|
35 | $ mkdir -p a/d1/d2 | |
36 | $ echo b > a/d1/d2/b |
|
36 | $ echo b > a/d1/d2/b | |
37 | $ ln -s a/missing a/link |
|
37 | $ ln -s a/missing a/link | |
38 | $ hg --cwd a ci -d '0 0' -A -m 'add a file' |
|
38 | $ hg --cwd a ci -d '0 0' -A -m 'add a file' | |
39 | adding a |
|
39 | adding a | |
40 | adding d1/d2/b |
|
40 | adding d1/d2/b | |
41 | adding link |
|
41 | adding link | |
42 |
|
42 | |||
43 | Modify |
|
43 | Modify | |
44 |
|
44 | |||
45 | $ "$TESTDIR/svn-safe-append.py" a a/a |
|
45 | $ "$TESTDIR/svn-safe-append.py" a a/a | |
46 | $ hg --cwd a ci -d '1 0' -m 'modify a file' |
|
46 | $ hg --cwd a ci -d '1 0' -m 'modify a file' | |
47 | $ hg --cwd a tip -q |
|
47 | $ hg --cwd a tip -q | |
48 | 1:8231f652da37 |
|
48 | 1:8231f652da37 | |
49 |
|
49 | |||
50 | $ hg convert -d svn a |
|
50 | $ hg convert -d svn a | |
51 | assuming destination a-hg |
|
51 | assuming destination a-hg | |
52 | initializing svn repository 'a-hg' |
|
52 | initializing svn repository 'a-hg' | |
53 | initializing svn working copy 'a-hg-wc' |
|
53 | initializing svn working copy 'a-hg-wc' | |
54 | scanning source... |
|
54 | scanning source... | |
55 | sorting... |
|
55 | sorting... | |
56 | converting... |
|
56 | converting... | |
57 | 1 add a file |
|
57 | 1 add a file | |
58 | 0 modify a file |
|
58 | 0 modify a file | |
59 | $ svnupanddisplay a-hg-wc 2 |
|
59 | $ svnupanddisplay a-hg-wc 2 | |
60 | At revision 2. |
|
60 | At revision 2. | |
61 | 2 2 test . |
|
61 | 2 2 test . | |
62 | 2 2 test a |
|
62 | 2 2 test a | |
63 | 2 1 test d1 |
|
63 | 2 1 test d1 | |
64 | 2 1 test d1/d2 |
|
64 | 2 1 test d1/d2 | |
65 | 2 1 test d1/d2/b |
|
65 | 2 1 test d1/d2/b | |
66 | 2 1 test link |
|
66 | 2 1 test link | |
67 | <?xml version="1.0"?> |
|
67 | <?xml version="1.0"?> | |
68 | <log> |
|
68 | <log> | |
69 | <logentry |
|
69 | <logentry | |
70 | revision="2"> |
|
70 | revision="2"> | |
71 | <author>test</author> |
|
71 | <author>test</author> | |
72 | <date/> |
|
72 | <date/> | |
73 | <paths> |
|
73 | <paths> | |
74 | <path |
|
74 | <path | |
75 | action="M">/a</path> |
|
75 | action="M">/a</path> | |
76 | </paths> |
|
76 | </paths> | |
77 | <msg>modify a file</msg> |
|
77 | <msg>modify a file</msg> | |
78 | </logentry> |
|
78 | </logentry> | |
79 | <logentry |
|
79 | <logentry | |
80 | revision="1"> |
|
80 | revision="1"> | |
81 | <author>test</author> |
|
81 | <author>test</author> | |
82 | <date/> |
|
82 | <date/> | |
83 | <paths> |
|
83 | <paths> | |
84 | <path |
|
84 | <path | |
85 | action="A">/a</path> |
|
85 | action="A">/a</path> | |
86 | <path |
|
86 | <path | |
87 | action="A">/d1</path> |
|
87 | action="A">/d1</path> | |
88 | <path |
|
88 | <path | |
89 | action="A">/d1/d2</path> |
|
89 | action="A">/d1/d2</path> | |
90 | <path |
|
90 | <path | |
91 | action="A">/d1/d2/b</path> |
|
91 | action="A">/d1/d2/b</path> | |
92 | <path |
|
92 | <path | |
93 | action="A">/link</path> |
|
93 | action="A">/link</path> | |
94 | </paths> |
|
94 | </paths> | |
95 | <msg>add a file</msg> |
|
95 | <msg>add a file</msg> | |
96 | </logentry> |
|
96 | </logentry> | |
97 | </log> |
|
97 | </log> | |
98 | $ ls a a-hg-wc |
|
98 | $ ls a a-hg-wc | |
99 | a: |
|
99 | a: | |
100 | a |
|
100 | a | |
101 | d1 |
|
101 | d1 | |
102 | link |
|
102 | link | |
103 |
|
103 | |||
104 | a-hg-wc: |
|
104 | a-hg-wc: | |
105 | a |
|
105 | a | |
106 | d1 |
|
106 | d1 | |
107 | link |
|
107 | link | |
108 | $ cmp a/a a-hg-wc/a |
|
108 | $ cmp a/a a-hg-wc/a | |
109 |
|
109 | |||
110 | Rename |
|
110 | Rename | |
111 |
|
111 | |||
112 | $ hg --cwd a mv a b |
|
112 | $ hg --cwd a mv a b | |
113 | $ hg --cwd a mv link newlink |
|
113 | $ hg --cwd a mv link newlink | |
114 |
|
114 | |||
115 | $ hg --cwd a ci -d '2 0' -m 'rename a file' |
|
115 | $ hg --cwd a ci -d '2 0' -m 'rename a file' | |
116 | $ hg --cwd a tip -q |
|
116 | $ hg --cwd a tip -q | |
117 | 2:a67e26ccec09 |
|
117 | 2:a67e26ccec09 | |
118 |
|
118 | |||
119 | $ hg convert -d svn a |
|
119 | $ hg convert -d svn a | |
120 | assuming destination a-hg |
|
120 | assuming destination a-hg | |
121 | initializing svn working copy 'a-hg-wc' |
|
121 | initializing svn working copy 'a-hg-wc' | |
122 | scanning source... |
|
122 | scanning source... | |
123 | sorting... |
|
123 | sorting... | |
124 | converting... |
|
124 | converting... | |
125 | 0 rename a file |
|
125 | 0 rename a file | |
126 | $ svnupanddisplay a-hg-wc 1 |
|
126 | $ svnupanddisplay a-hg-wc 1 | |
127 | At revision 3. |
|
127 | At revision 3. | |
128 | 3 3 test . |
|
128 | 3 3 test . | |
129 | 3 3 test b |
|
129 | 3 3 test b | |
130 | 3 1 test d1 |
|
130 | 3 1 test d1 | |
131 | 3 1 test d1/d2 |
|
131 | 3 1 test d1/d2 | |
132 | 3 1 test d1/d2/b |
|
132 | 3 1 test d1/d2/b | |
133 | 3 3 test newlink |
|
133 | 3 3 test newlink | |
134 | <?xml version="1.0"?> |
|
134 | <?xml version="1.0"?> | |
135 | <log> |
|
135 | <log> | |
136 | <logentry |
|
136 | <logentry | |
137 | revision="3"> |
|
137 | revision="3"> | |
138 | <author>test</author> |
|
138 | <author>test</author> | |
139 | <date/> |
|
139 | <date/> | |
140 | <paths> |
|
140 | <paths> | |
141 | <path |
|
141 | <path | |
142 | action="D">/a</path> |
|
142 | action="D">/a</path> | |
143 | <path |
|
143 | <path | |
144 | copyfrom-path="/a" |
|
144 | copyfrom-path="/a" | |
145 | copyfrom-rev="2" |
|
145 | copyfrom-rev="2" | |
146 | action="A">/b</path> |
|
146 | action="A">/b</path> | |
147 | <path |
|
147 | <path | |
148 | copyfrom-path="/link" |
|
148 | copyfrom-path="/link" | |
149 | copyfrom-rev="2" |
|
149 | copyfrom-rev="2" | |
150 | action="A">/newlink</path> |
|
150 | action="A">/newlink</path> | |
151 | <path |
|
151 | <path | |
152 | action="D">/link</path> |
|
152 | action="D">/link</path> | |
153 | </paths> |
|
153 | </paths> | |
154 | <msg>rename a file</msg> |
|
154 | <msg>rename a file</msg> | |
155 | </logentry> |
|
155 | </logentry> | |
156 | </log> |
|
156 | </log> | |
157 | $ ls a a-hg-wc |
|
157 | $ ls a a-hg-wc | |
158 | a: |
|
158 | a: | |
159 | b |
|
159 | b | |
160 | d1 |
|
160 | d1 | |
161 | newlink |
|
161 | newlink | |
162 |
|
162 | |||
163 | a-hg-wc: |
|
163 | a-hg-wc: | |
164 | b |
|
164 | b | |
165 | d1 |
|
165 | d1 | |
166 | newlink |
|
166 | newlink | |
167 |
|
167 | |||
168 | Copy |
|
168 | Copy | |
169 |
|
169 | |||
170 | $ hg --cwd a cp b c |
|
170 | $ hg --cwd a cp b c | |
171 |
|
171 | |||
172 | $ hg --cwd a ci -d '3 0' -m 'copy a file' |
|
172 | $ hg --cwd a ci -d '3 0' -m 'copy a file' | |
173 | $ hg --cwd a tip -q |
|
173 | $ hg --cwd a tip -q | |
174 | 3:0cf087b9ab02 |
|
174 | 3:0cf087b9ab02 | |
175 |
|
175 | |||
176 | $ hg convert -d svn a |
|
176 | $ hg convert -d svn a | |
177 | assuming destination a-hg |
|
177 | assuming destination a-hg | |
178 | initializing svn working copy 'a-hg-wc' |
|
178 | initializing svn working copy 'a-hg-wc' | |
179 | scanning source... |
|
179 | scanning source... | |
180 | sorting... |
|
180 | sorting... | |
181 | converting... |
|
181 | converting... | |
182 | 0 copy a file |
|
182 | 0 copy a file | |
183 | $ svnupanddisplay a-hg-wc 1 |
|
183 | $ svnupanddisplay a-hg-wc 1 | |
184 | At revision 4. |
|
184 | At revision 4. | |
185 | 4 4 test . |
|
185 | 4 4 test . | |
186 | 4 3 test b |
|
186 | 4 3 test b | |
187 | 4 4 test c |
|
187 | 4 4 test c | |
188 | 4 1 test d1 |
|
188 | 4 1 test d1 | |
189 | 4 1 test d1/d2 |
|
189 | 4 1 test d1/d2 | |
190 | 4 1 test d1/d2/b |
|
190 | 4 1 test d1/d2/b | |
191 | 4 3 test newlink |
|
191 | 4 3 test newlink | |
192 | <?xml version="1.0"?> |
|
192 | <?xml version="1.0"?> | |
193 | <log> |
|
193 | <log> | |
194 | <logentry |
|
194 | <logentry | |
195 | revision="4"> |
|
195 | revision="4"> | |
196 | <author>test</author> |
|
196 | <author>test</author> | |
197 | <date/> |
|
197 | <date/> | |
198 | <paths> |
|
198 | <paths> | |
199 | <path |
|
199 | <path | |
200 | copyfrom-path="/b" |
|
200 | copyfrom-path="/b" | |
201 | copyfrom-rev="3" |
|
201 | copyfrom-rev="3" | |
202 | action="A">/c</path> |
|
202 | action="A">/c</path> | |
203 | </paths> |
|
203 | </paths> | |
204 | <msg>copy a file</msg> |
|
204 | <msg>copy a file</msg> | |
205 | </logentry> |
|
205 | </logentry> | |
206 | </log> |
|
206 | </log> | |
207 | $ ls a a-hg-wc |
|
207 | $ ls a a-hg-wc | |
208 | a: |
|
208 | a: | |
209 | b |
|
209 | b | |
210 | c |
|
210 | c | |
211 | d1 |
|
211 | d1 | |
212 | newlink |
|
212 | newlink | |
213 |
|
213 | |||
214 | a-hg-wc: |
|
214 | a-hg-wc: | |
215 | b |
|
215 | b | |
216 | c |
|
216 | c | |
217 | d1 |
|
217 | d1 | |
218 | newlink |
|
218 | newlink | |
219 |
|
219 | |||
220 | $ hg --cwd a rm b |
|
220 | $ hg --cwd a rm b | |
221 |
|
221 | |||
222 | Remove |
|
222 | Remove | |
223 |
|
223 | |||
224 | $ hg --cwd a ci -d '4 0' -m 'remove a file' |
|
224 | $ hg --cwd a ci -d '4 0' -m 'remove a file' | |
225 | $ hg --cwd a tip -q |
|
225 | $ hg --cwd a tip -q | |
226 | 4:07b2e34a5b17 |
|
226 | 4:07b2e34a5b17 | |
227 |
|
227 | |||
228 | $ hg convert -d svn a |
|
228 | $ hg convert -d svn a | |
229 | assuming destination a-hg |
|
229 | assuming destination a-hg | |
230 | initializing svn working copy 'a-hg-wc' |
|
230 | initializing svn working copy 'a-hg-wc' | |
231 | scanning source... |
|
231 | scanning source... | |
232 | sorting... |
|
232 | sorting... | |
233 | converting... |
|
233 | converting... | |
234 | 0 remove a file |
|
234 | 0 remove a file | |
235 | $ svnupanddisplay a-hg-wc 1 |
|
235 | $ svnupanddisplay a-hg-wc 1 | |
236 | At revision 5. |
|
236 | At revision 5. | |
237 | 5 5 test . |
|
237 | 5 5 test . | |
238 | 5 4 test c |
|
238 | 5 4 test c | |
239 | 5 1 test d1 |
|
239 | 5 1 test d1 | |
240 | 5 1 test d1/d2 |
|
240 | 5 1 test d1/d2 | |
241 | 5 1 test d1/d2/b |
|
241 | 5 1 test d1/d2/b | |
242 | 5 3 test newlink |
|
242 | 5 3 test newlink | |
243 | <?xml version="1.0"?> |
|
243 | <?xml version="1.0"?> | |
244 | <log> |
|
244 | <log> | |
245 | <logentry |
|
245 | <logentry | |
246 | revision="5"> |
|
246 | revision="5"> | |
247 | <author>test</author> |
|
247 | <author>test</author> | |
248 | <date/> |
|
248 | <date/> | |
249 | <paths> |
|
249 | <paths> | |
250 | <path |
|
250 | <path | |
251 | action="D">/b</path> |
|
251 | action="D">/b</path> | |
252 | </paths> |
|
252 | </paths> | |
253 | <msg>remove a file</msg> |
|
253 | <msg>remove a file</msg> | |
254 | </logentry> |
|
254 | </logentry> | |
255 | </log> |
|
255 | </log> | |
256 | $ ls a a-hg-wc |
|
256 | $ ls a a-hg-wc | |
257 | a: |
|
257 | a: | |
258 | c |
|
258 | c | |
259 | d1 |
|
259 | d1 | |
260 | newlink |
|
260 | newlink | |
261 |
|
261 | |||
262 | a-hg-wc: |
|
262 | a-hg-wc: | |
263 | c |
|
263 | c | |
264 | d1 |
|
264 | d1 | |
265 | newlink |
|
265 | newlink | |
266 |
|
266 | |||
267 | Exectutable |
|
267 | Exectutable | |
268 |
|
268 | |||
269 | $ chmod +x a/c |
|
269 | $ chmod +x a/c | |
270 | $ hg --cwd a ci -d '5 0' -m 'make a file executable' |
|
270 | $ hg --cwd a ci -d '5 0' -m 'make a file executable' | |
271 | $ hg --cwd a tip -q |
|
271 | $ hg --cwd a tip -q | |
272 | 5:31093672760b |
|
272 | 5:31093672760b | |
273 |
|
273 | |||
274 | $ hg convert -d svn a |
|
274 | $ hg convert -d svn a | |
275 | assuming destination a-hg |
|
275 | assuming destination a-hg | |
276 | initializing svn working copy 'a-hg-wc' |
|
276 | initializing svn working copy 'a-hg-wc' | |
277 | scanning source... |
|
277 | scanning source... | |
278 | sorting... |
|
278 | sorting... | |
279 | converting... |
|
279 | converting... | |
280 | 0 make a file executable |
|
280 | 0 make a file executable | |
281 | $ svnupanddisplay a-hg-wc 1 |
|
281 | $ svnupanddisplay a-hg-wc 1 | |
282 | At revision 6. |
|
282 | At revision 6. | |
283 | 6 6 test . |
|
283 | 6 6 test . | |
284 | 6 6 test c |
|
284 | 6 6 test c | |
285 | 6 1 test d1 |
|
285 | 6 1 test d1 | |
286 | 6 1 test d1/d2 |
|
286 | 6 1 test d1/d2 | |
287 | 6 1 test d1/d2/b |
|
287 | 6 1 test d1/d2/b | |
288 | 6 3 test newlink |
|
288 | 6 3 test newlink | |
289 | <?xml version="1.0"?> |
|
289 | <?xml version="1.0"?> | |
290 | <log> |
|
290 | <log> | |
291 | <logentry |
|
291 | <logentry | |
292 | revision="6"> |
|
292 | revision="6"> | |
293 | <author>test</author> |
|
293 | <author>test</author> | |
294 | <date/> |
|
294 | <date/> | |
295 | <paths> |
|
295 | <paths> | |
296 | <path |
|
296 | <path | |
297 | action="M">/c</path> |
|
297 | action="M">/c</path> | |
298 | </paths> |
|
298 | </paths> | |
299 | <msg>make a file executable</msg> |
|
299 | <msg>make a file executable</msg> | |
300 | </logentry> |
|
300 | </logentry> | |
301 | </log> |
|
301 | </log> | |
302 | $ test -x a-hg-wc/c |
|
302 | $ test -x a-hg-wc/c | |
303 |
|
303 | |||
304 | Executable in new directory |
|
304 | Executable in new directory | |
305 |
|
305 | |||
306 | $ rm -rf a a-hg a-hg-wc |
|
306 | $ rm -rf a a-hg a-hg-wc | |
307 | $ hg init a |
|
307 | $ hg init a | |
308 |
|
308 | |||
309 | $ mkdir a/d1 |
|
309 | $ mkdir a/d1 | |
310 | $ echo a > a/d1/a |
|
310 | $ echo a > a/d1/a | |
311 | $ chmod +x a/d1/a |
|
311 | $ chmod +x a/d1/a | |
312 | $ hg --cwd a ci -d '0 0' -A -m 'add executable file in new directory' |
|
312 | $ hg --cwd a ci -d '0 0' -A -m 'add executable file in new directory' | |
313 | adding d1/a |
|
313 | adding d1/a | |
314 |
|
314 | |||
315 | $ hg convert -d svn a |
|
315 | $ hg convert -d svn a | |
316 | assuming destination a-hg |
|
316 | assuming destination a-hg | |
317 | initializing svn repository 'a-hg' |
|
317 | initializing svn repository 'a-hg' | |
318 | initializing svn working copy 'a-hg-wc' |
|
318 | initializing svn working copy 'a-hg-wc' | |
319 | scanning source... |
|
319 | scanning source... | |
320 | sorting... |
|
320 | sorting... | |
321 | converting... |
|
321 | converting... | |
322 | 0 add executable file in new directory |
|
322 | 0 add executable file in new directory | |
323 | $ svnupanddisplay a-hg-wc 1 |
|
323 | $ svnupanddisplay a-hg-wc 1 | |
324 | At revision 1. |
|
324 | At revision 1. | |
325 | 1 1 test . |
|
325 | 1 1 test . | |
326 | 1 1 test d1 |
|
326 | 1 1 test d1 | |
327 | 1 1 test d1/a |
|
327 | 1 1 test d1/a | |
328 | <?xml version="1.0"?> |
|
328 | <?xml version="1.0"?> | |
329 | <log> |
|
329 | <log> | |
330 | <logentry |
|
330 | <logentry | |
331 | revision="1"> |
|
331 | revision="1"> | |
332 | <author>test</author> |
|
332 | <author>test</author> | |
333 | <date/> |
|
333 | <date/> | |
334 | <paths> |
|
334 | <paths> | |
335 | <path |
|
335 | <path | |
336 | action="A">/d1</path> |
|
336 | action="A">/d1</path> | |
337 | <path |
|
337 | <path | |
338 | action="A">/d1/a</path> |
|
338 | action="A">/d1/a</path> | |
339 | </paths> |
|
339 | </paths> | |
340 | <msg>add executable file in new directory</msg> |
|
340 | <msg>add executable file in new directory</msg> | |
341 | </logentry> |
|
341 | </logentry> | |
342 | </log> |
|
342 | </log> | |
343 | $ test -x a-hg-wc/d1/a |
|
343 | $ test -x a-hg-wc/d1/a | |
344 |
|
344 | |||
345 | Copy to new directory |
|
345 | Copy to new directory | |
346 |
|
346 | |||
347 | $ mkdir a/d2 |
|
347 | $ mkdir a/d2 | |
348 | $ hg --cwd a cp d1/a d2/a |
|
348 | $ hg --cwd a cp d1/a d2/a | |
349 | $ hg --cwd a ci -d '1 0' -A -m 'copy file to new directory' |
|
349 | $ hg --cwd a ci -d '1 0' -A -m 'copy file to new directory' | |
350 |
|
350 | |||
351 | $ hg convert -d svn a |
|
351 | $ hg convert -d svn a | |
352 | assuming destination a-hg |
|
352 | assuming destination a-hg | |
353 | initializing svn working copy 'a-hg-wc' |
|
353 | initializing svn working copy 'a-hg-wc' | |
354 | scanning source... |
|
354 | scanning source... | |
355 | sorting... |
|
355 | sorting... | |
356 | converting... |
|
356 | converting... | |
357 | 0 copy file to new directory |
|
357 | 0 copy file to new directory | |
358 | $ svnupanddisplay a-hg-wc 1 |
|
358 | $ svnupanddisplay a-hg-wc 1 | |
359 | At revision 2. |
|
359 | At revision 2. | |
360 | 2 2 test . |
|
360 | 2 2 test . | |
361 | 2 1 test d1 |
|
361 | 2 1 test d1 | |
362 | 2 1 test d1/a |
|
362 | 2 1 test d1/a | |
363 | 2 2 test d2 |
|
363 | 2 2 test d2 | |
364 | 2 2 test d2/a |
|
364 | 2 2 test d2/a | |
365 | <?xml version="1.0"?> |
|
365 | <?xml version="1.0"?> | |
366 | <log> |
|
366 | <log> | |
367 | <logentry |
|
367 | <logentry | |
368 | revision="2"> |
|
368 | revision="2"> | |
369 | <author>test</author> |
|
369 | <author>test</author> | |
370 | <date/> |
|
370 | <date/> | |
371 | <paths> |
|
371 | <paths> | |
372 | <path |
|
372 | <path | |
373 | action="A">/d2</path> |
|
373 | action="A">/d2</path> | |
374 | <path |
|
374 | <path | |
375 | copyfrom-path="/d1/a" |
|
375 | copyfrom-path="/d1/a" | |
376 | copyfrom-rev="1" |
|
376 | copyfrom-rev="1" | |
377 | action="A">/d2/a</path> |
|
377 | action="A">/d2/a</path> | |
378 | </paths> |
|
378 | </paths> | |
379 | <msg>copy file to new directory</msg> |
|
379 | <msg>copy file to new directory</msg> | |
380 | </logentry> |
|
380 | </logentry> | |
381 | </log> |
|
381 | </log> | |
382 |
|
382 | |||
383 | Branchy history |
|
383 | Branchy history | |
384 |
|
384 | |||
385 | $ hg init b |
|
385 | $ hg init b | |
386 | $ echo base > b/b |
|
386 | $ echo base > b/b | |
387 | $ hg --cwd b ci -d '0 0' -Ambase |
|
387 | $ hg --cwd b ci -d '0 0' -Ambase | |
388 | adding b |
|
388 | adding b | |
389 |
|
389 | |||
390 | $ "$TESTDIR/svn-safe-append.py" left-1 b/b |
|
390 | $ "$TESTDIR/svn-safe-append.py" left-1 b/b | |
391 | $ echo left-1 > b/left-1 |
|
391 | $ echo left-1 > b/left-1 | |
392 | $ hg --cwd b ci -d '1 0' -Amleft-1 |
|
392 | $ hg --cwd b ci -d '1 0' -Amleft-1 | |
393 | adding left-1 |
|
393 | adding left-1 | |
394 |
|
394 | |||
395 | $ "$TESTDIR/svn-safe-append.py" left-2 b/b |
|
395 | $ "$TESTDIR/svn-safe-append.py" left-2 b/b | |
396 | $ echo left-2 > b/left-2 |
|
396 | $ echo left-2 > b/left-2 | |
397 | $ hg --cwd b ci -d '2 0' -Amleft-2 |
|
397 | $ hg --cwd b ci -d '2 0' -Amleft-2 | |
398 | adding left-2 |
|
398 | adding left-2 | |
399 |
|
399 | |||
400 | $ hg --cwd b up 0 |
|
400 | $ hg --cwd b up 0 | |
401 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
401 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
402 |
|
402 | |||
403 | $ "$TESTDIR/svn-safe-append.py" right-1 b/b |
|
403 | $ "$TESTDIR/svn-safe-append.py" right-1 b/b | |
404 | $ echo right-1 > b/right-1 |
|
404 | $ echo right-1 > b/right-1 | |
405 | $ hg --cwd b ci -d '3 0' -Amright-1 |
|
405 | $ hg --cwd b ci -d '3 0' -Amright-1 | |
406 | adding right-1 |
|
406 | adding right-1 | |
407 | created new head |
|
407 | created new head | |
408 |
|
408 | |||
409 | $ "$TESTDIR/svn-safe-append.py" right-2 b/b |
|
409 | $ "$TESTDIR/svn-safe-append.py" right-2 b/b | |
410 | $ echo right-2 > b/right-2 |
|
410 | $ echo right-2 > b/right-2 | |
411 | $ hg --cwd b ci -d '4 0' -Amright-2 |
|
411 | $ hg --cwd b ci -d '4 0' -Amright-2 | |
412 | adding right-2 |
|
412 | adding right-2 | |
413 |
|
413 | |||
414 | $ hg --cwd b up -C 2 |
|
414 | $ hg --cwd b up -C 2 | |
415 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
415 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
416 | $ hg --cwd b merge |
|
416 | $ hg --cwd b merge | |
417 | merging b |
|
417 | merging b | |
418 | warning: conflicts during merge. |
|
418 | warning: conflicts during merge. | |
419 | merging b failed! |
|
419 | merging b failed! | |
420 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
420 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
421 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
421 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
422 | [1] |
|
422 | [1] | |
423 | $ hg --cwd b revert -r 2 b |
|
423 | $ hg --cwd b revert -r 2 b | |
424 | $ hg resolve -m b |
|
424 | $ hg resolve -m b | |
425 | $ hg --cwd b ci -d '5 0' -m 'merge' |
|
425 | $ hg --cwd b ci -d '5 0' -m 'merge' | |
426 |
|
426 | |||
427 | Expect 4 changes |
|
427 | Expect 4 changes | |
428 |
|
428 | |||
429 | $ hg convert -d svn b |
|
429 | $ hg convert -d svn b | |
430 | assuming destination b-hg |
|
430 | assuming destination b-hg | |
431 | initializing svn repository 'b-hg' |
|
431 | initializing svn repository 'b-hg' | |
432 | initializing svn working copy 'b-hg-wc' |
|
432 | initializing svn working copy 'b-hg-wc' | |
433 | scanning source... |
|
433 | scanning source... | |
434 | sorting... |
|
434 | sorting... | |
435 | converting... |
|
435 | converting... | |
436 | 5 base |
|
436 | 5 base | |
437 | 4 left-1 |
|
437 | 4 left-1 | |
438 | 3 left-2 |
|
438 | 3 left-2 | |
439 | 2 right-1 |
|
439 | 2 right-1 | |
440 | 1 right-2 |
|
440 | 1 right-2 | |
441 | 0 merge |
|
441 | 0 merge | |
442 |
|
442 | |||
443 | $ svnupanddisplay b-hg-wc 0 |
|
443 | $ svnupanddisplay b-hg-wc 0 | |
444 | At revision 4. |
|
444 | At revision 4. | |
445 | 4 4 test . |
|
445 | 4 4 test . | |
446 | 4 3 test b |
|
446 | 4 3 test b | |
447 | 4 2 test left-1 |
|
447 | 4 2 test left-1 | |
448 | 4 3 test left-2 |
|
448 | 4 3 test left-2 | |
449 | 4 4 test right-1 |
|
449 | 4 4 test right-1 | |
450 | 4 4 test right-2 |
|
450 | 4 4 test right-2 | |
451 | <?xml version="1.0"?> |
|
451 | <?xml version="1.0"?> | |
452 | <log> |
|
452 | <log> | |
453 | <logentry |
|
453 | <logentry | |
454 | revision="4"> |
|
454 | revision="4"> | |
455 | <author>test</author> |
|
455 | <author>test</author> | |
456 | <date/> |
|
456 | <date/> | |
457 | <paths> |
|
457 | <paths> | |
458 | <path |
|
458 | <path | |
459 | action="A">/right-1</path> |
|
459 | action="A">/right-1</path> | |
460 | <path |
|
460 | <path | |
461 | action="A">/right-2</path> |
|
461 | action="A">/right-2</path> | |
462 | </paths> |
|
462 | </paths> | |
463 | <msg>merge</msg> |
|
463 | <msg>merge</msg> | |
464 | </logentry> |
|
464 | </logentry> | |
465 | <logentry |
|
465 | <logentry | |
466 | revision="3"> |
|
466 | revision="3"> | |
467 | <author>test</author> |
|
467 | <author>test</author> | |
468 | <date/> |
|
468 | <date/> | |
469 | <paths> |
|
469 | <paths> | |
470 | <path |
|
470 | <path | |
471 | action="M">/b</path> |
|
471 | action="M">/b</path> | |
472 | <path |
|
472 | <path | |
473 | action="A">/left-2</path> |
|
473 | action="A">/left-2</path> | |
474 | </paths> |
|
474 | </paths> | |
475 | <msg>left-2</msg> |
|
475 | <msg>left-2</msg> | |
476 | </logentry> |
|
476 | </logentry> | |
477 | <logentry |
|
477 | <logentry | |
478 | revision="2"> |
|
478 | revision="2"> | |
479 | <author>test</author> |
|
479 | <author>test</author> | |
480 | <date/> |
|
480 | <date/> | |
481 | <paths> |
|
481 | <paths> | |
482 | <path |
|
482 | <path | |
483 | action="M">/b</path> |
|
483 | action="M">/b</path> | |
484 | <path |
|
484 | <path | |
485 | action="A">/left-1</path> |
|
485 | action="A">/left-1</path> | |
486 | </paths> |
|
486 | </paths> | |
487 | <msg>left-1</msg> |
|
487 | <msg>left-1</msg> | |
488 | </logentry> |
|
488 | </logentry> | |
489 | <logentry |
|
489 | <logentry | |
490 | revision="1"> |
|
490 | revision="1"> | |
491 | <author>test</author> |
|
491 | <author>test</author> | |
492 | <date/> |
|
492 | <date/> | |
493 | <paths> |
|
493 | <paths> | |
494 | <path |
|
494 | <path | |
495 | action="A">/b</path> |
|
495 | action="A">/b</path> | |
496 | </paths> |
|
496 | </paths> | |
497 | <msg>base</msg> |
|
497 | <msg>base</msg> | |
498 | </logentry> |
|
498 | </logentry> | |
499 | </log> |
|
499 | </log> | |
500 |
|
500 | |||
501 | Tags are not supported, but must not break conversion |
|
501 | Tags are not supported, but must not break conversion | |
502 |
|
502 | |||
503 | $ rm -rf a a-hg a-hg-wc |
|
503 | $ rm -rf a a-hg a-hg-wc | |
504 | $ hg init a |
|
504 | $ hg init a | |
505 | $ echo a > a/a |
|
505 | $ echo a > a/a | |
506 | $ hg --cwd a ci -d '0 0' -A -m 'Add file a' |
|
506 | $ hg --cwd a ci -d '0 0' -A -m 'Add file a' | |
507 | adding a |
|
507 | adding a | |
508 | $ hg --cwd a tag -d '1 0' -m 'Tagged as v1.0' v1.0 |
|
508 | $ hg --cwd a tag -d '1 0' -m 'Tagged as v1.0' v1.0 | |
509 |
|
509 | |||
510 | $ hg convert -d svn a |
|
510 | $ hg convert -d svn a | |
511 | assuming destination a-hg |
|
511 | assuming destination a-hg | |
512 | initializing svn repository 'a-hg' |
|
512 | initializing svn repository 'a-hg' | |
513 | initializing svn working copy 'a-hg-wc' |
|
513 | initializing svn working copy 'a-hg-wc' | |
514 | scanning source... |
|
514 | scanning source... | |
515 | sorting... |
|
515 | sorting... | |
516 | converting... |
|
516 | converting... | |
517 | 1 Add file a |
|
517 | 1 Add file a | |
518 | 0 Tagged as v1.0 |
|
518 | 0 Tagged as v1.0 | |
519 | writing Subversion tags is not yet implemented |
|
519 | writing Subversion tags is not yet implemented | |
520 | $ svnupanddisplay a-hg-wc 2 |
|
520 | $ svnupanddisplay a-hg-wc 2 | |
521 | At revision 2. |
|
521 | At revision 2. | |
522 | 2 2 test . |
|
522 | 2 2 test . | |
523 | 2 1 test a |
|
523 | 2 1 test a | |
524 | 2 2 test .hgtags |
|
524 | 2 2 test .hgtags | |
525 | <?xml version="1.0"?> |
|
525 | <?xml version="1.0"?> | |
526 | <log> |
|
526 | <log> | |
527 | <logentry |
|
527 | <logentry | |
528 | revision="2"> |
|
528 | revision="2"> | |
529 | <author>test</author> |
|
529 | <author>test</author> | |
530 | <date/> |
|
530 | <date/> | |
531 | <paths> |
|
531 | <paths> | |
532 | <path |
|
532 | <path | |
533 | action="A">/.hgtags</path> |
|
533 | action="A">/.hgtags</path> | |
534 | </paths> |
|
534 | </paths> | |
535 | <msg>Tagged as v1.0</msg> |
|
535 | <msg>Tagged as v1.0</msg> | |
536 | </logentry> |
|
536 | </logentry> | |
537 | <logentry |
|
537 | <logentry | |
538 | revision="1"> |
|
538 | revision="1"> | |
539 | <author>test</author> |
|
539 | <author>test</author> | |
540 | <date/> |
|
540 | <date/> | |
541 | <paths> |
|
541 | <paths> | |
542 | <path |
|
542 | <path | |
543 | action="A">/a</path> |
|
543 | action="A">/a</path> | |
544 | </paths> |
|
544 | </paths> | |
545 | <msg>Add file a</msg> |
|
545 | <msg>Add file a</msg> | |
546 | </logentry> |
|
546 | </logentry> | |
547 | </log> |
|
547 | </log> | |
548 | $ rm -rf a a-hg a-hg-wc |
|
548 | $ rm -rf a a-hg a-hg-wc |
@@ -1,124 +1,126 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | Setup |
|
3 | Setup | |
2 |
|
4 | |||
3 |
$ |
|
5 | $ echo "[color]" >> $HGRCPATH | |
4 |
$ |
|
6 | $ echo "mode = ansi" >> $HGRCPATH | |
5 |
$ |
|
7 | $ echo "[extensions]" >> $HGRCPATH | |
6 |
$ |
|
8 | $ echo "color=" >> $HGRCPATH | |
7 |
$ |
|
9 | $ hg init repo | |
8 | $ cd repo |
|
10 | $ cd repo | |
9 | $ cat > a <<EOF |
|
11 | $ cat > a <<EOF | |
10 | > c |
|
12 | > c | |
11 | > c |
|
13 | > c | |
12 | > a |
|
14 | > a | |
13 | > a |
|
15 | > a | |
14 | > b |
|
16 | > b | |
15 | > a |
|
17 | > a | |
16 | > a |
|
18 | > a | |
17 | > c |
|
19 | > c | |
18 | > c |
|
20 | > c | |
19 | > EOF |
|
21 | > EOF | |
20 | $ hg ci -Am adda |
|
22 | $ hg ci -Am adda | |
21 | adding a |
|
23 | adding a | |
22 | $ cat > a <<EOF |
|
24 | $ cat > a <<EOF | |
23 | > c |
|
25 | > c | |
24 | > c |
|
26 | > c | |
25 | > a |
|
27 | > a | |
26 | > a |
|
28 | > a | |
27 | > dd |
|
29 | > dd | |
28 | > a |
|
30 | > a | |
29 | > a |
|
31 | > a | |
30 | > c |
|
32 | > c | |
31 | > c |
|
33 | > c | |
32 | > EOF |
|
34 | > EOF | |
33 |
|
35 | |||
34 | default context |
|
36 | default context | |
35 |
|
37 | |||
36 | $ hg diff --nodates --color=always |
|
38 | $ hg diff --nodates --color=always | |
37 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
39 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) | |
38 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
40 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
39 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
41 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
40 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
42 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
41 | c |
|
43 | c | |
42 | a |
|
44 | a | |
43 | a |
|
45 | a | |
44 | \x1b[0;31m-b\x1b[0m (esc) |
|
46 | \x1b[0;31m-b\x1b[0m (esc) | |
45 | \x1b[0;32m+dd\x1b[0m (esc) |
|
47 | \x1b[0;32m+dd\x1b[0m (esc) | |
46 | a |
|
48 | a | |
47 | a |
|
49 | a | |
48 | c |
|
50 | c | |
49 |
|
51 | |||
50 | --unified=2 |
|
52 | --unified=2 | |
51 |
|
53 | |||
52 | $ hg diff --nodates -U 2 --color=always |
|
54 | $ hg diff --nodates -U 2 --color=always | |
53 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
55 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) | |
54 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
56 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
55 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
57 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
56 | \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc) |
|
58 | \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc) | |
57 | a |
|
59 | a | |
58 | a |
|
60 | a | |
59 | \x1b[0;31m-b\x1b[0m (esc) |
|
61 | \x1b[0;31m-b\x1b[0m (esc) | |
60 | \x1b[0;32m+dd\x1b[0m (esc) |
|
62 | \x1b[0;32m+dd\x1b[0m (esc) | |
61 | a |
|
63 | a | |
62 | a |
|
64 | a | |
63 |
|
65 | |||
64 | diffstat |
|
66 | diffstat | |
65 |
|
67 | |||
66 | $ hg diff --stat --color=always |
|
68 | $ hg diff --stat --color=always | |
67 | a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc) |
|
69 | a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc) | |
68 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
70 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
69 | $ echo "record=" >> $HGRCPATH |
|
71 | $ echo "record=" >> $HGRCPATH | |
70 | $ echo "[ui]" >> $HGRCPATH |
|
72 | $ echo "[ui]" >> $HGRCPATH | |
71 | $ echo "interactive=true" >> $HGRCPATH |
|
73 | $ echo "interactive=true" >> $HGRCPATH | |
72 | $ echo "[diff]" >> $HGRCPATH |
|
74 | $ echo "[diff]" >> $HGRCPATH | |
73 | $ echo "git=True" >> $HGRCPATH |
|
75 | $ echo "git=True" >> $HGRCPATH | |
74 |
|
76 | |||
75 | record |
|
77 | record | |
76 |
|
78 | |||
77 |
$ chmod |
|
79 | $ chmod +x a | |
78 | $ hg record --color=always -m moda a <<EOF |
|
80 | $ hg record --color=always -m moda a <<EOF | |
79 | > y |
|
81 | > y | |
80 | > y |
|
82 | > y | |
81 | > EOF |
|
83 | > EOF | |
82 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
84 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
83 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) |
|
85 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) | |
84 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) |
|
86 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) | |
85 | 1 hunks, 1 lines changed |
|
87 | 1 hunks, 1 lines changed | |
86 | \x1b[0;33mexamine changes to 'a'? [Ynsfdaq?]\x1b[0m (esc) |
|
88 | \x1b[0;33mexamine changes to 'a'? [Ynsfdaq?]\x1b[0m (esc) | |
87 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
89 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
88 | c |
|
90 | c | |
89 | a |
|
91 | a | |
90 | a |
|
92 | a | |
91 | \x1b[0;31m-b\x1b[0m (esc) |
|
93 | \x1b[0;31m-b\x1b[0m (esc) | |
92 | \x1b[0;32m+dd\x1b[0m (esc) |
|
94 | \x1b[0;32m+dd\x1b[0m (esc) | |
93 | a |
|
95 | a | |
94 | a |
|
96 | a | |
95 | c |
|
97 | c | |
96 | \x1b[0;33mrecord this change to 'a'? [Ynsfdaq?]\x1b[0m (esc) |
|
98 | \x1b[0;33mrecord this change to 'a'? [Ynsfdaq?]\x1b[0m (esc) | |
97 |
|
99 | |||
98 | $ echo "[extensions]" >> $HGRCPATH |
|
100 | $ echo "[extensions]" >> $HGRCPATH | |
99 | $ echo "mq=" >> $HGRCPATH |
|
101 | $ echo "mq=" >> $HGRCPATH | |
100 | $ hg rollback |
|
102 | $ hg rollback | |
101 | repository tip rolled back to revision 0 (undo commit) |
|
103 | repository tip rolled back to revision 0 (undo commit) | |
102 | working directory now based on revision 0 |
|
104 | working directory now based on revision 0 | |
103 |
|
105 | |||
104 | qrecord |
|
106 | qrecord | |
105 |
|
107 | |||
106 | $ hg qrecord --color=always -m moda patch <<EOF |
|
108 | $ hg qrecord --color=always -m moda patch <<EOF | |
107 | > y |
|
109 | > y | |
108 | > y |
|
110 | > y | |
109 | > EOF |
|
111 | > EOF | |
110 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
112 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
111 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) |
|
113 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) | |
112 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) |
|
114 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) | |
113 | 1 hunks, 1 lines changed |
|
115 | 1 hunks, 1 lines changed | |
114 | \x1b[0;33mexamine changes to 'a'? [Ynsfdaq?]\x1b[0m (esc) |
|
116 | \x1b[0;33mexamine changes to 'a'? [Ynsfdaq?]\x1b[0m (esc) | |
115 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
117 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
116 | c |
|
118 | c | |
117 | a |
|
119 | a | |
118 | a |
|
120 | a | |
119 | \x1b[0;31m-b\x1b[0m (esc) |
|
121 | \x1b[0;31m-b\x1b[0m (esc) | |
120 | \x1b[0;32m+dd\x1b[0m (esc) |
|
122 | \x1b[0;32m+dd\x1b[0m (esc) | |
121 | a |
|
123 | a | |
122 | a |
|
124 | a | |
123 | c |
|
125 | c | |
124 | \x1b[0;33mrecord this change to 'a'? [Ynsfdaq?]\x1b[0m (esc) |
|
126 | \x1b[0;33mrecord this change to 'a'? [Ynsfdaq?]\x1b[0m (esc) |
@@ -1,282 +1,283 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
1 |
|
2 | |||
2 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
3 | $ echo "autodiff=$TESTDIR/autodiff.py" >> $HGRCPATH |
|
4 | $ echo "autodiff=$TESTDIR/autodiff.py" >> $HGRCPATH | |
4 | $ echo "[diff]" >> $HGRCPATH |
|
5 | $ echo "[diff]" >> $HGRCPATH | |
5 | $ echo "nodates=1" >> $HGRCPATH |
|
6 | $ echo "nodates=1" >> $HGRCPATH | |
6 |
|
7 | |||
7 | $ hg init repo |
|
8 | $ hg init repo | |
8 | $ cd repo |
|
9 | $ cd repo | |
9 |
|
10 | |||
10 |
|
11 | |||
11 |
|
12 | |||
12 | make a combination of new, changed and deleted file |
|
13 | make a combination of new, changed and deleted file | |
13 |
|
14 | |||
14 | $ echo regular > regular |
|
15 | $ echo regular > regular | |
15 | $ echo rmregular > rmregular |
|
16 | $ echo rmregular > rmregular | |
16 | $ python -c "file('bintoregular', 'wb').write('\0')" |
|
17 | $ python -c "file('bintoregular', 'wb').write('\0')" | |
17 | $ touch rmempty |
|
18 | $ touch rmempty | |
18 | $ echo exec > exec |
|
19 | $ echo exec > exec | |
19 | $ chmod +x exec |
|
20 | $ chmod +x exec | |
20 | $ echo rmexec > rmexec |
|
21 | $ echo rmexec > rmexec | |
21 | $ chmod +x rmexec |
|
22 | $ chmod +x rmexec | |
22 | $ echo setexec > setexec |
|
23 | $ echo setexec > setexec | |
23 | $ echo unsetexec > unsetexec |
|
24 | $ echo unsetexec > unsetexec | |
24 | $ chmod +x unsetexec |
|
25 | $ chmod +x unsetexec | |
25 | $ echo binary > binary |
|
26 | $ echo binary > binary | |
26 | $ python -c "file('rmbinary', 'wb').write('\0')" |
|
27 | $ python -c "file('rmbinary', 'wb').write('\0')" | |
27 | $ hg ci -Am addfiles |
|
28 | $ hg ci -Am addfiles | |
28 | adding binary |
|
29 | adding binary | |
29 | adding bintoregular |
|
30 | adding bintoregular | |
30 | adding exec |
|
31 | adding exec | |
31 | adding regular |
|
32 | adding regular | |
32 | adding rmbinary |
|
33 | adding rmbinary | |
33 | adding rmempty |
|
34 | adding rmempty | |
34 | adding rmexec |
|
35 | adding rmexec | |
35 | adding rmregular |
|
36 | adding rmregular | |
36 | adding setexec |
|
37 | adding setexec | |
37 | adding unsetexec |
|
38 | adding unsetexec | |
38 | $ echo regular >> regular |
|
39 | $ echo regular >> regular | |
39 | $ echo newregular >> newregular |
|
40 | $ echo newregular >> newregular | |
40 | $ rm rmempty |
|
41 | $ rm rmempty | |
41 | $ touch newempty |
|
42 | $ touch newempty | |
42 | $ rm rmregular |
|
43 | $ rm rmregular | |
43 | $ echo exec >> exec |
|
44 | $ echo exec >> exec | |
44 | $ echo newexec > newexec |
|
45 | $ echo newexec > newexec | |
45 | $ echo bintoregular > bintoregular |
|
46 | $ echo bintoregular > bintoregular | |
46 | $ chmod +x newexec |
|
47 | $ chmod +x newexec | |
47 | $ rm rmexec |
|
48 | $ rm rmexec | |
48 | $ chmod +x setexec |
|
49 | $ chmod +x setexec | |
49 | $ chmod -x unsetexec |
|
50 | $ chmod -x unsetexec | |
50 | $ python -c "file('binary', 'wb').write('\0\0')" |
|
51 | $ python -c "file('binary', 'wb').write('\0\0')" | |
51 | $ python -c "file('newbinary', 'wb').write('\0')" |
|
52 | $ python -c "file('newbinary', 'wb').write('\0')" | |
52 | $ rm rmbinary |
|
53 | $ rm rmbinary | |
53 | $ hg addremove -s 0 |
|
54 | $ hg addremove -s 0 | |
54 | adding newbinary |
|
55 | adding newbinary | |
55 | adding newempty |
|
56 | adding newempty | |
56 | adding newexec |
|
57 | adding newexec | |
57 | adding newregular |
|
58 | adding newregular | |
58 | removing rmbinary |
|
59 | removing rmbinary | |
59 | removing rmempty |
|
60 | removing rmempty | |
60 | removing rmexec |
|
61 | removing rmexec | |
61 | removing rmregular |
|
62 | removing rmregular | |
62 |
|
63 | |||
63 | git=no: regular diff for all files |
|
64 | git=no: regular diff for all files | |
64 |
|
65 | |||
65 | $ hg autodiff --git=no |
|
66 | $ hg autodiff --git=no | |
66 | diff -r a66d19b9302d binary |
|
67 | diff -r a66d19b9302d binary | |
67 | Binary file binary has changed |
|
68 | Binary file binary has changed | |
68 | diff -r a66d19b9302d bintoregular |
|
69 | diff -r a66d19b9302d bintoregular | |
69 | Binary file bintoregular has changed |
|
70 | Binary file bintoregular has changed | |
70 | diff -r a66d19b9302d exec |
|
71 | diff -r a66d19b9302d exec | |
71 | --- a/exec |
|
72 | --- a/exec | |
72 | +++ b/exec |
|
73 | +++ b/exec | |
73 | @@ -1,1 +1,2 @@ |
|
74 | @@ -1,1 +1,2 @@ | |
74 | exec |
|
75 | exec | |
75 | +exec |
|
76 | +exec | |
76 | diff -r a66d19b9302d newbinary |
|
77 | diff -r a66d19b9302d newbinary | |
77 | Binary file newbinary has changed |
|
78 | Binary file newbinary has changed | |
78 | diff -r a66d19b9302d newexec |
|
79 | diff -r a66d19b9302d newexec | |
79 | --- /dev/null |
|
80 | --- /dev/null | |
80 | +++ b/newexec |
|
81 | +++ b/newexec | |
81 | @@ -0,0 +1,1 @@ |
|
82 | @@ -0,0 +1,1 @@ | |
82 | +newexec |
|
83 | +newexec | |
83 | diff -r a66d19b9302d newregular |
|
84 | diff -r a66d19b9302d newregular | |
84 | --- /dev/null |
|
85 | --- /dev/null | |
85 | +++ b/newregular |
|
86 | +++ b/newregular | |
86 | @@ -0,0 +1,1 @@ |
|
87 | @@ -0,0 +1,1 @@ | |
87 | +newregular |
|
88 | +newregular | |
88 | diff -r a66d19b9302d regular |
|
89 | diff -r a66d19b9302d regular | |
89 | --- a/regular |
|
90 | --- a/regular | |
90 | +++ b/regular |
|
91 | +++ b/regular | |
91 | @@ -1,1 +1,2 @@ |
|
92 | @@ -1,1 +1,2 @@ | |
92 | regular |
|
93 | regular | |
93 | +regular |
|
94 | +regular | |
94 | diff -r a66d19b9302d rmbinary |
|
95 | diff -r a66d19b9302d rmbinary | |
95 | Binary file rmbinary has changed |
|
96 | Binary file rmbinary has changed | |
96 | diff -r a66d19b9302d rmexec |
|
97 | diff -r a66d19b9302d rmexec | |
97 | --- a/rmexec |
|
98 | --- a/rmexec | |
98 | +++ /dev/null |
|
99 | +++ /dev/null | |
99 | @@ -1,1 +0,0 @@ |
|
100 | @@ -1,1 +0,0 @@ | |
100 | -rmexec |
|
101 | -rmexec | |
101 | diff -r a66d19b9302d rmregular |
|
102 | diff -r a66d19b9302d rmregular | |
102 | --- a/rmregular |
|
103 | --- a/rmregular | |
103 | +++ /dev/null |
|
104 | +++ /dev/null | |
104 | @@ -1,1 +0,0 @@ |
|
105 | @@ -1,1 +0,0 @@ | |
105 | -rmregular |
|
106 | -rmregular | |
106 |
|
107 | |||
107 | git=yes: git diff for single regular file |
|
108 | git=yes: git diff for single regular file | |
108 |
|
109 | |||
109 | $ hg autodiff --git=yes regular |
|
110 | $ hg autodiff --git=yes regular | |
110 | diff --git a/regular b/regular |
|
111 | diff --git a/regular b/regular | |
111 | --- a/regular |
|
112 | --- a/regular | |
112 | +++ b/regular |
|
113 | +++ b/regular | |
113 | @@ -1,1 +1,2 @@ |
|
114 | @@ -1,1 +1,2 @@ | |
114 | regular |
|
115 | regular | |
115 | +regular |
|
116 | +regular | |
116 |
|
117 | |||
117 | git=auto: regular diff for regular files and non-binary removals |
|
118 | git=auto: regular diff for regular files and non-binary removals | |
118 |
|
119 | |||
119 | $ hg autodiff --git=auto regular newregular rmregular rmexec |
|
120 | $ hg autodiff --git=auto regular newregular rmregular rmexec | |
120 | diff -r a66d19b9302d newregular |
|
121 | diff -r a66d19b9302d newregular | |
121 | --- /dev/null |
|
122 | --- /dev/null | |
122 | +++ b/newregular |
|
123 | +++ b/newregular | |
123 | @@ -0,0 +1,1 @@ |
|
124 | @@ -0,0 +1,1 @@ | |
124 | +newregular |
|
125 | +newregular | |
125 | diff -r a66d19b9302d regular |
|
126 | diff -r a66d19b9302d regular | |
126 | --- a/regular |
|
127 | --- a/regular | |
127 | +++ b/regular |
|
128 | +++ b/regular | |
128 | @@ -1,1 +1,2 @@ |
|
129 | @@ -1,1 +1,2 @@ | |
129 | regular |
|
130 | regular | |
130 | +regular |
|
131 | +regular | |
131 | diff -r a66d19b9302d rmexec |
|
132 | diff -r a66d19b9302d rmexec | |
132 | --- a/rmexec |
|
133 | --- a/rmexec | |
133 | +++ /dev/null |
|
134 | +++ /dev/null | |
134 | @@ -1,1 +0,0 @@ |
|
135 | @@ -1,1 +0,0 @@ | |
135 | -rmexec |
|
136 | -rmexec | |
136 | diff -r a66d19b9302d rmregular |
|
137 | diff -r a66d19b9302d rmregular | |
137 | --- a/rmregular |
|
138 | --- a/rmregular | |
138 | +++ /dev/null |
|
139 | +++ /dev/null | |
139 | @@ -1,1 +0,0 @@ |
|
140 | @@ -1,1 +0,0 @@ | |
140 | -rmregular |
|
141 | -rmregular | |
141 |
|
142 | |||
142 | $ for f in exec newexec setexec unsetexec binary newbinary newempty rmempty rmbinary bintoregular; do |
|
143 | $ for f in exec newexec setexec unsetexec binary newbinary newempty rmempty rmbinary bintoregular; do | |
143 | > echo |
|
144 | > echo | |
144 | > echo '% git=auto: git diff for' $f |
|
145 | > echo '% git=auto: git diff for' $f | |
145 | > hg autodiff --git=auto $f |
|
146 | > hg autodiff --git=auto $f | |
146 | > done |
|
147 | > done | |
147 |
|
148 | |||
148 | % git=auto: git diff for exec |
|
149 | % git=auto: git diff for exec | |
149 | diff -r a66d19b9302d exec |
|
150 | diff -r a66d19b9302d exec | |
150 | --- a/exec |
|
151 | --- a/exec | |
151 | +++ b/exec |
|
152 | +++ b/exec | |
152 | @@ -1,1 +1,2 @@ |
|
153 | @@ -1,1 +1,2 @@ | |
153 | exec |
|
154 | exec | |
154 | +exec |
|
155 | +exec | |
155 |
|
156 | |||
156 | % git=auto: git diff for newexec |
|
157 | % git=auto: git diff for newexec | |
157 | diff --git a/newexec b/newexec |
|
158 | diff --git a/newexec b/newexec | |
158 | new file mode 100755 |
|
159 | new file mode 100755 | |
159 | --- /dev/null |
|
160 | --- /dev/null | |
160 | +++ b/newexec |
|
161 | +++ b/newexec | |
161 | @@ -0,0 +1,1 @@ |
|
162 | @@ -0,0 +1,1 @@ | |
162 | +newexec |
|
163 | +newexec | |
163 |
|
164 | |||
164 | % git=auto: git diff for setexec |
|
165 | % git=auto: git diff for setexec | |
165 | diff --git a/setexec b/setexec |
|
166 | diff --git a/setexec b/setexec | |
166 | old mode 100644 |
|
167 | old mode 100644 | |
167 | new mode 100755 |
|
168 | new mode 100755 | |
168 |
|
169 | |||
169 | % git=auto: git diff for unsetexec |
|
170 | % git=auto: git diff for unsetexec | |
170 | diff --git a/unsetexec b/unsetexec |
|
171 | diff --git a/unsetexec b/unsetexec | |
171 | old mode 100755 |
|
172 | old mode 100755 | |
172 | new mode 100644 |
|
173 | new mode 100644 | |
173 |
|
174 | |||
174 | % git=auto: git diff for binary |
|
175 | % git=auto: git diff for binary | |
175 | diff --git a/binary b/binary |
|
176 | diff --git a/binary b/binary | |
176 | index a9128c283485202893f5af379dd9beccb6e79486..09f370e38f498a462e1ca0faa724559b6630c04f |
|
177 | index a9128c283485202893f5af379dd9beccb6e79486..09f370e38f498a462e1ca0faa724559b6630c04f | |
177 | GIT binary patch |
|
178 | GIT binary patch | |
178 | literal 2 |
|
179 | literal 2 | |
179 | Jc${Nk0000200961 |
|
180 | Jc${Nk0000200961 | |
180 |
|
181 | |||
181 |
|
182 | |||
182 | % git=auto: git diff for newbinary |
|
183 | % git=auto: git diff for newbinary | |
183 | diff --git a/newbinary b/newbinary |
|
184 | diff --git a/newbinary b/newbinary | |
184 | new file mode 100644 |
|
185 | new file mode 100644 | |
185 | index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d |
|
186 | index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d | |
186 | GIT binary patch |
|
187 | GIT binary patch | |
187 | literal 1 |
|
188 | literal 1 | |
188 | Ic${MZ000310RR91 |
|
189 | Ic${MZ000310RR91 | |
189 |
|
190 | |||
190 |
|
191 | |||
191 | % git=auto: git diff for newempty |
|
192 | % git=auto: git diff for newempty | |
192 | diff --git a/newempty b/newempty |
|
193 | diff --git a/newempty b/newempty | |
193 | new file mode 100644 |
|
194 | new file mode 100644 | |
194 |
|
195 | |||
195 | % git=auto: git diff for rmempty |
|
196 | % git=auto: git diff for rmempty | |
196 | diff --git a/rmempty b/rmempty |
|
197 | diff --git a/rmempty b/rmempty | |
197 | deleted file mode 100644 |
|
198 | deleted file mode 100644 | |
198 |
|
199 | |||
199 | % git=auto: git diff for rmbinary |
|
200 | % git=auto: git diff for rmbinary | |
200 | diff --git a/rmbinary b/rmbinary |
|
201 | diff --git a/rmbinary b/rmbinary | |
201 | deleted file mode 100644 |
|
202 | deleted file mode 100644 | |
202 | Binary file rmbinary has changed |
|
203 | Binary file rmbinary has changed | |
203 |
|
204 | |||
204 | % git=auto: git diff for bintoregular |
|
205 | % git=auto: git diff for bintoregular | |
205 | diff --git a/bintoregular b/bintoregular |
|
206 | diff --git a/bintoregular b/bintoregular | |
206 | index f76dd238ade08917e6712764a16a22005a50573d..9c42f2b6427d8bf034b7bc23986152dc01bfd3ab |
|
207 | index f76dd238ade08917e6712764a16a22005a50573d..9c42f2b6427d8bf034b7bc23986152dc01bfd3ab | |
207 | GIT binary patch |
|
208 | GIT binary patch | |
208 | literal 13 |
|
209 | literal 13 | |
209 | Uc$`bh%qz(+N=+}#Ni5<5043uE82|tP |
|
210 | Uc$`bh%qz(+N=+}#Ni5<5043uE82|tP | |
210 |
|
211 | |||
211 |
|
212 | |||
212 | git=warn: regular diff with data loss warnings |
|
213 | git=warn: regular diff with data loss warnings | |
213 |
|
214 | |||
214 | $ hg autodiff --git=warn |
|
215 | $ hg autodiff --git=warn | |
215 | diff -r a66d19b9302d binary |
|
216 | diff -r a66d19b9302d binary | |
216 | Binary file binary has changed |
|
217 | Binary file binary has changed | |
217 | diff -r a66d19b9302d bintoregular |
|
218 | diff -r a66d19b9302d bintoregular | |
218 | Binary file bintoregular has changed |
|
219 | Binary file bintoregular has changed | |
219 | diff -r a66d19b9302d exec |
|
220 | diff -r a66d19b9302d exec | |
220 | --- a/exec |
|
221 | --- a/exec | |
221 | +++ b/exec |
|
222 | +++ b/exec | |
222 | @@ -1,1 +1,2 @@ |
|
223 | @@ -1,1 +1,2 @@ | |
223 | exec |
|
224 | exec | |
224 | +exec |
|
225 | +exec | |
225 | diff -r a66d19b9302d newbinary |
|
226 | diff -r a66d19b9302d newbinary | |
226 | Binary file newbinary has changed |
|
227 | Binary file newbinary has changed | |
227 | diff -r a66d19b9302d newexec |
|
228 | diff -r a66d19b9302d newexec | |
228 | --- /dev/null |
|
229 | --- /dev/null | |
229 | +++ b/newexec |
|
230 | +++ b/newexec | |
230 | @@ -0,0 +1,1 @@ |
|
231 | @@ -0,0 +1,1 @@ | |
231 | +newexec |
|
232 | +newexec | |
232 | diff -r a66d19b9302d newregular |
|
233 | diff -r a66d19b9302d newregular | |
233 | --- /dev/null |
|
234 | --- /dev/null | |
234 | +++ b/newregular |
|
235 | +++ b/newregular | |
235 | @@ -0,0 +1,1 @@ |
|
236 | @@ -0,0 +1,1 @@ | |
236 | +newregular |
|
237 | +newregular | |
237 | diff -r a66d19b9302d regular |
|
238 | diff -r a66d19b9302d regular | |
238 | --- a/regular |
|
239 | --- a/regular | |
239 | +++ b/regular |
|
240 | +++ b/regular | |
240 | @@ -1,1 +1,2 @@ |
|
241 | @@ -1,1 +1,2 @@ | |
241 | regular |
|
242 | regular | |
242 | +regular |
|
243 | +regular | |
243 | diff -r a66d19b9302d rmbinary |
|
244 | diff -r a66d19b9302d rmbinary | |
244 | Binary file rmbinary has changed |
|
245 | Binary file rmbinary has changed | |
245 | diff -r a66d19b9302d rmexec |
|
246 | diff -r a66d19b9302d rmexec | |
246 | --- a/rmexec |
|
247 | --- a/rmexec | |
247 | +++ /dev/null |
|
248 | +++ /dev/null | |
248 | @@ -1,1 +0,0 @@ |
|
249 | @@ -1,1 +0,0 @@ | |
249 | -rmexec |
|
250 | -rmexec | |
250 | diff -r a66d19b9302d rmregular |
|
251 | diff -r a66d19b9302d rmregular | |
251 | --- a/rmregular |
|
252 | --- a/rmregular | |
252 | +++ /dev/null |
|
253 | +++ /dev/null | |
253 | @@ -1,1 +0,0 @@ |
|
254 | @@ -1,1 +0,0 @@ | |
254 | -rmregular |
|
255 | -rmregular | |
255 | data lost for: binary |
|
256 | data lost for: binary | |
256 | data lost for: bintoregular |
|
257 | data lost for: bintoregular | |
257 | data lost for: newbinary |
|
258 | data lost for: newbinary | |
258 | data lost for: newempty |
|
259 | data lost for: newempty | |
259 | data lost for: newexec |
|
260 | data lost for: newexec | |
260 | data lost for: rmbinary |
|
261 | data lost for: rmbinary | |
261 | data lost for: rmempty |
|
262 | data lost for: rmempty | |
262 | data lost for: setexec |
|
263 | data lost for: setexec | |
263 | data lost for: unsetexec |
|
264 | data lost for: unsetexec | |
264 |
|
265 | |||
265 | git=abort: fail on execute bit change |
|
266 | git=abort: fail on execute bit change | |
266 |
|
267 | |||
267 | $ hg autodiff --git=abort regular setexec |
|
268 | $ hg autodiff --git=abort regular setexec | |
268 | abort: losing data for setexec |
|
269 | abort: losing data for setexec | |
269 | [255] |
|
270 | [255] | |
270 |
|
271 | |||
271 | git=abort: succeed on regular file |
|
272 | git=abort: succeed on regular file | |
272 |
|
273 | |||
273 | $ hg autodiff --git=abort regular |
|
274 | $ hg autodiff --git=abort regular | |
274 | diff -r a66d19b9302d regular |
|
275 | diff -r a66d19b9302d regular | |
275 | --- a/regular |
|
276 | --- a/regular | |
276 | +++ b/regular |
|
277 | +++ b/regular | |
277 | @@ -1,1 +1,2 @@ |
|
278 | @@ -1,1 +1,2 @@ | |
278 | regular |
|
279 | regular | |
279 | +regular |
|
280 | +regular | |
280 |
|
281 | |||
281 | $ cd .. |
|
282 | $ cd .. | |
282 |
|
283 |
@@ -1,198 +1,198 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink || exit 80 |
|
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 | |
2 |
|
2 | |||
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "extdiff=" >> $HGRCPATH |
|
4 | $ echo "extdiff=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | $ hg init a |
|
6 | $ hg init a | |
7 | $ cd a |
|
7 | $ cd a | |
8 | $ echo a > a |
|
8 | $ echo a > a | |
9 | $ echo b > b |
|
9 | $ echo b > b | |
10 | $ hg add |
|
10 | $ hg add | |
11 | adding a |
|
11 | adding a | |
12 | adding b |
|
12 | adding b | |
13 |
|
13 | |||
14 | Should diff cloned directories: |
|
14 | Should diff cloned directories: | |
15 |
|
15 | |||
16 | $ hg extdiff -o -r $opt |
|
16 | $ hg extdiff -o -r $opt | |
17 | Only in a: a |
|
17 | Only in a: a | |
18 | Only in a: b |
|
18 | Only in a: b | |
19 | [1] |
|
19 | [1] | |
20 |
|
20 | |||
21 | $ echo "[extdiff]" >> $HGRCPATH |
|
21 | $ echo "[extdiff]" >> $HGRCPATH | |
22 | $ echo "cmd.falabala=echo" >> $HGRCPATH |
|
22 | $ echo "cmd.falabala=echo" >> $HGRCPATH | |
23 | $ echo "opts.falabala=diffing" >> $HGRCPATH |
|
23 | $ echo "opts.falabala=diffing" >> $HGRCPATH | |
24 |
|
24 | |||
25 | $ hg falabala |
|
25 | $ hg falabala | |
26 | diffing a.000000000000 a |
|
26 | diffing a.000000000000 a | |
27 | [1] |
|
27 | [1] | |
28 |
|
28 | |||
29 | $ hg help falabala |
|
29 | $ hg help falabala | |
30 | hg falabala [OPTION]... [FILE]... |
|
30 | hg falabala [OPTION]... [FILE]... | |
31 |
|
31 | |||
32 | use 'echo' to diff repository (or selected files) |
|
32 | use 'echo' to diff repository (or selected files) | |
33 |
|
33 | |||
34 | Show differences between revisions for the specified files, using the |
|
34 | Show differences between revisions for the specified files, using the | |
35 | 'echo' program. |
|
35 | 'echo' program. | |
36 |
|
36 | |||
37 | When two revision arguments are given, then changes are shown between |
|
37 | When two revision arguments are given, then changes are shown between | |
38 | those revisions. If only one revision is specified then that revision is |
|
38 | those revisions. If only one revision is specified then that revision is | |
39 | compared to the working directory, and, when no revisions are specified, |
|
39 | compared to the working directory, and, when no revisions are specified, | |
40 | the working directory files are compared to its parent. |
|
40 | the working directory files are compared to its parent. | |
41 |
|
41 | |||
42 | options: |
|
42 | options: | |
43 |
|
43 | |||
44 | -o --option OPT [+] pass option to comparison program |
|
44 | -o --option OPT [+] pass option to comparison program | |
45 | -r --rev REV [+] revision |
|
45 | -r --rev REV [+] revision | |
46 | -c --change REV change made by revision |
|
46 | -c --change REV change made by revision | |
47 | -I --include PATTERN [+] include names matching the given patterns |
|
47 | -I --include PATTERN [+] include names matching the given patterns | |
48 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
48 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
49 |
|
49 | |||
50 | [+] marked option can be specified multiple times |
|
50 | [+] marked option can be specified multiple times | |
51 |
|
51 | |||
52 | use "hg -v help falabala" to show more info |
|
52 | use "hg -v help falabala" to show more info | |
53 |
|
53 | |||
54 | $ hg ci -d '0 0' -mtest1 |
|
54 | $ hg ci -d '0 0' -mtest1 | |
55 |
|
55 | |||
56 | $ echo b >> a |
|
56 | $ echo b >> a | |
57 | $ hg ci -d '1 0' -mtest2 |
|
57 | $ hg ci -d '1 0' -mtest2 | |
58 |
|
58 | |||
59 | Should diff cloned files directly: |
|
59 | Should diff cloned files directly: | |
60 |
|
60 | |||
61 | $ hg falabala -r 0:1 |
|
61 | $ hg falabala -r 0:1 | |
62 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
62 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
63 | [1] |
|
63 | [1] | |
64 |
|
64 | |||
65 | Test diff during merge: |
|
65 | Test diff during merge: | |
66 |
|
66 | |||
67 | $ hg update -C 0 |
|
67 | $ hg update -C 0 | |
68 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
68 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 | $ echo c >> c |
|
69 | $ echo c >> c | |
70 | $ hg add c |
|
70 | $ hg add c | |
71 | $ hg ci -m "new branch" -d '1 0' |
|
71 | $ hg ci -m "new branch" -d '1 0' | |
72 | created new head |
|
72 | created new head | |
73 | $ hg merge 1 |
|
73 | $ hg merge 1 | |
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
75 | (branch merge, don't forget to commit) |
|
75 | (branch merge, don't forget to commit) | |
76 |
|
76 | |||
77 | Should diff cloned file against wc file: |
|
77 | Should diff cloned file against wc file: | |
78 |
|
78 | |||
79 | $ hg falabala |
|
79 | $ hg falabala | |
80 | diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob) |
|
80 | diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob) | |
81 | [1] |
|
81 | [1] | |
82 |
|
82 | |||
83 |
|
83 | |||
84 | Test --change option: |
|
84 | Test --change option: | |
85 |
|
85 | |||
86 | $ hg ci -d '2 0' -mtest3 |
|
86 | $ hg ci -d '2 0' -mtest3 | |
87 | $ hg falabala -c 1 |
|
87 | $ hg falabala -c 1 | |
88 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
88 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
89 | [1] |
|
89 | [1] | |
90 |
|
90 | |||
91 | Check diff are made from the first parent: |
|
91 | Check diff are made from the first parent: | |
92 |
|
92 | |||
93 | $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code" |
|
93 | $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code" | |
94 | diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob) |
|
94 | diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob) | |
95 | diff-like tools yield a non-zero exit code |
|
95 | diff-like tools yield a non-zero exit code | |
96 |
|
96 | |||
97 | Test extdiff of multiple files in tmp dir: |
|
97 | Test extdiff of multiple files in tmp dir: | |
98 |
|
98 | |||
99 | $ hg update -C 0 > /dev/null |
|
99 | $ hg update -C 0 > /dev/null | |
100 | $ echo changed > a |
|
100 | $ echo changed > a | |
101 | $ echo changed > b |
|
101 | $ echo changed > b | |
102 | $ chmod +x b |
|
102 | $ chmod +x b | |
103 |
|
103 | |||
104 | Diff in working directory, before: |
|
104 | Diff in working directory, before: | |
105 |
|
105 | |||
106 | $ hg diff --git |
|
106 | $ hg diff --git | |
107 | diff --git a/a b/a |
|
107 | diff --git a/a b/a | |
108 | --- a/a |
|
108 | --- a/a | |
109 | +++ b/a |
|
109 | +++ b/a | |
110 | @@ -1,1 +1,1 @@ |
|
110 | @@ -1,1 +1,1 @@ | |
111 | -a |
|
111 | -a | |
112 | +changed |
|
112 | +changed | |
113 | diff --git a/b b/b |
|
113 | diff --git a/b b/b | |
114 | old mode 100644 |
|
114 | old mode 100644 | |
115 | new mode 100755 |
|
115 | new mode 100755 | |
116 | --- a/b |
|
116 | --- a/b | |
117 | +++ b/b |
|
117 | +++ b/b | |
118 | @@ -1,1 +1,1 @@ |
|
118 | @@ -1,1 +1,1 @@ | |
119 | -b |
|
119 | -b | |
120 | +changed |
|
120 | +changed | |
121 |
|
121 | |||
122 |
|
122 | |||
123 | Edit with extdiff -p: |
|
123 | Edit with extdiff -p: | |
124 |
|
124 | |||
125 | Prepare custom diff/edit tool: |
|
125 | Prepare custom diff/edit tool: | |
126 |
|
126 | |||
127 | $ cat > 'diff tool.py' << EOT |
|
127 | $ cat > 'diff tool.py' << EOT | |
128 | > #!/usr/bin/env python |
|
128 | > #!/usr/bin/env python | |
129 | > import time |
|
129 | > import time | |
130 | > time.sleep(1) # avoid unchanged-timestamp problems |
|
130 | > time.sleep(1) # avoid unchanged-timestamp problems | |
131 | > file('a/a', 'ab').write('edited\n') |
|
131 | > file('a/a', 'ab').write('edited\n') | |
132 | > file('a/b', 'ab').write('edited\n') |
|
132 | > file('a/b', 'ab').write('edited\n') | |
133 | > EOT |
|
133 | > EOT | |
134 |
|
134 | |||
135 | $ chmod +x 'diff tool.py' |
|
135 | $ chmod +x 'diff tool.py' | |
136 |
|
136 | |||
137 | will change to /tmp/extdiff.TMP and populate directories a.TMP and a |
|
137 | will change to /tmp/extdiff.TMP and populate directories a.TMP and a | |
138 | and start tool |
|
138 | and start tool | |
139 |
|
139 | |||
140 | $ hg extdiff -p "`pwd`/diff tool.py" |
|
140 | $ hg extdiff -p "`pwd`/diff tool.py" | |
141 | [1] |
|
141 | [1] | |
142 |
|
142 | |||
143 | Diff in working directory, after: |
|
143 | Diff in working directory, after: | |
144 |
|
144 | |||
145 | $ hg diff --git |
|
145 | $ hg diff --git | |
146 | diff --git a/a b/a |
|
146 | diff --git a/a b/a | |
147 | --- a/a |
|
147 | --- a/a | |
148 | +++ b/a |
|
148 | +++ b/a | |
149 | @@ -1,1 +1,2 @@ |
|
149 | @@ -1,1 +1,2 @@ | |
150 | -a |
|
150 | -a | |
151 | +changed |
|
151 | +changed | |
152 | +edited |
|
152 | +edited | |
153 | diff --git a/b b/b |
|
153 | diff --git a/b b/b | |
154 | old mode 100644 |
|
154 | old mode 100644 | |
155 | new mode 100755 |
|
155 | new mode 100755 | |
156 | --- a/b |
|
156 | --- a/b | |
157 | +++ b/b |
|
157 | +++ b/b | |
158 | @@ -1,1 +1,2 @@ |
|
158 | @@ -1,1 +1,2 @@ | |
159 | -b |
|
159 | -b | |
160 | +changed |
|
160 | +changed | |
161 | +edited |
|
161 | +edited | |
162 |
|
162 | |||
163 | Test extdiff with --option: |
|
163 | Test extdiff with --option: | |
164 |
|
164 | |||
165 | $ hg extdiff -p echo -o this -c 1 |
|
165 | $ hg extdiff -p echo -o this -c 1 | |
166 | this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
166 | this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
167 | [1] |
|
167 | [1] | |
168 |
|
168 | |||
169 | $ hg falabala -o this -c 1 |
|
169 | $ hg falabala -o this -c 1 | |
170 | diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
170 | diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
171 | [1] |
|
171 | [1] | |
172 |
|
172 | |||
173 | Test with revsets: |
|
173 | Test with revsets: | |
174 |
|
174 | |||
175 | $ hg extdif -p echo -c "rev(1)" |
|
175 | $ hg extdif -p echo -c "rev(1)" | |
176 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
176 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
177 | [1] |
|
177 | [1] | |
178 |
|
178 | |||
179 | $ hg extdif -p echo -r "0::1" |
|
179 | $ hg extdif -p echo -r "0::1" | |
180 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
180 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
181 | [1] |
|
181 | [1] | |
182 |
|
182 | |||
183 | $ cd .. |
|
183 | $ cd .. | |
184 |
|
184 | |||
185 | Test symlinks handling (issue1909) |
|
185 | Test symlinks handling (issue1909) | |
186 |
|
186 | |||
187 | $ hg init testsymlinks |
|
187 | $ hg init testsymlinks | |
188 | $ cd testsymlinks |
|
188 | $ cd testsymlinks | |
189 | $ echo a > a |
|
189 | $ echo a > a | |
190 | $ hg ci -Am adda |
|
190 | $ hg ci -Am adda | |
191 | adding a |
|
191 | adding a | |
192 | $ echo a >> a |
|
192 | $ echo a >> a | |
193 | $ ln -s missing linka |
|
193 | $ ln -s missing linka | |
194 | $ hg add linka |
|
194 | $ hg add linka | |
195 | $ hg falabala -r 0 --traceback |
|
195 | $ hg falabala -r 0 --traceback | |
196 | diffing testsymlinks.07f494440405 testsymlinks |
|
196 | diffing testsymlinks.07f494440405 testsymlinks | |
197 | [1] |
|
197 | [1] | |
198 | $ cd .. |
|
198 | $ cd .. |
@@ -1,147 +1,149 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | $ umask 027 |
|
3 | $ umask 027 | |
2 |
|
4 | |||
3 | $ hg init test1 |
|
5 | $ hg init test1 | |
4 | $ cd test1 |
|
6 | $ cd test1 | |
5 | $ touch a b |
|
7 | $ touch a b | |
6 | $ hg add a b |
|
8 | $ hg add a b | |
7 | $ hg ci -m "added a b" |
|
9 | $ hg ci -m "added a b" | |
8 |
|
10 | |||
9 | $ cd .. |
|
11 | $ cd .. | |
10 | $ hg clone test1 test3 |
|
12 | $ hg clone test1 test3 | |
11 | updating to branch default |
|
13 | updating to branch default | |
12 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
13 |
|
15 | |||
14 | $ hg init test2 |
|
16 | $ hg init test2 | |
15 | $ cd test2 |
|
17 | $ cd test2 | |
16 | $ hg pull ../test1 |
|
18 | $ hg pull ../test1 | |
17 | pulling from ../test1 |
|
19 | pulling from ../test1 | |
18 | requesting all changes |
|
20 | requesting all changes | |
19 | adding changesets |
|
21 | adding changesets | |
20 | adding manifests |
|
22 | adding manifests | |
21 | adding file changes |
|
23 | adding file changes | |
22 | added 1 changesets with 2 changes to 2 files |
|
24 | added 1 changesets with 2 changes to 2 files | |
23 | (run 'hg update' to get a working copy) |
|
25 | (run 'hg update' to get a working copy) | |
24 | $ hg co |
|
26 | $ hg co | |
25 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
26 | $ chmod +x a |
|
28 | $ chmod +x a | |
27 | $ hg ci -m "chmod +x a" |
|
29 | $ hg ci -m "chmod +x a" | |
28 |
|
30 | |||
29 | the changelog should mention file a: |
|
31 | the changelog should mention file a: | |
30 |
|
32 | |||
31 | $ hg tip --template '{files}\n' |
|
33 | $ hg tip --template '{files}\n' | |
32 | a |
|
34 | a | |
33 |
|
35 | |||
34 | $ cd ../test1 |
|
36 | $ cd ../test1 | |
35 | $ echo 123 >>a |
|
37 | $ echo 123 >>a | |
36 | $ hg ci -m "a updated" |
|
38 | $ hg ci -m "a updated" | |
37 |
|
39 | |||
38 | $ hg pull ../test2 |
|
40 | $ hg pull ../test2 | |
39 | pulling from ../test2 |
|
41 | pulling from ../test2 | |
40 | searching for changes |
|
42 | searching for changes | |
41 | adding changesets |
|
43 | adding changesets | |
42 | adding manifests |
|
44 | adding manifests | |
43 | adding file changes |
|
45 | adding file changes | |
44 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
46 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
45 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
47 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
46 | $ hg heads |
|
48 | $ hg heads | |
47 | changeset: 2:7f4313b42a34 |
|
49 | changeset: 2:7f4313b42a34 | |
48 | tag: tip |
|
50 | tag: tip | |
49 | parent: 0:22a449e20da5 |
|
51 | parent: 0:22a449e20da5 | |
50 | user: test |
|
52 | user: test | |
51 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
52 | summary: chmod +x a |
|
54 | summary: chmod +x a | |
53 |
|
55 | |||
54 | changeset: 1:c6ecefc45368 |
|
56 | changeset: 1:c6ecefc45368 | |
55 | user: test |
|
57 | user: test | |
56 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
57 | summary: a updated |
|
59 | summary: a updated | |
58 |
|
60 | |||
59 | $ hg history |
|
61 | $ hg history | |
60 | changeset: 2:7f4313b42a34 |
|
62 | changeset: 2:7f4313b42a34 | |
61 | tag: tip |
|
63 | tag: tip | |
62 | parent: 0:22a449e20da5 |
|
64 | parent: 0:22a449e20da5 | |
63 | user: test |
|
65 | user: test | |
64 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
66 | date: Thu Jan 01 00:00:00 1970 +0000 | |
65 | summary: chmod +x a |
|
67 | summary: chmod +x a | |
66 |
|
68 | |||
67 | changeset: 1:c6ecefc45368 |
|
69 | changeset: 1:c6ecefc45368 | |
68 | user: test |
|
70 | user: test | |
69 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
71 | date: Thu Jan 01 00:00:00 1970 +0000 | |
70 | summary: a updated |
|
72 | summary: a updated | |
71 |
|
73 | |||
72 | changeset: 0:22a449e20da5 |
|
74 | changeset: 0:22a449e20da5 | |
73 | user: test |
|
75 | user: test | |
74 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
76 | date: Thu Jan 01 00:00:00 1970 +0000 | |
75 | summary: added a b |
|
77 | summary: added a b | |
76 |
|
78 | |||
77 |
|
79 | |||
78 | $ hg -v merge |
|
80 | $ hg -v merge | |
79 | resolving manifests |
|
81 | resolving manifests | |
80 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
82 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
81 | (branch merge, don't forget to commit) |
|
83 | (branch merge, don't forget to commit) | |
82 |
|
84 | |||
83 | $ cd ../test3 |
|
85 | $ cd ../test3 | |
84 | $ echo 123 >>b |
|
86 | $ echo 123 >>b | |
85 | $ hg ci -m "b updated" |
|
87 | $ hg ci -m "b updated" | |
86 |
|
88 | |||
87 | $ hg pull ../test2 |
|
89 | $ hg pull ../test2 | |
88 | pulling from ../test2 |
|
90 | pulling from ../test2 | |
89 | searching for changes |
|
91 | searching for changes | |
90 | adding changesets |
|
92 | adding changesets | |
91 | adding manifests |
|
93 | adding manifests | |
92 | adding file changes |
|
94 | adding file changes | |
93 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
95 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
94 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
96 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
95 | $ hg heads |
|
97 | $ hg heads | |
96 | changeset: 2:7f4313b42a34 |
|
98 | changeset: 2:7f4313b42a34 | |
97 | tag: tip |
|
99 | tag: tip | |
98 | parent: 0:22a449e20da5 |
|
100 | parent: 0:22a449e20da5 | |
99 | user: test |
|
101 | user: test | |
100 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
102 | date: Thu Jan 01 00:00:00 1970 +0000 | |
101 | summary: chmod +x a |
|
103 | summary: chmod +x a | |
102 |
|
104 | |||
103 | changeset: 1:dc57ead75f79 |
|
105 | changeset: 1:dc57ead75f79 | |
104 | user: test |
|
106 | user: test | |
105 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
107 | date: Thu Jan 01 00:00:00 1970 +0000 | |
106 | summary: b updated |
|
108 | summary: b updated | |
107 |
|
109 | |||
108 | $ hg history |
|
110 | $ hg history | |
109 | changeset: 2:7f4313b42a34 |
|
111 | changeset: 2:7f4313b42a34 | |
110 | tag: tip |
|
112 | tag: tip | |
111 | parent: 0:22a449e20da5 |
|
113 | parent: 0:22a449e20da5 | |
112 | user: test |
|
114 | user: test | |
113 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
115 | date: Thu Jan 01 00:00:00 1970 +0000 | |
114 | summary: chmod +x a |
|
116 | summary: chmod +x a | |
115 |
|
117 | |||
116 | changeset: 1:dc57ead75f79 |
|
118 | changeset: 1:dc57ead75f79 | |
117 | user: test |
|
119 | user: test | |
118 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
120 | date: Thu Jan 01 00:00:00 1970 +0000 | |
119 | summary: b updated |
|
121 | summary: b updated | |
120 |
|
122 | |||
121 | changeset: 0:22a449e20da5 |
|
123 | changeset: 0:22a449e20da5 | |
122 | user: test |
|
124 | user: test | |
123 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
124 | summary: added a b |
|
126 | summary: added a b | |
125 |
|
127 | |||
126 |
|
128 | |||
127 | $ hg -v merge |
|
129 | $ hg -v merge | |
128 | resolving manifests |
|
130 | resolving manifests | |
129 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
131 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
130 | (branch merge, don't forget to commit) |
|
132 | (branch merge, don't forget to commit) | |
131 |
|
133 | |||
132 | $ ls -l ../test[123]/a > foo |
|
134 | $ ls -l ../test[123]/a > foo | |
133 | $ cut -b 1-10 < foo |
|
135 | $ cut -b 1-10 < foo | |
134 | -rwxr-x--- |
|
136 | -rwxr-x--- | |
135 | -rwxr-x--- |
|
137 | -rwxr-x--- | |
136 | -rwxr-x--- |
|
138 | -rwxr-x--- | |
137 |
|
139 | |||
138 | $ hg debugindex a |
|
140 | $ hg debugindex a | |
139 | rev offset length base linkrev nodeid p1 p2 |
|
141 | rev offset length base linkrev nodeid p1 p2 | |
140 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
142 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 | |
141 | $ hg debugindex -R ../test2 a |
|
143 | $ hg debugindex -R ../test2 a | |
142 | rev offset length base linkrev nodeid p1 p2 |
|
144 | rev offset length base linkrev nodeid p1 p2 | |
143 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
145 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 | |
144 | $ hg debugindex -R ../test1 a |
|
146 | $ hg debugindex -R ../test1 a | |
145 | rev offset length base linkrev nodeid p1 p2 |
|
147 | rev offset length base linkrev nodeid p1 p2 | |
146 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
148 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 | |
147 | 1 0 5 1 1 7fe919cc0336 b80de5d13875 000000000000 |
|
149 | 1 0 5 1 1 7fe919cc0336 b80de5d13875 000000000000 |
@@ -1,349 +1,351 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | $ hg init |
|
3 | $ hg init | |
2 | $ echo start > start |
|
4 | $ echo start > start | |
3 | $ hg ci -Amstart |
|
5 | $ hg ci -Amstart | |
4 | adding start |
|
6 | adding start | |
5 |
|
7 | |||
6 | New file: |
|
8 | New file: | |
7 |
|
9 | |||
8 | $ echo new > new |
|
10 | $ echo new > new | |
9 | $ hg ci -Amnew |
|
11 | $ hg ci -Amnew | |
10 | adding new |
|
12 | adding new | |
11 | $ hg diff --git -r 0 |
|
13 | $ hg diff --git -r 0 | |
12 | diff --git a/new b/new |
|
14 | diff --git a/new b/new | |
13 | new file mode 100644 |
|
15 | new file mode 100644 | |
14 | --- /dev/null |
|
16 | --- /dev/null | |
15 | +++ b/new |
|
17 | +++ b/new | |
16 | @@ -0,0 +1,1 @@ |
|
18 | @@ -0,0 +1,1 @@ | |
17 | +new |
|
19 | +new | |
18 |
|
20 | |||
19 | Copy: |
|
21 | Copy: | |
20 |
|
22 | |||
21 | $ hg cp new copy |
|
23 | $ hg cp new copy | |
22 | $ hg ci -mcopy |
|
24 | $ hg ci -mcopy | |
23 | $ hg diff --git -r 1:tip |
|
25 | $ hg diff --git -r 1:tip | |
24 | diff --git a/new b/copy |
|
26 | diff --git a/new b/copy | |
25 | copy from new |
|
27 | copy from new | |
26 | copy to copy |
|
28 | copy to copy | |
27 |
|
29 | |||
28 | Rename: |
|
30 | Rename: | |
29 |
|
31 | |||
30 | $ hg mv copy rename |
|
32 | $ hg mv copy rename | |
31 | $ hg ci -mrename |
|
33 | $ hg ci -mrename | |
32 | $ hg diff --git -r 2:tip |
|
34 | $ hg diff --git -r 2:tip | |
33 | diff --git a/copy b/rename |
|
35 | diff --git a/copy b/rename | |
34 | rename from copy |
|
36 | rename from copy | |
35 | rename to rename |
|
37 | rename to rename | |
36 |
|
38 | |||
37 | Delete: |
|
39 | Delete: | |
38 |
|
40 | |||
39 | $ hg rm rename |
|
41 | $ hg rm rename | |
40 | $ hg ci -mdelete |
|
42 | $ hg ci -mdelete | |
41 | $ hg diff --git -r 3:tip |
|
43 | $ hg diff --git -r 3:tip | |
42 | diff --git a/rename b/rename |
|
44 | diff --git a/rename b/rename | |
43 | deleted file mode 100644 |
|
45 | deleted file mode 100644 | |
44 | --- a/rename |
|
46 | --- a/rename | |
45 | +++ /dev/null |
|
47 | +++ /dev/null | |
46 | @@ -1,1 +0,0 @@ |
|
48 | @@ -1,1 +0,0 @@ | |
47 | -new |
|
49 | -new | |
48 |
|
50 | |||
49 | $ cat > src <<EOF |
|
51 | $ cat > src <<EOF | |
50 | > 1 |
|
52 | > 1 | |
51 | > 2 |
|
53 | > 2 | |
52 | > 3 |
|
54 | > 3 | |
53 | > 4 |
|
55 | > 4 | |
54 | > 5 |
|
56 | > 5 | |
55 | > EOF |
|
57 | > EOF | |
56 | $ hg ci -Amsrc |
|
58 | $ hg ci -Amsrc | |
57 | adding src |
|
59 | adding src | |
58 |
|
60 | |||
59 | chmod 644: |
|
61 | chmod 644: | |
60 |
|
62 | |||
61 | $ chmod +x src |
|
63 | $ chmod +x src | |
62 | $ hg ci -munexec |
|
64 | $ hg ci -munexec | |
63 | $ hg diff --git -r 5:tip |
|
65 | $ hg diff --git -r 5:tip | |
64 | diff --git a/src b/src |
|
66 | diff --git a/src b/src | |
65 | old mode 100644 |
|
67 | old mode 100644 | |
66 | new mode 100755 |
|
68 | new mode 100755 | |
67 |
|
69 | |||
68 | Rename+mod+chmod: |
|
70 | Rename+mod+chmod: | |
69 |
|
71 | |||
70 | $ hg mv src dst |
|
72 | $ hg mv src dst | |
71 | $ chmod -x dst |
|
73 | $ chmod -x dst | |
72 | $ echo a >> dst |
|
74 | $ echo a >> dst | |
73 | $ hg ci -mrenamemod |
|
75 | $ hg ci -mrenamemod | |
74 | $ hg diff --git -r 6:tip |
|
76 | $ hg diff --git -r 6:tip | |
75 | diff --git a/src b/dst |
|
77 | diff --git a/src b/dst | |
76 | old mode 100755 |
|
78 | old mode 100755 | |
77 | new mode 100644 |
|
79 | new mode 100644 | |
78 | rename from src |
|
80 | rename from src | |
79 | rename to dst |
|
81 | rename to dst | |
80 | --- a/src |
|
82 | --- a/src | |
81 | +++ b/dst |
|
83 | +++ b/dst | |
82 | @@ -3,3 +3,4 @@ |
|
84 | @@ -3,3 +3,4 @@ | |
83 | 3 |
|
85 | 3 | |
84 | 4 |
|
86 | 4 | |
85 | 5 |
|
87 | 5 | |
86 | +a |
|
88 | +a | |
87 |
|
89 | |||
88 | Nonexistent in tip+chmod: |
|
90 | Nonexistent in tip+chmod: | |
89 |
|
91 | |||
90 | $ hg diff --git -r 5:6 |
|
92 | $ hg diff --git -r 5:6 | |
91 | diff --git a/src b/src |
|
93 | diff --git a/src b/src | |
92 | old mode 100644 |
|
94 | old mode 100644 | |
93 | new mode 100755 |
|
95 | new mode 100755 | |
94 |
|
96 | |||
95 | Binary diff: |
|
97 | Binary diff: | |
96 |
|
98 | |||
97 | $ cp $TESTDIR/binfile.bin . |
|
99 | $ cp $TESTDIR/binfile.bin . | |
98 | $ hg add binfile.bin |
|
100 | $ hg add binfile.bin | |
99 | $ hg diff --git > b.diff |
|
101 | $ hg diff --git > b.diff | |
100 | $ cat b.diff |
|
102 | $ cat b.diff | |
101 | diff --git a/binfile.bin b/binfile.bin |
|
103 | diff --git a/binfile.bin b/binfile.bin | |
102 | new file mode 100644 |
|
104 | new file mode 100644 | |
103 | index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 |
|
105 | index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 | |
104 | GIT binary patch |
|
106 | GIT binary patch | |
105 | literal 593 |
|
107 | literal 593 | |
106 | zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU |
|
108 | zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU | |
107 | z000XU0RWnu7ytkO2XskIMF-Uh9TW;VpMjwv0005-Nkl<ZD9@FWPs=e;7{<>W$NUkd |
|
109 | z000XU0RWnu7ytkO2XskIMF-Uh9TW;VpMjwv0005-Nkl<ZD9@FWPs=e;7{<>W$NUkd | |
108 | zX$nnYLt$-$V!?uy+1V%`z&Eh=ah|duER<4|QWhju3gb^nF*8iYobxWG-qqXl=2~5M |
|
110 | zX$nnYLt$-$V!?uy+1V%`z&Eh=ah|duER<4|QWhju3gb^nF*8iYobxWG-qqXl=2~5M | |
109 | z*IoDB)sG^CfNuoBmqLTVU^<;@nwHP!1wrWd`{(mHo6VNXWtyh{alzqmsH*yYzpvLT |
|
111 | z*IoDB)sG^CfNuoBmqLTVU^<;@nwHP!1wrWd`{(mHo6VNXWtyh{alzqmsH*yYzpvLT | |
110 | zLdY<T=ks|woh-`&01!ej#(xbV1f|pI*=%;d-%F*E*X#ZH`4I%6SS+$EJDE&ct=8po |
|
112 | zLdY<T=ks|woh-`&01!ej#(xbV1f|pI*=%;d-%F*E*X#ZH`4I%6SS+$EJDE&ct=8po | |
111 | ziN#{?_j|kD%Cd|oiqds`xm@;oJ-^?NG3Gdqrs?5u*zI;{nogxsx~^|Fn^Y?Gdc6<; |
|
113 | ziN#{?_j|kD%Cd|oiqds`xm@;oJ-^?NG3Gdqrs?5u*zI;{nogxsx~^|Fn^Y?Gdc6<; | |
112 | zfMJ+iF1J`LMx&A2?dEwNW8ClebzPTbIh{@$hS6*`kH@1d%Lo7fA#}N1)oN7`gm$~V |
|
114 | zfMJ+iF1J`LMx&A2?dEwNW8ClebzPTbIh{@$hS6*`kH@1d%Lo7fA#}N1)oN7`gm$~V | |
113 | z+wDx#)OFqMcE{s!JN0-xhG8ItAjVkJwEcb`3WWlJfU2r?;Pd%dmR+q@mSri5q9_W- |
|
115 | z+wDx#)OFqMcE{s!JN0-xhG8ItAjVkJwEcb`3WWlJfU2r?;Pd%dmR+q@mSri5q9_W- | |
114 | zaR2~ECX?B2w+zELozC0s*6Z~|QG^f{3I#<`?)Q7U-JZ|q5W;9Q8i_=pBuSzunx=U; |
|
116 | zaR2~ECX?B2w+zELozC0s*6Z~|QG^f{3I#<`?)Q7U-JZ|q5W;9Q8i_=pBuSzunx=U; | |
115 | z9C)5jBoYw9^?EHyQl(M}1OlQcCX>lXB*ODN003Z&P17_@)3Pi=i0wb04<W?v-u}7K |
|
117 | z9C)5jBoYw9^?EHyQl(M}1OlQcCX>lXB*ODN003Z&P17_@)3Pi=i0wb04<W?v-u}7K | |
116 | zXmmQA+wDgE!qR9o8jr`%=ab_&uh(l?R=r;Tjiqon91I2-hIu?57~@*4h7h9uORK#= |
|
118 | zXmmQA+wDgE!qR9o8jr`%=ab_&uh(l?R=r;Tjiqon91I2-hIu?57~@*4h7h9uORK#= | |
117 | fQItJW-{SoTm)8|5##k|m00000NkvXXu0mjf{mKw4 |
|
119 | fQItJW-{SoTm)8|5##k|m00000NkvXXu0mjf{mKw4 | |
118 |
|
120 | |||
119 |
|
121 | |||
120 | Import binary diff: |
|
122 | Import binary diff: | |
121 |
|
123 | |||
122 | $ hg revert binfile.bin |
|
124 | $ hg revert binfile.bin | |
123 | $ rm binfile.bin |
|
125 | $ rm binfile.bin | |
124 | $ hg import -mfoo b.diff |
|
126 | $ hg import -mfoo b.diff | |
125 | applying b.diff |
|
127 | applying b.diff | |
126 | $ cmp binfile.bin $TESTDIR/binfile.bin |
|
128 | $ cmp binfile.bin $TESTDIR/binfile.bin | |
127 |
|
129 | |||
128 | Rename binary file: |
|
130 | Rename binary file: | |
129 |
|
131 | |||
130 | $ hg mv binfile.bin renamed.bin |
|
132 | $ hg mv binfile.bin renamed.bin | |
131 | $ hg diff --git |
|
133 | $ hg diff --git | |
132 | diff --git a/binfile.bin b/renamed.bin |
|
134 | diff --git a/binfile.bin b/renamed.bin | |
133 | rename from binfile.bin |
|
135 | rename from binfile.bin | |
134 | rename to renamed.bin |
|
136 | rename to renamed.bin | |
135 |
|
137 | |||
136 | Diff across many revisions: |
|
138 | Diff across many revisions: | |
137 |
|
139 | |||
138 | $ hg mv dst dst2 |
|
140 | $ hg mv dst dst2 | |
139 | $ hg ci -m 'mv dst dst2' |
|
141 | $ hg ci -m 'mv dst dst2' | |
140 |
|
142 | |||
141 | $ echo >> start |
|
143 | $ echo >> start | |
142 | $ hg ci -m 'change start' |
|
144 | $ hg ci -m 'change start' | |
143 |
|
145 | |||
144 | $ hg revert -r -2 start |
|
146 | $ hg revert -r -2 start | |
145 | $ hg mv dst2 dst3 |
|
147 | $ hg mv dst2 dst3 | |
146 | $ hg ci -m 'mv dst2 dst3; revert start' |
|
148 | $ hg ci -m 'mv dst2 dst3; revert start' | |
147 |
|
149 | |||
148 | $ hg diff --git -r 9:11 |
|
150 | $ hg diff --git -r 9:11 | |
149 | diff --git a/dst2 b/dst3 |
|
151 | diff --git a/dst2 b/dst3 | |
150 | rename from dst2 |
|
152 | rename from dst2 | |
151 | rename to dst3 |
|
153 | rename to dst3 | |
152 |
|
154 | |||
153 | Reversed: |
|
155 | Reversed: | |
154 |
|
156 | |||
155 | $ hg diff --git -r 11:9 |
|
157 | $ hg diff --git -r 11:9 | |
156 | diff --git a/dst3 b/dst2 |
|
158 | diff --git a/dst3 b/dst2 | |
157 | rename from dst3 |
|
159 | rename from dst3 | |
158 | rename to dst2 |
|
160 | rename to dst2 | |
159 |
|
161 | |||
160 |
|
162 | |||
161 | $ echo a >> foo |
|
163 | $ echo a >> foo | |
162 | $ hg add foo |
|
164 | $ hg add foo | |
163 | $ hg ci -m 'add foo' |
|
165 | $ hg ci -m 'add foo' | |
164 | $ echo b >> foo |
|
166 | $ echo b >> foo | |
165 | $ hg ci -m 'change foo' |
|
167 | $ hg ci -m 'change foo' | |
166 | $ hg mv foo bar |
|
168 | $ hg mv foo bar | |
167 | $ hg ci -m 'mv foo bar' |
|
169 | $ hg ci -m 'mv foo bar' | |
168 | $ echo c >> bar |
|
170 | $ echo c >> bar | |
169 | $ hg ci -m 'change bar' |
|
171 | $ hg ci -m 'change bar' | |
170 |
|
172 | |||
171 | File created before r1 and renamed before r2: |
|
173 | File created before r1 and renamed before r2: | |
172 |
|
174 | |||
173 | $ hg diff --git -r -3:-1 |
|
175 | $ hg diff --git -r -3:-1 | |
174 | diff --git a/foo b/bar |
|
176 | diff --git a/foo b/bar | |
175 | rename from foo |
|
177 | rename from foo | |
176 | rename to bar |
|
178 | rename to bar | |
177 | --- a/foo |
|
179 | --- a/foo | |
178 | +++ b/bar |
|
180 | +++ b/bar | |
179 | @@ -1,2 +1,3 @@ |
|
181 | @@ -1,2 +1,3 @@ | |
180 | a |
|
182 | a | |
181 | b |
|
183 | b | |
182 | +c |
|
184 | +c | |
183 |
|
185 | |||
184 | Reversed: |
|
186 | Reversed: | |
185 |
|
187 | |||
186 | $ hg diff --git -r -1:-3 |
|
188 | $ hg diff --git -r -1:-3 | |
187 | diff --git a/bar b/foo |
|
189 | diff --git a/bar b/foo | |
188 | rename from bar |
|
190 | rename from bar | |
189 | rename to foo |
|
191 | rename to foo | |
190 | --- a/bar |
|
192 | --- a/bar | |
191 | +++ b/foo |
|
193 | +++ b/foo | |
192 | @@ -1,3 +1,2 @@ |
|
194 | @@ -1,3 +1,2 @@ | |
193 | a |
|
195 | a | |
194 | b |
|
196 | b | |
195 | -c |
|
197 | -c | |
196 |
|
198 | |||
197 | File created in r1 and renamed before r2: |
|
199 | File created in r1 and renamed before r2: | |
198 |
|
200 | |||
199 | $ hg diff --git -r -4:-1 |
|
201 | $ hg diff --git -r -4:-1 | |
200 | diff --git a/foo b/bar |
|
202 | diff --git a/foo b/bar | |
201 | rename from foo |
|
203 | rename from foo | |
202 | rename to bar |
|
204 | rename to bar | |
203 | --- a/foo |
|
205 | --- a/foo | |
204 | +++ b/bar |
|
206 | +++ b/bar | |
205 | @@ -1,1 +1,3 @@ |
|
207 | @@ -1,1 +1,3 @@ | |
206 | a |
|
208 | a | |
207 | +b |
|
209 | +b | |
208 | +c |
|
210 | +c | |
209 |
|
211 | |||
210 | Reversed: |
|
212 | Reversed: | |
211 |
|
213 | |||
212 | $ hg diff --git -r -1:-4 |
|
214 | $ hg diff --git -r -1:-4 | |
213 | diff --git a/bar b/foo |
|
215 | diff --git a/bar b/foo | |
214 | rename from bar |
|
216 | rename from bar | |
215 | rename to foo |
|
217 | rename to foo | |
216 | --- a/bar |
|
218 | --- a/bar | |
217 | +++ b/foo |
|
219 | +++ b/foo | |
218 | @@ -1,3 +1,1 @@ |
|
220 | @@ -1,3 +1,1 @@ | |
219 | a |
|
221 | a | |
220 | -b |
|
222 | -b | |
221 | -c |
|
223 | -c | |
222 |
|
224 | |||
223 | File created after r1 and renamed before r2: |
|
225 | File created after r1 and renamed before r2: | |
224 |
|
226 | |||
225 | $ hg diff --git -r -5:-1 |
|
227 | $ hg diff --git -r -5:-1 | |
226 | diff --git a/bar b/bar |
|
228 | diff --git a/bar b/bar | |
227 | new file mode 100644 |
|
229 | new file mode 100644 | |
228 | --- /dev/null |
|
230 | --- /dev/null | |
229 | +++ b/bar |
|
231 | +++ b/bar | |
230 | @@ -0,0 +1,3 @@ |
|
232 | @@ -0,0 +1,3 @@ | |
231 | +a |
|
233 | +a | |
232 | +b |
|
234 | +b | |
233 | +c |
|
235 | +c | |
234 |
|
236 | |||
235 | Reversed: |
|
237 | Reversed: | |
236 |
|
238 | |||
237 | $ hg diff --git -r -1:-5 |
|
239 | $ hg diff --git -r -1:-5 | |
238 | diff --git a/bar b/bar |
|
240 | diff --git a/bar b/bar | |
239 | deleted file mode 100644 |
|
241 | deleted file mode 100644 | |
240 | --- a/bar |
|
242 | --- a/bar | |
241 | +++ /dev/null |
|
243 | +++ /dev/null | |
242 | @@ -1,3 +0,0 @@ |
|
244 | @@ -1,3 +0,0 @@ | |
243 | -a |
|
245 | -a | |
244 | -b |
|
246 | -b | |
245 | -c |
|
247 | -c | |
246 |
|
248 | |||
247 |
|
249 | |||
248 | Comparing with the working dir: |
|
250 | Comparing with the working dir: | |
249 |
|
251 | |||
250 | $ echo >> start |
|
252 | $ echo >> start | |
251 | $ hg ci -m 'change start again' |
|
253 | $ hg ci -m 'change start again' | |
252 |
|
254 | |||
253 | $ echo > created |
|
255 | $ echo > created | |
254 | $ hg add created |
|
256 | $ hg add created | |
255 | $ hg ci -m 'add created' |
|
257 | $ hg ci -m 'add created' | |
256 |
|
258 | |||
257 | $ hg mv created created2 |
|
259 | $ hg mv created created2 | |
258 | $ hg ci -m 'mv created created2' |
|
260 | $ hg ci -m 'mv created created2' | |
259 |
|
261 | |||
260 | $ hg mv created2 created3 |
|
262 | $ hg mv created2 created3 | |
261 |
|
263 | |||
262 | There's a copy in the working dir: |
|
264 | There's a copy in the working dir: | |
263 |
|
265 | |||
264 | $ hg diff --git |
|
266 | $ hg diff --git | |
265 | diff --git a/created2 b/created3 |
|
267 | diff --git a/created2 b/created3 | |
266 | rename from created2 |
|
268 | rename from created2 | |
267 | rename to created3 |
|
269 | rename to created3 | |
268 |
|
270 | |||
269 | There's another copy between the original rev and the wd: |
|
271 | There's another copy between the original rev and the wd: | |
270 |
|
272 | |||
271 | $ hg diff --git -r -2 |
|
273 | $ hg diff --git -r -2 | |
272 | diff --git a/created b/created3 |
|
274 | diff --git a/created b/created3 | |
273 | rename from created |
|
275 | rename from created | |
274 | rename to created3 |
|
276 | rename to created3 | |
275 |
|
277 | |||
276 | The source of the copy was created after the original rev: |
|
278 | The source of the copy was created after the original rev: | |
277 |
|
279 | |||
278 | $ hg diff --git -r -3 |
|
280 | $ hg diff --git -r -3 | |
279 | diff --git a/created3 b/created3 |
|
281 | diff --git a/created3 b/created3 | |
280 | new file mode 100644 |
|
282 | new file mode 100644 | |
281 | --- /dev/null |
|
283 | --- /dev/null | |
282 | +++ b/created3 |
|
284 | +++ b/created3 | |
283 | @@ -0,0 +1,1 @@ |
|
285 | @@ -0,0 +1,1 @@ | |
284 | + |
|
286 | + | |
285 | $ hg ci -m 'mv created2 created3' |
|
287 | $ hg ci -m 'mv created2 created3' | |
286 |
|
288 | |||
287 |
|
289 | |||
288 | $ echo > brand-new |
|
290 | $ echo > brand-new | |
289 | $ hg add brand-new |
|
291 | $ hg add brand-new | |
290 | $ hg ci -m 'add brand-new' |
|
292 | $ hg ci -m 'add brand-new' | |
291 | $ hg mv brand-new brand-new2 |
|
293 | $ hg mv brand-new brand-new2 | |
292 |
|
294 | |||
293 | Created in parent of wd; renamed in the wd: |
|
295 | Created in parent of wd; renamed in the wd: | |
294 |
|
296 | |||
295 | $ hg diff --git |
|
297 | $ hg diff --git | |
296 | diff --git a/brand-new b/brand-new2 |
|
298 | diff --git a/brand-new b/brand-new2 | |
297 | rename from brand-new |
|
299 | rename from brand-new | |
298 | rename to brand-new2 |
|
300 | rename to brand-new2 | |
299 |
|
301 | |||
300 | Created between r1 and parent of wd; renamed in the wd: |
|
302 | Created between r1 and parent of wd; renamed in the wd: | |
301 |
|
303 | |||
302 | $ hg diff --git -r -2 |
|
304 | $ hg diff --git -r -2 | |
303 | diff --git a/brand-new2 b/brand-new2 |
|
305 | diff --git a/brand-new2 b/brand-new2 | |
304 | new file mode 100644 |
|
306 | new file mode 100644 | |
305 | --- /dev/null |
|
307 | --- /dev/null | |
306 | +++ b/brand-new2 |
|
308 | +++ b/brand-new2 | |
307 | @@ -0,0 +1,1 @@ |
|
309 | @@ -0,0 +1,1 @@ | |
308 | + |
|
310 | + | |
309 | $ hg ci -m 'mv brand-new brand-new2' |
|
311 | $ hg ci -m 'mv brand-new brand-new2' | |
310 |
|
312 | |||
311 | One file is copied to many destinations and removed: |
|
313 | One file is copied to many destinations and removed: | |
312 |
|
314 | |||
313 | $ hg cp brand-new2 brand-new3 |
|
315 | $ hg cp brand-new2 brand-new3 | |
314 | $ hg mv brand-new2 brand-new3-2 |
|
316 | $ hg mv brand-new2 brand-new3-2 | |
315 | $ hg ci -m 'multiple renames/copies' |
|
317 | $ hg ci -m 'multiple renames/copies' | |
316 | $ hg diff --git -r -2 -r -1 |
|
318 | $ hg diff --git -r -2 -r -1 | |
317 | diff --git a/brand-new2 b/brand-new3 |
|
319 | diff --git a/brand-new2 b/brand-new3 | |
318 | rename from brand-new2 |
|
320 | rename from brand-new2 | |
319 | rename to brand-new3 |
|
321 | rename to brand-new3 | |
320 | diff --git a/brand-new2 b/brand-new3-2 |
|
322 | diff --git a/brand-new2 b/brand-new3-2 | |
321 | copy from brand-new2 |
|
323 | copy from brand-new2 | |
322 | copy to brand-new3-2 |
|
324 | copy to brand-new3-2 | |
323 |
|
325 | |||
324 | Reversed: |
|
326 | Reversed: | |
325 |
|
327 | |||
326 | $ hg diff --git -r -1 -r -2 |
|
328 | $ hg diff --git -r -1 -r -2 | |
327 | diff --git a/brand-new3 b/brand-new2 |
|
329 | diff --git a/brand-new3 b/brand-new2 | |
328 | rename from brand-new3 |
|
330 | rename from brand-new3 | |
329 | rename to brand-new2 |
|
331 | rename to brand-new2 | |
330 | diff --git a/brand-new3-2 b/brand-new3-2 |
|
332 | diff --git a/brand-new3-2 b/brand-new3-2 | |
331 | deleted file mode 100644 |
|
333 | deleted file mode 100644 | |
332 | --- a/brand-new3-2 |
|
334 | --- a/brand-new3-2 | |
333 | +++ /dev/null |
|
335 | +++ /dev/null | |
334 | @@ -1,1 +0,0 @@ |
|
336 | @@ -1,1 +0,0 @@ | |
335 | - |
|
337 | - | |
336 |
|
338 | |||
337 | There should be a trailing TAB if there are spaces in the file name: |
|
339 | There should be a trailing TAB if there are spaces in the file name: | |
338 |
|
340 | |||
339 | $ echo foo > 'with spaces' |
|
341 | $ echo foo > 'with spaces' | |
340 | $ hg add 'with spaces' |
|
342 | $ hg add 'with spaces' | |
341 | $ hg diff --git |
|
343 | $ hg diff --git | |
342 | diff --git a/with spaces b/with spaces |
|
344 | diff --git a/with spaces b/with spaces | |
343 | new file mode 100644 |
|
345 | new file mode 100644 | |
344 | --- /dev/null |
|
346 | --- /dev/null | |
345 | +++ b/with spaces |
|
347 | +++ b/with spaces | |
346 | @@ -0,0 +1,1 @@ |
|
348 | @@ -0,0 +1,1 @@ | |
347 | +foo |
|
349 | +foo | |
348 | $ hg ci -m 'add filename with spaces' |
|
350 | $ hg ci -m 'add filename with spaces' | |
349 |
|
351 |
@@ -1,555 +1,557 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | setting up repo |
|
3 | setting up repo | |
2 |
|
4 | |||
3 | $ hg init test |
|
5 | $ hg init test | |
4 | $ cd test |
|
6 | $ cd test | |
5 | $ echo a > a |
|
7 | $ echo a > a | |
6 | $ echo b > b |
|
8 | $ echo b > b | |
7 | $ hg ci -Ama |
|
9 | $ hg ci -Ama | |
8 | adding a |
|
10 | adding a | |
9 | adding b |
|
11 | adding b | |
10 |
|
12 | |||
11 | change permissions for git diffs |
|
13 | change permissions for git diffs | |
12 |
|
14 | |||
13 |
$ chmod |
|
15 | $ chmod +x a | |
14 | $ hg ci -Amb |
|
16 | $ hg ci -Amb | |
15 |
|
17 | |||
16 | set up hgweb |
|
18 | set up hgweb | |
17 |
|
19 | |||
18 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
20 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
19 | $ cat hg.pid >> $DAEMON_PIDS |
|
21 | $ cat hg.pid >> $DAEMON_PIDS | |
20 |
|
22 | |||
21 | revision |
|
23 | revision | |
22 |
|
24 | |||
23 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' |
|
25 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' | |
24 | 200 Script output follows |
|
26 | 200 Script output follows | |
25 |
|
27 | |||
26 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
28 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
27 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
29 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
28 | <head> |
|
30 | <head> | |
29 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
31 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
30 | <meta name="robots" content="index, nofollow" /> |
|
32 | <meta name="robots" content="index, nofollow" /> | |
31 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
33 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
32 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
34 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
33 |
|
35 | |||
34 | <title>test: 0cd96de13884</title> |
|
36 | <title>test: 0cd96de13884</title> | |
35 | </head> |
|
37 | </head> | |
36 | <body> |
|
38 | <body> | |
37 | <div class="container"> |
|
39 | <div class="container"> | |
38 | <div class="menu"> |
|
40 | <div class="menu"> | |
39 | <div class="logo"> |
|
41 | <div class="logo"> | |
40 | <a href="http://mercurial.selenic.com/"> |
|
42 | <a href="http://mercurial.selenic.com/"> | |
41 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
43 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
42 | </div> |
|
44 | </div> | |
43 | <ul> |
|
45 | <ul> | |
44 | <li><a href="/shortlog/0cd96de13884">log</a></li> |
|
46 | <li><a href="/shortlog/0cd96de13884">log</a></li> | |
45 | <li><a href="/graph/0cd96de13884">graph</a></li> |
|
47 | <li><a href="/graph/0cd96de13884">graph</a></li> | |
46 | <li><a href="/tags">tags</a></li> |
|
48 | <li><a href="/tags">tags</a></li> | |
47 | <li><a href="/bookmarks">bookmarks</a></li> |
|
49 | <li><a href="/bookmarks">bookmarks</a></li> | |
48 | <li><a href="/branches">branches</a></li> |
|
50 | <li><a href="/branches">branches</a></li> | |
49 | </ul> |
|
51 | </ul> | |
50 | <ul> |
|
52 | <ul> | |
51 | <li class="active">changeset</li> |
|
53 | <li class="active">changeset</li> | |
52 | <li><a href="/raw-rev/0cd96de13884">raw</a></li> |
|
54 | <li><a href="/raw-rev/0cd96de13884">raw</a></li> | |
53 | <li><a href="/file/0cd96de13884">browse</a></li> |
|
55 | <li><a href="/file/0cd96de13884">browse</a></li> | |
54 | </ul> |
|
56 | </ul> | |
55 | <ul> |
|
57 | <ul> | |
56 |
|
58 | |||
57 | </ul> |
|
59 | </ul> | |
58 | <ul> |
|
60 | <ul> | |
59 | <li><a href="/help">help</a></li> |
|
61 | <li><a href="/help">help</a></li> | |
60 | </ul> |
|
62 | </ul> | |
61 | </div> |
|
63 | </div> | |
62 |
|
64 | |||
63 | <div class="main"> |
|
65 | <div class="main"> | |
64 |
|
66 | |||
65 | <h2><a href="/">test</a></h2> |
|
67 | <h2><a href="/">test</a></h2> | |
66 | <h3>changeset 0:0cd96de13884 </h3> |
|
68 | <h3>changeset 0:0cd96de13884 </h3> | |
67 |
|
69 | |||
68 | <form class="search" action="/log"> |
|
70 | <form class="search" action="/log"> | |
69 |
|
71 | |||
70 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
72 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
71 | <div id="hint">find changesets by author, revision, |
|
73 | <div id="hint">find changesets by author, revision, | |
72 | files, or words in the commit message</div> |
|
74 | files, or words in the commit message</div> | |
73 | </form> |
|
75 | </form> | |
74 |
|
76 | |||
75 | <div class="description">a</div> |
|
77 | <div class="description">a</div> | |
76 |
|
78 | |||
77 | <table id="changesetEntry"> |
|
79 | <table id="changesetEntry"> | |
78 | <tr> |
|
80 | <tr> | |
79 | <th class="author">author</th> |
|
81 | <th class="author">author</th> | |
80 | <td class="author">test</td> |
|
82 | <td class="author">test</td> | |
81 | </tr> |
|
83 | </tr> | |
82 | <tr> |
|
84 | <tr> | |
83 | <th class="date">date</th> |
|
85 | <th class="date">date</th> | |
84 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr> |
|
86 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr> | |
85 | <tr> |
|
87 | <tr> | |
86 | <th class="author">parents</th> |
|
88 | <th class="author">parents</th> | |
87 | <td class="author"></td> |
|
89 | <td class="author"></td> | |
88 | </tr> |
|
90 | </tr> | |
89 | <tr> |
|
91 | <tr> | |
90 | <th class="author">children</th> |
|
92 | <th class="author">children</th> | |
91 | <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td> |
|
93 | <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td> | |
92 | </tr> |
|
94 | </tr> | |
93 | <tr> |
|
95 | <tr> | |
94 | <th class="files">files</th> |
|
96 | <th class="files">files</th> | |
95 | <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td> |
|
97 | <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td> | |
96 | </tr> |
|
98 | </tr> | |
97 | <tr> |
|
99 | <tr> | |
98 | <th class="diffstat">diffstat</th> |
|
100 | <th class="diffstat">diffstat</th> | |
99 | <td class="diffstat"> |
|
101 | <td class="diffstat"> | |
100 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
102 | 2 files changed, 2 insertions(+), 0 deletions(-) | |
101 |
|
103 | |||
102 | <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a> |
|
104 | <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a> | |
103 | <div id="diffstatdetails" style="display:none;"> |
|
105 | <div id="diffstatdetails" style="display:none;"> | |
104 | <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a> |
|
106 | <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a> | |
105 | <p> |
|
107 | <p> | |
106 | <table> <tr class="parity0"> |
|
108 | <table> <tr class="parity0"> | |
107 | <td class="diffstat-file"><a href="#l1.1">a</a></td> |
|
109 | <td class="diffstat-file"><a href="#l1.1">a</a></td> | |
108 | <td class="diffstat-total" align="right">1</td> |
|
110 | <td class="diffstat-total" align="right">1</td> | |
109 | <td class="diffstat-graph"> |
|
111 | <td class="diffstat-graph"> | |
110 | <span class="diffstat-add" style="width:100.0%;"> </span> |
|
112 | <span class="diffstat-add" style="width:100.0%;"> </span> | |
111 | <span class="diffstat-remove" style="width:0.0%;"> </span> |
|
113 | <span class="diffstat-remove" style="width:0.0%;"> </span> | |
112 | </td> |
|
114 | </td> | |
113 | </tr> |
|
115 | </tr> | |
114 | <tr class="parity1"> |
|
116 | <tr class="parity1"> | |
115 | <td class="diffstat-file"><a href="#l2.1">b</a></td> |
|
117 | <td class="diffstat-file"><a href="#l2.1">b</a></td> | |
116 | <td class="diffstat-total" align="right">1</td> |
|
118 | <td class="diffstat-total" align="right">1</td> | |
117 | <td class="diffstat-graph"> |
|
119 | <td class="diffstat-graph"> | |
118 | <span class="diffstat-add" style="width:100.0%;"> </span> |
|
120 | <span class="diffstat-add" style="width:100.0%;"> </span> | |
119 | <span class="diffstat-remove" style="width:0.0%;"> </span> |
|
121 | <span class="diffstat-remove" style="width:0.0%;"> </span> | |
120 | </td> |
|
122 | </td> | |
121 | </tr> |
|
123 | </tr> | |
122 | </table> |
|
124 | </table> | |
123 | </div> |
|
125 | </div> | |
124 | </td> |
|
126 | </td> | |
125 | </tr> |
|
127 | </tr> | |
126 | </table> |
|
128 | </table> | |
127 |
|
129 | |||
128 | <div class="overflow"> |
|
130 | <div class="overflow"> | |
129 | <div class="sourcefirst"> line diff</div> |
|
131 | <div class="sourcefirst"> line diff</div> | |
130 |
|
132 | |||
131 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
133 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
132 | </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
134 | </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
133 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
135 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@ | |
134 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a |
|
136 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a | |
135 | </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
137 | </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
136 | </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
138 | </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
137 | </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
139 | </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@ | |
138 | </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+b |
|
140 | </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+b | |
139 | </span></pre></div> |
|
141 | </span></pre></div> | |
140 | </div> |
|
142 | </div> | |
141 |
|
143 | |||
142 | </div> |
|
144 | </div> | |
143 | </div> |
|
145 | </div> | |
144 | <script type="text/javascript">process_dates()</script> |
|
146 | <script type="text/javascript">process_dates()</script> | |
145 |
|
147 | |||
146 |
|
148 | |||
147 | </body> |
|
149 | </body> | |
148 | </html> |
|
150 | </html> | |
149 |
|
151 | |||
150 |
|
152 | |||
151 | raw revision |
|
153 | raw revision | |
152 |
|
154 | |||
153 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' |
|
155 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' | |
154 | 200 Script output follows |
|
156 | 200 Script output follows | |
155 |
|
157 | |||
156 |
|
158 | |||
157 | # HG changeset patch |
|
159 | # HG changeset patch | |
158 | # User test |
|
160 | # User test | |
159 | # Date 0 0 |
|
161 | # Date 0 0 | |
160 | # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e |
|
162 | # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e | |
161 |
|
163 | |||
162 | a |
|
164 | a | |
163 |
|
165 | |||
164 | diff -r 000000000000 -r 0cd96de13884 a |
|
166 | diff -r 000000000000 -r 0cd96de13884 a | |
165 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
167 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
166 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
168 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
167 | @@ -0,0 +1,1 @@ |
|
169 | @@ -0,0 +1,1 @@ | |
168 | +a |
|
170 | +a | |
169 | diff -r 000000000000 -r 0cd96de13884 b |
|
171 | diff -r 000000000000 -r 0cd96de13884 b | |
170 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
172 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
171 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
173 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
172 | @@ -0,0 +1,1 @@ |
|
174 | @@ -0,0 +1,1 @@ | |
173 | +b |
|
175 | +b | |
174 |
|
176 | |||
175 |
|
177 | |||
176 | diff removed file |
|
178 | diff removed file | |
177 |
|
179 | |||
178 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' |
|
180 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' | |
179 | 200 Script output follows |
|
181 | 200 Script output follows | |
180 |
|
182 | |||
181 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
183 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
182 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
184 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
183 | <head> |
|
185 | <head> | |
184 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
186 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
185 | <meta name="robots" content="index, nofollow" /> |
|
187 | <meta name="robots" content="index, nofollow" /> | |
186 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
188 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
187 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
189 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
188 |
|
190 | |||
189 | <title>test: a diff</title> |
|
191 | <title>test: a diff</title> | |
190 | </head> |
|
192 | </head> | |
191 | <body> |
|
193 | <body> | |
192 |
|
194 | |||
193 | <div class="container"> |
|
195 | <div class="container"> | |
194 | <div class="menu"> |
|
196 | <div class="menu"> | |
195 | <div class="logo"> |
|
197 | <div class="logo"> | |
196 | <a href="http://mercurial.selenic.com/"> |
|
198 | <a href="http://mercurial.selenic.com/"> | |
197 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
199 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
198 | </div> |
|
200 | </div> | |
199 | <ul> |
|
201 | <ul> | |
200 | <li><a href="/shortlog/78e4ebad7cdf">log</a></li> |
|
202 | <li><a href="/shortlog/78e4ebad7cdf">log</a></li> | |
201 | <li><a href="/graph/78e4ebad7cdf">graph</a></li> |
|
203 | <li><a href="/graph/78e4ebad7cdf">graph</a></li> | |
202 | <li><a href="/tags">tags</a></li> |
|
204 | <li><a href="/tags">tags</a></li> | |
203 | <li><a href="/bookmarks">bookmarks</a></li> |
|
205 | <li><a href="/bookmarks">bookmarks</a></li> | |
204 | <li><a href="/branches">branches</a></li> |
|
206 | <li><a href="/branches">branches</a></li> | |
205 | </ul> |
|
207 | </ul> | |
206 | <ul> |
|
208 | <ul> | |
207 | <li><a href="/rev/78e4ebad7cdf">changeset</a></li> |
|
209 | <li><a href="/rev/78e4ebad7cdf">changeset</a></li> | |
208 | <li><a href="/file/78e4ebad7cdf">browse</a></li> |
|
210 | <li><a href="/file/78e4ebad7cdf">browse</a></li> | |
209 | </ul> |
|
211 | </ul> | |
210 | <ul> |
|
212 | <ul> | |
211 | <li><a href="/file/78e4ebad7cdf/a">file</a></li> |
|
213 | <li><a href="/file/78e4ebad7cdf/a">file</a></li> | |
212 | <li><a href="/file/tip/a">latest</a></li> |
|
214 | <li><a href="/file/tip/a">latest</a></li> | |
213 | <li class="active">diff</li> |
|
215 | <li class="active">diff</li> | |
214 | <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li> |
|
216 | <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li> | |
215 | <li><a href="/log/78e4ebad7cdf/a">file log</a></li> |
|
217 | <li><a href="/log/78e4ebad7cdf/a">file log</a></li> | |
216 | <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li> |
|
218 | <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li> | |
217 | </ul> |
|
219 | </ul> | |
218 | <ul> |
|
220 | <ul> | |
219 | <li><a href="/help">help</a></li> |
|
221 | <li><a href="/help">help</a></li> | |
220 | </ul> |
|
222 | </ul> | |
221 | </div> |
|
223 | </div> | |
222 |
|
224 | |||
223 | <div class="main"> |
|
225 | <div class="main"> | |
224 | <h2><a href="/">test</a></h2> |
|
226 | <h2><a href="/">test</a></h2> | |
225 | <h3>diff a @ 1:78e4ebad7cdf</h3> |
|
227 | <h3>diff a @ 1:78e4ebad7cdf</h3> | |
226 |
|
228 | |||
227 | <form class="search" action="/log"> |
|
229 | <form class="search" action="/log"> | |
228 | <p></p> |
|
230 | <p></p> | |
229 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
231 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
230 | <div id="hint">find changesets by author, revision, |
|
232 | <div id="hint">find changesets by author, revision, | |
231 | files, or words in the commit message</div> |
|
233 | files, or words in the commit message</div> | |
232 | </form> |
|
234 | </form> | |
233 |
|
235 | |||
234 | <div class="description">b</div> |
|
236 | <div class="description">b</div> | |
235 |
|
237 | |||
236 | <table id="changesetEntry"> |
|
238 | <table id="changesetEntry"> | |
237 | <tr> |
|
239 | <tr> | |
238 | <th>author</th> |
|
240 | <th>author</th> | |
239 | <td>test</td> |
|
241 | <td>test</td> | |
240 | </tr> |
|
242 | </tr> | |
241 | <tr> |
|
243 | <tr> | |
242 | <th>date</th> |
|
244 | <th>date</th> | |
243 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td> |
|
245 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td> | |
244 | </tr> |
|
246 | </tr> | |
245 | <tr> |
|
247 | <tr> | |
246 | <th>parents</th> |
|
248 | <th>parents</th> | |
247 | <td></td> |
|
249 | <td></td> | |
248 | </tr> |
|
250 | </tr> | |
249 | <tr> |
|
251 | <tr> | |
250 | <th>children</th> |
|
252 | <th>children</th> | |
251 | <td></td> |
|
253 | <td></td> | |
252 | </tr> |
|
254 | </tr> | |
253 |
|
255 | |||
254 | </table> |
|
256 | </table> | |
255 |
|
257 | |||
256 | <div class="overflow"> |
|
258 | <div class="overflow"> | |
257 | <div class="sourcefirst"> line diff</div> |
|
259 | <div class="sourcefirst"> line diff</div> | |
258 |
|
260 | |||
259 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
261 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
260 | </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
262 | </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
261 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
263 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@ | |
262 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a |
|
264 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a | |
263 | </span></pre></div> |
|
265 | </span></pre></div> | |
264 | </div> |
|
266 | </div> | |
265 | </div> |
|
267 | </div> | |
266 | </div> |
|
268 | </div> | |
267 |
|
269 | |||
268 | <script type="text/javascript">process_dates()</script> |
|
270 | <script type="text/javascript">process_dates()</script> | |
269 |
|
271 | |||
270 |
|
272 | |||
271 | </body> |
|
273 | </body> | |
272 | </html> |
|
274 | </html> | |
273 |
|
275 | |||
274 |
|
276 | |||
275 | set up hgweb with git diffs |
|
277 | set up hgweb with git diffs | |
276 |
|
278 | |||
277 | $ "$TESTDIR/killdaemons.py" |
|
279 | $ "$TESTDIR/killdaemons.py" | |
278 | $ hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
280 | $ hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
279 | $ cat hg.pid >> $DAEMON_PIDS |
|
281 | $ cat hg.pid >> $DAEMON_PIDS | |
280 |
|
282 | |||
281 | revision |
|
283 | revision | |
282 |
|
284 | |||
283 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' |
|
285 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' | |
284 | 200 Script output follows |
|
286 | 200 Script output follows | |
285 |
|
287 | |||
286 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
288 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
287 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
289 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
288 | <head> |
|
290 | <head> | |
289 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
291 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
290 | <meta name="robots" content="index, nofollow" /> |
|
292 | <meta name="robots" content="index, nofollow" /> | |
291 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
293 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
292 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
294 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
293 |
|
295 | |||
294 | <title>test: 0cd96de13884</title> |
|
296 | <title>test: 0cd96de13884</title> | |
295 | </head> |
|
297 | </head> | |
296 | <body> |
|
298 | <body> | |
297 | <div class="container"> |
|
299 | <div class="container"> | |
298 | <div class="menu"> |
|
300 | <div class="menu"> | |
299 | <div class="logo"> |
|
301 | <div class="logo"> | |
300 | <a href="http://mercurial.selenic.com/"> |
|
302 | <a href="http://mercurial.selenic.com/"> | |
301 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
303 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
302 | </div> |
|
304 | </div> | |
303 | <ul> |
|
305 | <ul> | |
304 | <li><a href="/shortlog/0cd96de13884">log</a></li> |
|
306 | <li><a href="/shortlog/0cd96de13884">log</a></li> | |
305 | <li><a href="/graph/0cd96de13884">graph</a></li> |
|
307 | <li><a href="/graph/0cd96de13884">graph</a></li> | |
306 | <li><a href="/tags">tags</a></li> |
|
308 | <li><a href="/tags">tags</a></li> | |
307 | <li><a href="/bookmarks">bookmarks</a></li> |
|
309 | <li><a href="/bookmarks">bookmarks</a></li> | |
308 | <li><a href="/branches">branches</a></li> |
|
310 | <li><a href="/branches">branches</a></li> | |
309 | </ul> |
|
311 | </ul> | |
310 | <ul> |
|
312 | <ul> | |
311 | <li class="active">changeset</li> |
|
313 | <li class="active">changeset</li> | |
312 | <li><a href="/raw-rev/0cd96de13884">raw</a></li> |
|
314 | <li><a href="/raw-rev/0cd96de13884">raw</a></li> | |
313 | <li><a href="/file/0cd96de13884">browse</a></li> |
|
315 | <li><a href="/file/0cd96de13884">browse</a></li> | |
314 | </ul> |
|
316 | </ul> | |
315 | <ul> |
|
317 | <ul> | |
316 |
|
318 | |||
317 | </ul> |
|
319 | </ul> | |
318 | <ul> |
|
320 | <ul> | |
319 | <li><a href="/help">help</a></li> |
|
321 | <li><a href="/help">help</a></li> | |
320 | </ul> |
|
322 | </ul> | |
321 | </div> |
|
323 | </div> | |
322 |
|
324 | |||
323 | <div class="main"> |
|
325 | <div class="main"> | |
324 |
|
326 | |||
325 | <h2><a href="/">test</a></h2> |
|
327 | <h2><a href="/">test</a></h2> | |
326 | <h3>changeset 0:0cd96de13884 </h3> |
|
328 | <h3>changeset 0:0cd96de13884 </h3> | |
327 |
|
329 | |||
328 | <form class="search" action="/log"> |
|
330 | <form class="search" action="/log"> | |
329 |
|
331 | |||
330 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
332 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
331 | <div id="hint">find changesets by author, revision, |
|
333 | <div id="hint">find changesets by author, revision, | |
332 | files, or words in the commit message</div> |
|
334 | files, or words in the commit message</div> | |
333 | </form> |
|
335 | </form> | |
334 |
|
336 | |||
335 | <div class="description">a</div> |
|
337 | <div class="description">a</div> | |
336 |
|
338 | |||
337 | <table id="changesetEntry"> |
|
339 | <table id="changesetEntry"> | |
338 | <tr> |
|
340 | <tr> | |
339 | <th class="author">author</th> |
|
341 | <th class="author">author</th> | |
340 | <td class="author">test</td> |
|
342 | <td class="author">test</td> | |
341 | </tr> |
|
343 | </tr> | |
342 | <tr> |
|
344 | <tr> | |
343 | <th class="date">date</th> |
|
345 | <th class="date">date</th> | |
344 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr> |
|
346 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr> | |
345 | <tr> |
|
347 | <tr> | |
346 | <th class="author">parents</th> |
|
348 | <th class="author">parents</th> | |
347 | <td class="author"></td> |
|
349 | <td class="author"></td> | |
348 | </tr> |
|
350 | </tr> | |
349 | <tr> |
|
351 | <tr> | |
350 | <th class="author">children</th> |
|
352 | <th class="author">children</th> | |
351 | <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td> |
|
353 | <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td> | |
352 | </tr> |
|
354 | </tr> | |
353 | <tr> |
|
355 | <tr> | |
354 | <th class="files">files</th> |
|
356 | <th class="files">files</th> | |
355 | <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td> |
|
357 | <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td> | |
356 | </tr> |
|
358 | </tr> | |
357 | <tr> |
|
359 | <tr> | |
358 | <th class="diffstat">diffstat</th> |
|
360 | <th class="diffstat">diffstat</th> | |
359 | <td class="diffstat"> |
|
361 | <td class="diffstat"> | |
360 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
362 | 2 files changed, 2 insertions(+), 0 deletions(-) | |
361 |
|
363 | |||
362 | <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a> |
|
364 | <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a> | |
363 | <div id="diffstatdetails" style="display:none;"> |
|
365 | <div id="diffstatdetails" style="display:none;"> | |
364 | <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a> |
|
366 | <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a> | |
365 | <p> |
|
367 | <p> | |
366 | <table> <tr class="parity0"> |
|
368 | <table> <tr class="parity0"> | |
367 | <td class="diffstat-file"><a href="#l1.1">a</a></td> |
|
369 | <td class="diffstat-file"><a href="#l1.1">a</a></td> | |
368 | <td class="diffstat-total" align="right">1</td> |
|
370 | <td class="diffstat-total" align="right">1</td> | |
369 | <td class="diffstat-graph"> |
|
371 | <td class="diffstat-graph"> | |
370 | <span class="diffstat-add" style="width:100.0%;"> </span> |
|
372 | <span class="diffstat-add" style="width:100.0%;"> </span> | |
371 | <span class="diffstat-remove" style="width:0.0%;"> </span> |
|
373 | <span class="diffstat-remove" style="width:0.0%;"> </span> | |
372 | </td> |
|
374 | </td> | |
373 | </tr> |
|
375 | </tr> | |
374 | <tr class="parity1"> |
|
376 | <tr class="parity1"> | |
375 | <td class="diffstat-file"><a href="#l2.1">b</a></td> |
|
377 | <td class="diffstat-file"><a href="#l2.1">b</a></td> | |
376 | <td class="diffstat-total" align="right">1</td> |
|
378 | <td class="diffstat-total" align="right">1</td> | |
377 | <td class="diffstat-graph"> |
|
379 | <td class="diffstat-graph"> | |
378 | <span class="diffstat-add" style="width:100.0%;"> </span> |
|
380 | <span class="diffstat-add" style="width:100.0%;"> </span> | |
379 | <span class="diffstat-remove" style="width:0.0%;"> </span> |
|
381 | <span class="diffstat-remove" style="width:0.0%;"> </span> | |
380 | </td> |
|
382 | </td> | |
381 | </tr> |
|
383 | </tr> | |
382 | </table> |
|
384 | </table> | |
383 | </div> |
|
385 | </div> | |
384 | </td> |
|
386 | </td> | |
385 | </tr> |
|
387 | </tr> | |
386 | </table> |
|
388 | </table> | |
387 |
|
389 | |||
388 | <div class="overflow"> |
|
390 | <div class="overflow"> | |
389 | <div class="sourcefirst"> line diff</div> |
|
391 | <div class="sourcefirst"> line diff</div> | |
390 |
|
392 | |||
391 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100644 |
|
393 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100644 | |
392 | <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null |
|
394 | <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null | |
393 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a |
|
395 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a | |
394 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
396 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@ | |
395 | </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a |
|
397 | </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a | |
396 | </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> new file mode 100644 |
|
398 | </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> new file mode 100644 | |
397 | <a href="#l2.2" id="l2.2"> 2.2</a> <span class="minusline">--- /dev/null |
|
399 | <a href="#l2.2" id="l2.2"> 2.2</a> <span class="minusline">--- /dev/null | |
398 | </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="plusline">+++ b/b |
|
400 | </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="plusline">+++ b/b | |
399 | </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
401 | </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="atline">@@ -0,0 +1,1 @@ | |
400 | </span><a href="#l2.5" id="l2.5"> 2.5</a> <span class="plusline">+b |
|
402 | </span><a href="#l2.5" id="l2.5"> 2.5</a> <span class="plusline">+b | |
401 | </span></pre></div> |
|
403 | </span></pre></div> | |
402 | </div> |
|
404 | </div> | |
403 |
|
405 | |||
404 | </div> |
|
406 | </div> | |
405 | </div> |
|
407 | </div> | |
406 | <script type="text/javascript">process_dates()</script> |
|
408 | <script type="text/javascript">process_dates()</script> | |
407 |
|
409 | |||
408 |
|
410 | |||
409 | </body> |
|
411 | </body> | |
410 | </html> |
|
412 | </html> | |
411 |
|
413 | |||
412 |
|
414 | |||
413 | revision |
|
415 | revision | |
414 |
|
416 | |||
415 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' |
|
417 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' | |
416 | 200 Script output follows |
|
418 | 200 Script output follows | |
417 |
|
419 | |||
418 |
|
420 | |||
419 | # HG changeset patch |
|
421 | # HG changeset patch | |
420 | # User test |
|
422 | # User test | |
421 | # Date 0 0 |
|
423 | # Date 0 0 | |
422 | # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e |
|
424 | # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e | |
423 |
|
425 | |||
424 | a |
|
426 | a | |
425 |
|
427 | |||
426 | diff --git a/a b/a |
|
428 | diff --git a/a b/a | |
427 | new file mode 100644 |
|
429 | new file mode 100644 | |
428 | --- /dev/null |
|
430 | --- /dev/null | |
429 | +++ b/a |
|
431 | +++ b/a | |
430 | @@ -0,0 +1,1 @@ |
|
432 | @@ -0,0 +1,1 @@ | |
431 | +a |
|
433 | +a | |
432 | diff --git a/b b/b |
|
434 | diff --git a/b b/b | |
433 | new file mode 100644 |
|
435 | new file mode 100644 | |
434 | --- /dev/null |
|
436 | --- /dev/null | |
435 | +++ b/b |
|
437 | +++ b/b | |
436 | @@ -0,0 +1,1 @@ |
|
438 | @@ -0,0 +1,1 @@ | |
437 | +b |
|
439 | +b | |
438 |
|
440 | |||
439 |
|
441 | |||
440 | diff removed file |
|
442 | diff removed file | |
441 |
|
443 | |||
442 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' |
|
444 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' | |
443 | 200 Script output follows |
|
445 | 200 Script output follows | |
444 |
|
446 | |||
445 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
447 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
446 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
448 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
447 | <head> |
|
449 | <head> | |
448 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
450 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
449 | <meta name="robots" content="index, nofollow" /> |
|
451 | <meta name="robots" content="index, nofollow" /> | |
450 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
452 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
451 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
453 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
452 |
|
454 | |||
453 | <title>test: a diff</title> |
|
455 | <title>test: a diff</title> | |
454 | </head> |
|
456 | </head> | |
455 | <body> |
|
457 | <body> | |
456 |
|
458 | |||
457 | <div class="container"> |
|
459 | <div class="container"> | |
458 | <div class="menu"> |
|
460 | <div class="menu"> | |
459 | <div class="logo"> |
|
461 | <div class="logo"> | |
460 | <a href="http://mercurial.selenic.com/"> |
|
462 | <a href="http://mercurial.selenic.com/"> | |
461 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
463 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
462 | </div> |
|
464 | </div> | |
463 | <ul> |
|
465 | <ul> | |
464 | <li><a href="/shortlog/78e4ebad7cdf">log</a></li> |
|
466 | <li><a href="/shortlog/78e4ebad7cdf">log</a></li> | |
465 | <li><a href="/graph/78e4ebad7cdf">graph</a></li> |
|
467 | <li><a href="/graph/78e4ebad7cdf">graph</a></li> | |
466 | <li><a href="/tags">tags</a></li> |
|
468 | <li><a href="/tags">tags</a></li> | |
467 | <li><a href="/bookmarks">bookmarks</a></li> |
|
469 | <li><a href="/bookmarks">bookmarks</a></li> | |
468 | <li><a href="/branches">branches</a></li> |
|
470 | <li><a href="/branches">branches</a></li> | |
469 | </ul> |
|
471 | </ul> | |
470 | <ul> |
|
472 | <ul> | |
471 | <li><a href="/rev/78e4ebad7cdf">changeset</a></li> |
|
473 | <li><a href="/rev/78e4ebad7cdf">changeset</a></li> | |
472 | <li><a href="/file/78e4ebad7cdf">browse</a></li> |
|
474 | <li><a href="/file/78e4ebad7cdf">browse</a></li> | |
473 | </ul> |
|
475 | </ul> | |
474 | <ul> |
|
476 | <ul> | |
475 | <li><a href="/file/78e4ebad7cdf/a">file</a></li> |
|
477 | <li><a href="/file/78e4ebad7cdf/a">file</a></li> | |
476 | <li><a href="/file/tip/a">latest</a></li> |
|
478 | <li><a href="/file/tip/a">latest</a></li> | |
477 | <li class="active">diff</li> |
|
479 | <li class="active">diff</li> | |
478 | <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li> |
|
480 | <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li> | |
479 | <li><a href="/log/78e4ebad7cdf/a">file log</a></li> |
|
481 | <li><a href="/log/78e4ebad7cdf/a">file log</a></li> | |
480 | <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li> |
|
482 | <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li> | |
481 | </ul> |
|
483 | </ul> | |
482 | <ul> |
|
484 | <ul> | |
483 | <li><a href="/help">help</a></li> |
|
485 | <li><a href="/help">help</a></li> | |
484 | </ul> |
|
486 | </ul> | |
485 | </div> |
|
487 | </div> | |
486 |
|
488 | |||
487 | <div class="main"> |
|
489 | <div class="main"> | |
488 | <h2><a href="/">test</a></h2> |
|
490 | <h2><a href="/">test</a></h2> | |
489 | <h3>diff a @ 1:78e4ebad7cdf</h3> |
|
491 | <h3>diff a @ 1:78e4ebad7cdf</h3> | |
490 |
|
492 | |||
491 | <form class="search" action="/log"> |
|
493 | <form class="search" action="/log"> | |
492 | <p></p> |
|
494 | <p></p> | |
493 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
495 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
494 | <div id="hint">find changesets by author, revision, |
|
496 | <div id="hint">find changesets by author, revision, | |
495 | files, or words in the commit message</div> |
|
497 | files, or words in the commit message</div> | |
496 | </form> |
|
498 | </form> | |
497 |
|
499 | |||
498 | <div class="description">b</div> |
|
500 | <div class="description">b</div> | |
499 |
|
501 | |||
500 | <table id="changesetEntry"> |
|
502 | <table id="changesetEntry"> | |
501 | <tr> |
|
503 | <tr> | |
502 | <th>author</th> |
|
504 | <th>author</th> | |
503 | <td>test</td> |
|
505 | <td>test</td> | |
504 | </tr> |
|
506 | </tr> | |
505 | <tr> |
|
507 | <tr> | |
506 | <th>date</th> |
|
508 | <th>date</th> | |
507 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td> |
|
509 | <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td> | |
508 | </tr> |
|
510 | </tr> | |
509 | <tr> |
|
511 | <tr> | |
510 | <th>parents</th> |
|
512 | <th>parents</th> | |
511 | <td></td> |
|
513 | <td></td> | |
512 | </tr> |
|
514 | </tr> | |
513 | <tr> |
|
515 | <tr> | |
514 | <th>children</th> |
|
516 | <th>children</th> | |
515 | <td></td> |
|
517 | <td></td> | |
516 | </tr> |
|
518 | </tr> | |
517 |
|
519 | |||
518 | </table> |
|
520 | </table> | |
519 |
|
521 | |||
520 | <div class="overflow"> |
|
522 | <div class="overflow"> | |
521 | <div class="sourcefirst"> line diff</div> |
|
523 | <div class="sourcefirst"> line diff</div> | |
522 |
|
524 | |||
523 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100755 |
|
525 | <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100755 | |
524 | <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null |
|
526 | <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null | |
525 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a |
|
527 | </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a | |
526 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@ |
|
528 | </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@ | |
527 | </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a |
|
529 | </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a | |
528 | </span></pre></div> |
|
530 | </span></pre></div> | |
529 | </div> |
|
531 | </div> | |
530 | </div> |
|
532 | </div> | |
531 | </div> |
|
533 | </div> | |
532 |
|
534 | |||
533 | <script type="text/javascript">process_dates()</script> |
|
535 | <script type="text/javascript">process_dates()</script> | |
534 |
|
536 | |||
535 |
|
537 | |||
536 | </body> |
|
538 | </body> | |
537 | </html> |
|
539 | </html> | |
538 |
|
540 | |||
539 | $ cd .. |
|
541 | $ cd .. | |
540 |
|
542 | |||
541 | test import rev as raw-rev |
|
543 | test import rev as raw-rev | |
542 |
|
544 | |||
543 | $ hg clone -r0 test test1 |
|
545 | $ hg clone -r0 test test1 | |
544 | adding changesets |
|
546 | adding changesets | |
545 | adding manifests |
|
547 | adding manifests | |
546 | adding file changes |
|
548 | adding file changes | |
547 | added 1 changesets with 2 changes to 2 files |
|
549 | added 1 changesets with 2 changes to 2 files | |
548 | updating to branch default |
|
550 | updating to branch default | |
549 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
551 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
550 | $ cd test1 |
|
552 | $ cd test1 | |
551 | $ hg import -q --exact http://localhost:$HGPORT/rev/1 |
|
553 | $ hg import -q --exact http://localhost:$HGPORT/rev/1 | |
552 |
|
554 | |||
553 | errors |
|
555 | errors | |
554 |
|
556 | |||
555 | $ cat ../test/errors.log |
|
557 | $ cat ../test/errors.log |
@@ -1,258 +1,258 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink || exit 80 |
|
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 | |
2 |
|
2 | |||
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "purge=" >> $HGRCPATH |
|
4 | $ echo "purge=" >> $HGRCPATH | |
5 | $ echo "graphlog=" >> $HGRCPATH |
|
5 | $ echo "graphlog=" >> $HGRCPATH | |
6 |
|
6 | |||
7 | $ shortlog() { |
|
7 | $ shortlog() { | |
8 | > hg glog --template '{rev}:{node|short} {author} {date|hgdate} - {branch} - {desc|firstline}\n' |
|
8 | > hg glog --template '{rev}:{node|short} {author} {date|hgdate} - {branch} - {desc|firstline}\n' | |
9 | > } |
|
9 | > } | |
10 |
|
10 | |||
11 | Test --bypass with other options |
|
11 | Test --bypass with other options | |
12 |
|
12 | |||
13 | $ hg init repo-options |
|
13 | $ hg init repo-options | |
14 | $ cd repo-options |
|
14 | $ cd repo-options | |
15 | $ echo a > a |
|
15 | $ echo a > a | |
16 | $ hg ci -Am adda |
|
16 | $ hg ci -Am adda | |
17 | adding a |
|
17 | adding a | |
18 | $ echo a >> a |
|
18 | $ echo a >> a | |
19 | $ hg branch foo |
|
19 | $ hg branch foo | |
20 | marked working directory as branch foo |
|
20 | marked working directory as branch foo | |
21 | $ hg ci -Am changea |
|
21 | $ hg ci -Am changea | |
22 | $ hg export . > ../test.diff |
|
22 | $ hg export . > ../test.diff | |
23 | $ hg up null |
|
23 | $ hg up null | |
24 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
25 |
|
25 | |||
26 | Test importing an existing revision |
|
26 | Test importing an existing revision | |
27 |
|
27 | |||
28 | $ hg import --bypass --exact ../test.diff |
|
28 | $ hg import --bypass --exact ../test.diff | |
29 | applying ../test.diff |
|
29 | applying ../test.diff | |
30 | $ shortlog |
|
30 | $ shortlog | |
31 | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
31 | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
32 | | |
|
32 | | | |
33 | o 0:07f494440405 test 0 0 - default - adda |
|
33 | o 0:07f494440405 test 0 0 - default - adda | |
34 |
|
34 | |||
35 |
|
35 | |||
36 | Test failure without --exact |
|
36 | Test failure without --exact | |
37 |
|
37 | |||
38 | $ hg import --bypass ../test.diff |
|
38 | $ hg import --bypass ../test.diff | |
39 | applying ../test.diff |
|
39 | applying ../test.diff | |
40 | unable to find 'a' for patching |
|
40 | unable to find 'a' for patching | |
41 | abort: patch failed to apply |
|
41 | abort: patch failed to apply | |
42 | [255] |
|
42 | [255] | |
43 | $ hg st |
|
43 | $ hg st | |
44 | $ shortlog |
|
44 | $ shortlog | |
45 | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
45 | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
46 | | |
|
46 | | | |
47 | o 0:07f494440405 test 0 0 - default - adda |
|
47 | o 0:07f494440405 test 0 0 - default - adda | |
48 |
|
48 | |||
49 |
|
49 | |||
50 | Test --user, --date and --message |
|
50 | Test --user, --date and --message | |
51 |
|
51 | |||
52 | $ hg up 0 |
|
52 | $ hg up 0 | |
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
54 | $ hg import --bypass --u test2 -d '1 0' -m patch2 ../test.diff |
|
54 | $ hg import --bypass --u test2 -d '1 0' -m patch2 ../test.diff | |
55 | applying ../test.diff |
|
55 | applying ../test.diff | |
56 | $ cat .hg/last-message.txt |
|
56 | $ cat .hg/last-message.txt | |
57 | patch2 (no-eol) |
|
57 | patch2 (no-eol) | |
58 | $ shortlog |
|
58 | $ shortlog | |
59 | o 2:2e127d1da504 test2 1 0 - default - patch2 |
|
59 | o 2:2e127d1da504 test2 1 0 - default - patch2 | |
60 | | |
|
60 | | | |
61 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
61 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
62 | |/ |
|
62 | |/ | |
63 | @ 0:07f494440405 test 0 0 - default - adda |
|
63 | @ 0:07f494440405 test 0 0 - default - adda | |
64 |
|
64 | |||
65 | $ hg rollback |
|
65 | $ hg rollback | |
66 | repository tip rolled back to revision 1 (undo import) |
|
66 | repository tip rolled back to revision 1 (undo import) | |
67 |
|
67 | |||
68 | Test --import-branch |
|
68 | Test --import-branch | |
69 |
|
69 | |||
70 | $ hg import --bypass --import-branch ../test.diff |
|
70 | $ hg import --bypass --import-branch ../test.diff | |
71 | applying ../test.diff |
|
71 | applying ../test.diff | |
72 | $ shortlog |
|
72 | $ shortlog | |
73 | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
73 | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
74 | | |
|
74 | | | |
75 | @ 0:07f494440405 test 0 0 - default - adda |
|
75 | @ 0:07f494440405 test 0 0 - default - adda | |
76 |
|
76 | |||
77 | $ hg rollback |
|
77 | $ hg rollback | |
78 | repository tip rolled back to revision 1 (undo import) |
|
78 | repository tip rolled back to revision 1 (undo import) | |
79 |
|
79 | |||
80 | Test --strip |
|
80 | Test --strip | |
81 |
|
81 | |||
82 | $ hg import --bypass --strip 0 - <<EOF |
|
82 | $ hg import --bypass --strip 0 - <<EOF | |
83 | > # HG changeset patch |
|
83 | > # HG changeset patch | |
84 | > # User test |
|
84 | > # User test | |
85 | > # Date 0 0 |
|
85 | > # Date 0 0 | |
86 | > # Branch foo |
|
86 | > # Branch foo | |
87 | > # Node ID 4e322f7ce8e3e4203950eac9ece27bf7e45ffa6c |
|
87 | > # Node ID 4e322f7ce8e3e4203950eac9ece27bf7e45ffa6c | |
88 | > # Parent 07f4944404050f47db2e5c5071e0e84e7a27bba9 |
|
88 | > # Parent 07f4944404050f47db2e5c5071e0e84e7a27bba9 | |
89 | > changea |
|
89 | > changea | |
90 | > |
|
90 | > | |
91 | > diff -r 07f494440405 -r 4e322f7ce8e3 a |
|
91 | > diff -r 07f494440405 -r 4e322f7ce8e3 a | |
92 | > --- a Thu Jan 01 00:00:00 1970 +0000 |
|
92 | > --- a Thu Jan 01 00:00:00 1970 +0000 | |
93 | > +++ a Thu Jan 01 00:00:00 1970 +0000 |
|
93 | > +++ a Thu Jan 01 00:00:00 1970 +0000 | |
94 | > @@ -1,1 +1,2 @@ |
|
94 | > @@ -1,1 +1,2 @@ | |
95 | > a |
|
95 | > a | |
96 | > +a |
|
96 | > +a | |
97 | > EOF |
|
97 | > EOF | |
98 | applying patch from stdin |
|
98 | applying patch from stdin | |
99 | $ hg rollback |
|
99 | $ hg rollback | |
100 | repository tip rolled back to revision 1 (undo import) |
|
100 | repository tip rolled back to revision 1 (undo import) | |
101 |
|
101 | |||
102 | Test unsupported combinations |
|
102 | Test unsupported combinations | |
103 |
|
103 | |||
104 | $ hg import --bypass --no-commit ../test.diff |
|
104 | $ hg import --bypass --no-commit ../test.diff | |
105 | abort: cannot use --no-commit with --bypass |
|
105 | abort: cannot use --no-commit with --bypass | |
106 | [255] |
|
106 | [255] | |
107 | $ hg import --bypass --similarity 50 ../test.diff |
|
107 | $ hg import --bypass --similarity 50 ../test.diff | |
108 | abort: cannot use --similarity with --bypass |
|
108 | abort: cannot use --similarity with --bypass | |
109 | [255] |
|
109 | [255] | |
110 |
|
110 | |||
111 | Test commit editor |
|
111 | Test commit editor | |
112 |
|
112 | |||
113 | $ hg diff -c 1 > ../test.diff |
|
113 | $ hg diff -c 1 > ../test.diff | |
114 | $ HGEDITOR=cat hg import --bypass ../test.diff |
|
114 | $ HGEDITOR=cat hg import --bypass ../test.diff | |
115 | applying ../test.diff |
|
115 | applying ../test.diff | |
116 |
|
116 | |||
117 |
|
117 | |||
118 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
118 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
119 | HG: Leave message empty to abort commit. |
|
119 | HG: Leave message empty to abort commit. | |
120 | HG: -- |
|
120 | HG: -- | |
121 | HG: user: test |
|
121 | HG: user: test | |
122 | HG: branch 'default' |
|
122 | HG: branch 'default' | |
123 | HG: changed a |
|
123 | HG: changed a | |
124 | abort: empty commit message |
|
124 | abort: empty commit message | |
125 | [255] |
|
125 | [255] | |
126 |
|
126 | |||
127 | Test patch.eol is handled |
|
127 | Test patch.eol is handled | |
128 |
|
128 | |||
129 | $ python -c 'file("a", "wb").write("a\r\n")' |
|
129 | $ python -c 'file("a", "wb").write("a\r\n")' | |
130 | $ hg ci -m makeacrlf |
|
130 | $ hg ci -m makeacrlf | |
131 | $ hg import -m 'should fail because of eol' --bypass ../test.diff |
|
131 | $ hg import -m 'should fail because of eol' --bypass ../test.diff | |
132 | applying ../test.diff |
|
132 | applying ../test.diff | |
133 | patching file a |
|
133 | patching file a | |
134 | Hunk #1 FAILED at 0 |
|
134 | Hunk #1 FAILED at 0 | |
135 | abort: patch failed to apply |
|
135 | abort: patch failed to apply | |
136 | [255] |
|
136 | [255] | |
137 | $ hg --config patch.eol=auto import -d '0 0' -m 'test patch.eol' --bypass ../test.diff |
|
137 | $ hg --config patch.eol=auto import -d '0 0' -m 'test patch.eol' --bypass ../test.diff | |
138 | applying ../test.diff |
|
138 | applying ../test.diff | |
139 | $ shortlog |
|
139 | $ shortlog | |
140 | o 3:d7805b4d2cb3 test 0 0 - default - test patch.eol |
|
140 | o 3:d7805b4d2cb3 test 0 0 - default - test patch.eol | |
141 | | |
|
141 | | | |
142 | @ 2:872023de769d test 0 0 - default - makeacrlf |
|
142 | @ 2:872023de769d test 0 0 - default - makeacrlf | |
143 | | |
|
143 | | | |
144 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
144 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
145 | |/ |
|
145 | |/ | |
146 | o 0:07f494440405 test 0 0 - default - adda |
|
146 | o 0:07f494440405 test 0 0 - default - adda | |
147 |
|
147 | |||
148 |
|
148 | |||
149 | Test applying multiple patches |
|
149 | Test applying multiple patches | |
150 |
|
150 | |||
151 | $ hg up -qC 0 |
|
151 | $ hg up -qC 0 | |
152 | $ echo e > e |
|
152 | $ echo e > e | |
153 | $ hg ci -Am adde |
|
153 | $ hg ci -Am adde | |
154 | adding e |
|
154 | adding e | |
155 | created new head |
|
155 | created new head | |
156 | $ hg export . > ../patch1.diff |
|
156 | $ hg export . > ../patch1.diff | |
157 | $ hg up -qC 1 |
|
157 | $ hg up -qC 1 | |
158 | $ echo f > f |
|
158 | $ echo f > f | |
159 | $ hg ci -Am addf |
|
159 | $ hg ci -Am addf | |
160 | adding f |
|
160 | adding f | |
161 | $ hg export . > ../patch2.diff |
|
161 | $ hg export . > ../patch2.diff | |
162 | $ cd .. |
|
162 | $ cd .. | |
163 | $ hg clone -r1 repo-options repo-multi1 |
|
163 | $ hg clone -r1 repo-options repo-multi1 | |
164 | adding changesets |
|
164 | adding changesets | |
165 | adding manifests |
|
165 | adding manifests | |
166 | adding file changes |
|
166 | adding file changes | |
167 | added 2 changesets with 2 changes to 1 files |
|
167 | added 2 changesets with 2 changes to 1 files | |
168 | updating to branch foo |
|
168 | updating to branch foo | |
169 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
169 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
170 | $ cd repo-multi1 |
|
170 | $ cd repo-multi1 | |
171 | $ hg up 0 |
|
171 | $ hg up 0 | |
172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
173 | $ hg import --bypass ../patch1.diff ../patch2.diff |
|
173 | $ hg import --bypass ../patch1.diff ../patch2.diff | |
174 | applying ../patch1.diff |
|
174 | applying ../patch1.diff | |
175 | applying ../patch2.diff |
|
175 | applying ../patch2.diff | |
176 | $ shortlog |
|
176 | $ shortlog | |
177 | o 3:bc8ca3f8a7c4 test 0 0 - default - addf |
|
177 | o 3:bc8ca3f8a7c4 test 0 0 - default - addf | |
178 | | |
|
178 | | | |
179 | o 2:16581080145e test 0 0 - default - adde |
|
179 | o 2:16581080145e test 0 0 - default - adde | |
180 | | |
|
180 | | | |
181 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
181 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
182 | |/ |
|
182 | |/ | |
183 | @ 0:07f494440405 test 0 0 - default - adda |
|
183 | @ 0:07f494440405 test 0 0 - default - adda | |
184 |
|
184 | |||
185 |
|
185 | |||
186 | Test applying multiple patches with --exact |
|
186 | Test applying multiple patches with --exact | |
187 |
|
187 | |||
188 | $ cd .. |
|
188 | $ cd .. | |
189 | $ hg clone -r1 repo-options repo-multi2 |
|
189 | $ hg clone -r1 repo-options repo-multi2 | |
190 | adding changesets |
|
190 | adding changesets | |
191 | adding manifests |
|
191 | adding manifests | |
192 | adding file changes |
|
192 | adding file changes | |
193 | added 2 changesets with 2 changes to 1 files |
|
193 | added 2 changesets with 2 changes to 1 files | |
194 | updating to branch foo |
|
194 | updating to branch foo | |
195 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
195 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
196 | $ cd repo-multi2 |
|
196 | $ cd repo-multi2 | |
197 | $ hg import --bypass --exact ../patch1.diff ../patch2.diff |
|
197 | $ hg import --bypass --exact ../patch1.diff ../patch2.diff | |
198 | applying ../patch1.diff |
|
198 | applying ../patch1.diff | |
199 | applying ../patch2.diff |
|
199 | applying ../patch2.diff | |
200 | $ shortlog |
|
200 | $ shortlog | |
201 | o 3:d60cb8989666 test 0 0 - foo - addf |
|
201 | o 3:d60cb8989666 test 0 0 - foo - addf | |
202 | | |
|
202 | | | |
203 | | o 2:16581080145e test 0 0 - default - adde |
|
203 | | o 2:16581080145e test 0 0 - default - adde | |
204 | | | |
|
204 | | | | |
205 | @ | 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
205 | @ | 1:4e322f7ce8e3 test 0 0 - foo - changea | |
206 | |/ |
|
206 | |/ | |
207 | o 0:07f494440405 test 0 0 - default - adda |
|
207 | o 0:07f494440405 test 0 0 - default - adda | |
208 |
|
208 | |||
209 |
|
209 | |||
210 | $ cd .. |
|
210 | $ cd .. | |
211 |
|
211 | |||
212 | Test complicated patch with --exact |
|
212 | Test complicated patch with --exact | |
213 |
|
213 | |||
214 | $ hg init repo-exact |
|
214 | $ hg init repo-exact | |
215 | $ cd repo-exact |
|
215 | $ cd repo-exact | |
216 | $ echo a > a |
|
216 | $ echo a > a | |
217 | $ echo c > c |
|
217 | $ echo c > c | |
218 | $ echo d > d |
|
218 | $ echo d > d | |
219 | $ echo e > e |
|
219 | $ echo e > e | |
220 | $ echo f > f |
|
220 | $ echo f > f | |
221 | $ chmod +x f |
|
221 | $ chmod +x f | |
222 | $ ln -s c linkc |
|
222 | $ ln -s c linkc | |
223 | $ hg ci -Am t |
|
223 | $ hg ci -Am t | |
224 | adding a |
|
224 | adding a | |
225 | adding c |
|
225 | adding c | |
226 | adding d |
|
226 | adding d | |
227 | adding e |
|
227 | adding e | |
228 | adding f |
|
228 | adding f | |
229 | adding linkc |
|
229 | adding linkc | |
230 | $ hg cp a aa1 |
|
230 | $ hg cp a aa1 | |
231 | $ echo b >> a |
|
231 | $ echo b >> a | |
232 | $ echo b > b |
|
232 | $ echo b > b | |
233 | $ hg add b |
|
233 | $ hg add b | |
234 | $ hg cp a aa2 |
|
234 | $ hg cp a aa2 | |
235 | $ echo aa >> aa2 |
|
235 | $ echo aa >> aa2 | |
236 | $ chmod +x e |
|
236 | $ chmod +x e | |
237 | $ chmod -x f |
|
237 | $ chmod -x f | |
238 | $ ln -s a linka |
|
238 | $ ln -s a linka | |
239 | $ hg rm d |
|
239 | $ hg rm d | |
240 | $ hg rm linkc |
|
240 | $ hg rm linkc | |
241 | $ hg mv c cc |
|
241 | $ hg mv c cc | |
242 | $ hg ci -m patch |
|
242 | $ hg ci -m patch | |
243 | $ hg export --git . > ../test.diff |
|
243 | $ hg export --git . > ../test.diff | |
244 | $ hg up -C null |
|
244 | $ hg up -C null | |
245 | 0 files updated, 0 files merged, 7 files removed, 0 files unresolved |
|
245 | 0 files updated, 0 files merged, 7 files removed, 0 files unresolved | |
246 | $ hg purge |
|
246 | $ hg purge | |
247 | $ hg st |
|
247 | $ hg st | |
248 | $ hg import --bypass --exact ../test.diff |
|
248 | $ hg import --bypass --exact ../test.diff | |
249 | applying ../test.diff |
|
249 | applying ../test.diff | |
250 |
|
250 | |||
251 | The patch should have matched the exported revision and generated no additional |
|
251 | The patch should have matched the exported revision and generated no additional | |
252 | data. If not, diff both heads to debug it. |
|
252 | data. If not, diff both heads to debug it. | |
253 |
|
253 | |||
254 | $ shortlog |
|
254 | $ shortlog | |
255 | o 1:2978fd5c8aa4 test 0 0 - default - patch |
|
255 | o 1:2978fd5c8aa4 test 0 0 - default - patch | |
256 | | |
|
256 | | | |
257 | o 0:a0e19e636a43 test 0 0 - default - t |
|
257 | o 0:a0e19e636a43 test 0 0 - default - t | |
258 |
|
258 |
@@ -1,69 +1,71 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | Create extension that can disable exec checks: |
|
3 | Create extension that can disable exec checks: | |
2 |
|
4 | |||
3 | $ cat > noexec.py <<EOF |
|
5 | $ cat > noexec.py <<EOF | |
4 | > from mercurial import extensions, util |
|
6 | > from mercurial import extensions, util | |
5 | > def setflags(orig, f, l, x): |
|
7 | > def setflags(orig, f, l, x): | |
6 | > pass |
|
8 | > pass | |
7 | > def checkexec(orig, path): |
|
9 | > def checkexec(orig, path): | |
8 | > return False |
|
10 | > return False | |
9 | > def extsetup(ui): |
|
11 | > def extsetup(ui): | |
10 | > extensions.wrapfunction(util, 'setflags', setflags) |
|
12 | > extensions.wrapfunction(util, 'setflags', setflags) | |
11 | > extensions.wrapfunction(util, 'checkexec', checkexec) |
|
13 | > extensions.wrapfunction(util, 'checkexec', checkexec) | |
12 | > EOF |
|
14 | > EOF | |
13 |
|
15 | |||
14 | $ hg init unix-repo |
|
16 | $ hg init unix-repo | |
15 | $ cd unix-repo |
|
17 | $ cd unix-repo | |
16 | $ touch a |
|
18 | $ touch a | |
17 | $ hg add a |
|
19 | $ hg add a | |
18 | $ hg commit -m 'unix: add a' |
|
20 | $ hg commit -m 'unix: add a' | |
19 | $ hg clone . ../win-repo |
|
21 | $ hg clone . ../win-repo | |
20 | updating to branch default |
|
22 | updating to branch default | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | $ chmod +x a |
|
24 | $ chmod +x a | |
23 | $ hg commit -m 'unix: chmod a' |
|
25 | $ hg commit -m 'unix: chmod a' | |
24 | $ hg manifest -v |
|
26 | $ hg manifest -v | |
25 | 755 * a |
|
27 | 755 * a | |
26 |
|
28 | |||
27 | $ cd ../win-repo |
|
29 | $ cd ../win-repo | |
28 |
|
30 | |||
29 | $ touch b |
|
31 | $ touch b | |
30 | $ hg add b |
|
32 | $ hg add b | |
31 | $ hg commit -m 'win: add b' |
|
33 | $ hg commit -m 'win: add b' | |
32 |
|
34 | |||
33 | $ hg manifest -v |
|
35 | $ hg manifest -v | |
34 | 644 a |
|
36 | 644 a | |
35 | 644 b |
|
37 | 644 b | |
36 |
|
38 | |||
37 | $ hg pull |
|
39 | $ hg pull | |
38 | pulling from $TESTTMP/unix-repo |
|
40 | pulling from $TESTTMP/unix-repo | |
39 | searching for changes |
|
41 | searching for changes | |
40 | adding changesets |
|
42 | adding changesets | |
41 | adding manifests |
|
43 | adding manifests | |
42 | adding file changes |
|
44 | adding file changes | |
43 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
45 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
44 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
46 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
45 |
|
47 | |||
46 | $ hg manifest -v -r tip |
|
48 | $ hg manifest -v -r tip | |
47 | 755 * a |
|
49 | 755 * a | |
48 |
|
50 | |||
49 | Simulate a Windows merge: |
|
51 | Simulate a Windows merge: | |
50 |
|
52 | |||
51 | $ hg --config extensions.n=$TESTTMP/noexec.py merge --debug |
|
53 | $ hg --config extensions.n=$TESTTMP/noexec.py merge --debug | |
52 | searching for copies back to rev 1 |
|
54 | searching for copies back to rev 1 | |
53 | unmatched files in local: |
|
55 | unmatched files in local: | |
54 | b |
|
56 | b | |
55 | resolving manifests |
|
57 | resolving manifests | |
56 | overwrite None partial False |
|
58 | overwrite None partial False | |
57 | ancestor a03b0deabf2b local d6fa54f68ae1+ remote 2d8bcf2dda39 |
|
59 | ancestor a03b0deabf2b local d6fa54f68ae1+ remote 2d8bcf2dda39 | |
58 | a: update permissions -> e |
|
60 | a: update permissions -> e | |
59 | updating: a 1/1 files (100.00%) |
|
61 | updating: a 1/1 files (100.00%) | |
60 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
61 | (branch merge, don't forget to commit) |
|
63 | (branch merge, don't forget to commit) | |
62 |
|
64 | |||
63 | Simulate a Windows commit: |
|
65 | Simulate a Windows commit: | |
64 |
|
66 | |||
65 | $ hg --config extensions.n=$TESTTMP/noexec.py commit -m 'win: merge' |
|
67 | $ hg --config extensions.n=$TESTTMP/noexec.py commit -m 'win: merge' | |
66 |
|
68 | |||
67 | $ hg manifest -v |
|
69 | $ hg manifest -v | |
68 | 755 * a |
|
70 | 755 * a | |
69 | 644 b |
|
71 | 644 b |
@@ -1,1158 +1,1160 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | $ hg init a |
|
3 | $ hg init a | |
2 |
|
4 | |||
3 | $ cd a |
|
5 | $ cd a | |
4 | $ echo a > a |
|
6 | $ echo a > a | |
5 | $ hg ci -Ama -d '1 0' |
|
7 | $ hg ci -Ama -d '1 0' | |
6 | adding a |
|
8 | adding a | |
7 |
|
9 | |||
8 | $ hg cp a b |
|
10 | $ hg cp a b | |
9 | $ hg ci -mb -d '2 0' |
|
11 | $ hg ci -mb -d '2 0' | |
10 |
|
12 | |||
11 | $ mkdir dir |
|
13 | $ mkdir dir | |
12 | $ hg mv b dir |
|
14 | $ hg mv b dir | |
13 | $ hg ci -mc -d '3 0' |
|
15 | $ hg ci -mc -d '3 0' | |
14 |
|
16 | |||
15 | $ hg mv a b |
|
17 | $ hg mv a b | |
16 | $ echo a > d |
|
18 | $ echo a > d | |
17 | $ hg add d |
|
19 | $ hg add d | |
18 | $ hg ci -md -d '4 0' |
|
20 | $ hg ci -md -d '4 0' | |
19 |
|
21 | |||
20 | $ hg mv dir/b e |
|
22 | $ hg mv dir/b e | |
21 | $ hg ci -me -d '5 0' |
|
23 | $ hg ci -me -d '5 0' | |
22 |
|
24 | |||
23 | $ hg log a |
|
25 | $ hg log a | |
24 | changeset: 0:8580ff50825a |
|
26 | changeset: 0:8580ff50825a | |
25 | user: test |
|
27 | user: test | |
26 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
28 | date: Thu Jan 01 00:00:01 1970 +0000 | |
27 | summary: a |
|
29 | summary: a | |
28 |
|
30 | |||
29 |
|
31 | |||
30 | -f, directory |
|
32 | -f, directory | |
31 |
|
33 | |||
32 | $ hg log -f dir |
|
34 | $ hg log -f dir | |
33 | abort: cannot follow nonexistent file: "dir" |
|
35 | abort: cannot follow nonexistent file: "dir" | |
34 | [255] |
|
36 | [255] | |
35 |
|
37 | |||
36 | -f, but no args |
|
38 | -f, but no args | |
37 |
|
39 | |||
38 | $ hg log -f |
|
40 | $ hg log -f | |
39 | changeset: 4:66c1345dc4f9 |
|
41 | changeset: 4:66c1345dc4f9 | |
40 | tag: tip |
|
42 | tag: tip | |
41 | user: test |
|
43 | user: test | |
42 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
44 | date: Thu Jan 01 00:00:05 1970 +0000 | |
43 | summary: e |
|
45 | summary: e | |
44 |
|
46 | |||
45 | changeset: 3:7c6c671bb7cc |
|
47 | changeset: 3:7c6c671bb7cc | |
46 | user: test |
|
48 | user: test | |
47 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
49 | date: Thu Jan 01 00:00:04 1970 +0000 | |
48 | summary: d |
|
50 | summary: d | |
49 |
|
51 | |||
50 | changeset: 2:41dd4284081e |
|
52 | changeset: 2:41dd4284081e | |
51 | user: test |
|
53 | user: test | |
52 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
54 | date: Thu Jan 01 00:00:03 1970 +0000 | |
53 | summary: c |
|
55 | summary: c | |
54 |
|
56 | |||
55 | changeset: 1:784de7cef101 |
|
57 | changeset: 1:784de7cef101 | |
56 | user: test |
|
58 | user: test | |
57 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
59 | date: Thu Jan 01 00:00:02 1970 +0000 | |
58 | summary: b |
|
60 | summary: b | |
59 |
|
61 | |||
60 | changeset: 0:8580ff50825a |
|
62 | changeset: 0:8580ff50825a | |
61 | user: test |
|
63 | user: test | |
62 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
64 | date: Thu Jan 01 00:00:01 1970 +0000 | |
63 | summary: a |
|
65 | summary: a | |
64 |
|
66 | |||
65 |
|
67 | |||
66 | one rename |
|
68 | one rename | |
67 |
|
69 | |||
68 | $ hg log -vf a |
|
70 | $ hg log -vf a | |
69 | changeset: 0:8580ff50825a |
|
71 | changeset: 0:8580ff50825a | |
70 | user: test |
|
72 | user: test | |
71 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
73 | date: Thu Jan 01 00:00:01 1970 +0000 | |
72 | files: a |
|
74 | files: a | |
73 | description: |
|
75 | description: | |
74 | a |
|
76 | a | |
75 |
|
77 | |||
76 |
|
78 | |||
77 |
|
79 | |||
78 | many renames |
|
80 | many renames | |
79 |
|
81 | |||
80 | $ hg log -vf e |
|
82 | $ hg log -vf e | |
81 | changeset: 4:66c1345dc4f9 |
|
83 | changeset: 4:66c1345dc4f9 | |
82 | tag: tip |
|
84 | tag: tip | |
83 | user: test |
|
85 | user: test | |
84 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
86 | date: Thu Jan 01 00:00:05 1970 +0000 | |
85 | files: dir/b e |
|
87 | files: dir/b e | |
86 | description: |
|
88 | description: | |
87 | e |
|
89 | e | |
88 |
|
90 | |||
89 |
|
91 | |||
90 | changeset: 2:41dd4284081e |
|
92 | changeset: 2:41dd4284081e | |
91 | user: test |
|
93 | user: test | |
92 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
94 | date: Thu Jan 01 00:00:03 1970 +0000 | |
93 | files: b dir/b |
|
95 | files: b dir/b | |
94 | description: |
|
96 | description: | |
95 | c |
|
97 | c | |
96 |
|
98 | |||
97 |
|
99 | |||
98 | changeset: 1:784de7cef101 |
|
100 | changeset: 1:784de7cef101 | |
99 | user: test |
|
101 | user: test | |
100 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
102 | date: Thu Jan 01 00:00:02 1970 +0000 | |
101 | files: b |
|
103 | files: b | |
102 | description: |
|
104 | description: | |
103 | b |
|
105 | b | |
104 |
|
106 | |||
105 |
|
107 | |||
106 | changeset: 0:8580ff50825a |
|
108 | changeset: 0:8580ff50825a | |
107 | user: test |
|
109 | user: test | |
108 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
110 | date: Thu Jan 01 00:00:01 1970 +0000 | |
109 | files: a |
|
111 | files: a | |
110 | description: |
|
112 | description: | |
111 | a |
|
113 | a | |
112 |
|
114 | |||
113 |
|
115 | |||
114 |
|
116 | |||
115 |
|
117 | |||
116 | log -pf dir/b |
|
118 | log -pf dir/b | |
117 |
|
119 | |||
118 | $ hg log -pf dir/b |
|
120 | $ hg log -pf dir/b | |
119 | changeset: 2:41dd4284081e |
|
121 | changeset: 2:41dd4284081e | |
120 | user: test |
|
122 | user: test | |
121 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
123 | date: Thu Jan 01 00:00:03 1970 +0000 | |
122 | summary: c |
|
124 | summary: c | |
123 |
|
125 | |||
124 | diff -r 784de7cef101 -r 41dd4284081e dir/b |
|
126 | diff -r 784de7cef101 -r 41dd4284081e dir/b | |
125 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
127 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
126 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
128 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
127 | @@ -0,0 +1,1 @@ |
|
129 | @@ -0,0 +1,1 @@ | |
128 | +a |
|
130 | +a | |
129 |
|
131 | |||
130 | changeset: 1:784de7cef101 |
|
132 | changeset: 1:784de7cef101 | |
131 | user: test |
|
133 | user: test | |
132 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
134 | date: Thu Jan 01 00:00:02 1970 +0000 | |
133 | summary: b |
|
135 | summary: b | |
134 |
|
136 | |||
135 | diff -r 8580ff50825a -r 784de7cef101 b |
|
137 | diff -r 8580ff50825a -r 784de7cef101 b | |
136 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
138 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
137 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
139 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
138 | @@ -0,0 +1,1 @@ |
|
140 | @@ -0,0 +1,1 @@ | |
139 | +a |
|
141 | +a | |
140 |
|
142 | |||
141 | changeset: 0:8580ff50825a |
|
143 | changeset: 0:8580ff50825a | |
142 | user: test |
|
144 | user: test | |
143 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
145 | date: Thu Jan 01 00:00:01 1970 +0000 | |
144 | summary: a |
|
146 | summary: a | |
145 |
|
147 | |||
146 | diff -r 000000000000 -r 8580ff50825a a |
|
148 | diff -r 000000000000 -r 8580ff50825a a | |
147 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
149 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
148 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
150 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
149 | @@ -0,0 +1,1 @@ |
|
151 | @@ -0,0 +1,1 @@ | |
150 | +a |
|
152 | +a | |
151 |
|
153 | |||
152 |
|
154 | |||
153 | log -vf dir/b |
|
155 | log -vf dir/b | |
154 |
|
156 | |||
155 | $ hg log -vf dir/b |
|
157 | $ hg log -vf dir/b | |
156 | changeset: 2:41dd4284081e |
|
158 | changeset: 2:41dd4284081e | |
157 | user: test |
|
159 | user: test | |
158 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
160 | date: Thu Jan 01 00:00:03 1970 +0000 | |
159 | files: b dir/b |
|
161 | files: b dir/b | |
160 | description: |
|
162 | description: | |
161 | c |
|
163 | c | |
162 |
|
164 | |||
163 |
|
165 | |||
164 | changeset: 1:784de7cef101 |
|
166 | changeset: 1:784de7cef101 | |
165 | user: test |
|
167 | user: test | |
166 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
168 | date: Thu Jan 01 00:00:02 1970 +0000 | |
167 | files: b |
|
169 | files: b | |
168 | description: |
|
170 | description: | |
169 | b |
|
171 | b | |
170 |
|
172 | |||
171 |
|
173 | |||
172 | changeset: 0:8580ff50825a |
|
174 | changeset: 0:8580ff50825a | |
173 | user: test |
|
175 | user: test | |
174 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
176 | date: Thu Jan 01 00:00:01 1970 +0000 | |
175 | files: a |
|
177 | files: a | |
176 | description: |
|
178 | description: | |
177 | a |
|
179 | a | |
178 |
|
180 | |||
179 |
|
181 | |||
180 |
|
182 | |||
181 |
|
183 | |||
182 | log copies with --copies |
|
184 | log copies with --copies | |
183 |
|
185 | |||
184 | $ hg log -vC --template '{rev} {file_copies}\n' |
|
186 | $ hg log -vC --template '{rev} {file_copies}\n' | |
185 | 4 e (dir/b) |
|
187 | 4 e (dir/b) | |
186 | 3 b (a) |
|
188 | 3 b (a) | |
187 | 2 dir/b (b) |
|
189 | 2 dir/b (b) | |
188 | 1 b (a) |
|
190 | 1 b (a) | |
189 | 0 |
|
191 | 0 | |
190 |
|
192 | |||
191 | log copies switch without --copies, with old filecopy template |
|
193 | log copies switch without --copies, with old filecopy template | |
192 |
|
194 | |||
193 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' |
|
195 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' | |
194 | 4 |
|
196 | 4 | |
195 | 3 |
|
197 | 3 | |
196 | 2 |
|
198 | 2 | |
197 | 1 |
|
199 | 1 | |
198 | 0 |
|
200 | 0 | |
199 |
|
201 | |||
200 | log copies switch with --copies |
|
202 | log copies switch with --copies | |
201 |
|
203 | |||
202 | $ hg log -vC --template '{rev} {file_copies_switch}\n' |
|
204 | $ hg log -vC --template '{rev} {file_copies_switch}\n' | |
203 | 4 e (dir/b) |
|
205 | 4 e (dir/b) | |
204 | 3 b (a) |
|
206 | 3 b (a) | |
205 | 2 dir/b (b) |
|
207 | 2 dir/b (b) | |
206 | 1 b (a) |
|
208 | 1 b (a) | |
207 | 0 |
|
209 | 0 | |
208 |
|
210 | |||
209 |
|
211 | |||
210 | log copies with hardcoded style and with --style=default |
|
212 | log copies with hardcoded style and with --style=default | |
211 |
|
213 | |||
212 | $ hg log -vC -r4 |
|
214 | $ hg log -vC -r4 | |
213 | changeset: 4:66c1345dc4f9 |
|
215 | changeset: 4:66c1345dc4f9 | |
214 | tag: tip |
|
216 | tag: tip | |
215 | user: test |
|
217 | user: test | |
216 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
218 | date: Thu Jan 01 00:00:05 1970 +0000 | |
217 | files: dir/b e |
|
219 | files: dir/b e | |
218 | copies: e (dir/b) |
|
220 | copies: e (dir/b) | |
219 | description: |
|
221 | description: | |
220 | e |
|
222 | e | |
221 |
|
223 | |||
222 |
|
224 | |||
223 | $ hg log -vC -r4 --style=default |
|
225 | $ hg log -vC -r4 --style=default | |
224 | changeset: 4:66c1345dc4f9 |
|
226 | changeset: 4:66c1345dc4f9 | |
225 | tag: tip |
|
227 | tag: tip | |
226 | user: test |
|
228 | user: test | |
227 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
229 | date: Thu Jan 01 00:00:05 1970 +0000 | |
228 | files: dir/b e |
|
230 | files: dir/b e | |
229 | copies: e (dir/b) |
|
231 | copies: e (dir/b) | |
230 | description: |
|
232 | description: | |
231 | e |
|
233 | e | |
232 |
|
234 | |||
233 |
|
235 | |||
234 |
|
236 | |||
235 |
|
237 | |||
236 | log copies, non-linear manifest |
|
238 | log copies, non-linear manifest | |
237 |
|
239 | |||
238 | $ hg up -C 3 |
|
240 | $ hg up -C 3 | |
239 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
241 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
240 | $ hg mv dir/b e |
|
242 | $ hg mv dir/b e | |
241 | $ echo foo > foo |
|
243 | $ echo foo > foo | |
242 | $ hg ci -Ame2 -d '6 0' |
|
244 | $ hg ci -Ame2 -d '6 0' | |
243 | adding foo |
|
245 | adding foo | |
244 | created new head |
|
246 | created new head | |
245 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 |
|
247 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 | |
246 | 5 e (dir/b) |
|
248 | 5 e (dir/b) | |
247 |
|
249 | |||
248 |
|
250 | |||
249 | log copies, execute bit set |
|
251 | log copies, execute bit set | |
250 |
|
252 | |||
251 | $ chmod +x e |
|
253 | $ chmod +x e | |
252 | $ hg ci -me3 -d '7 0' |
|
254 | $ hg ci -me3 -d '7 0' | |
253 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 |
|
255 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 | |
254 | 6 |
|
256 | 6 | |
255 |
|
257 | |||
256 |
|
258 | |||
257 | log -p d |
|
259 | log -p d | |
258 |
|
260 | |||
259 | $ hg log -pv d |
|
261 | $ hg log -pv d | |
260 | changeset: 3:7c6c671bb7cc |
|
262 | changeset: 3:7c6c671bb7cc | |
261 | user: test |
|
263 | user: test | |
262 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
264 | date: Thu Jan 01 00:00:04 1970 +0000 | |
263 | files: a b d |
|
265 | files: a b d | |
264 | description: |
|
266 | description: | |
265 | d |
|
267 | d | |
266 |
|
268 | |||
267 |
|
269 | |||
268 | diff -r 41dd4284081e -r 7c6c671bb7cc d |
|
270 | diff -r 41dd4284081e -r 7c6c671bb7cc d | |
269 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
271 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
270 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
272 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
271 | @@ -0,0 +1,1 @@ |
|
273 | @@ -0,0 +1,1 @@ | |
272 | +a |
|
274 | +a | |
273 |
|
275 | |||
274 |
|
276 | |||
275 |
|
277 | |||
276 | log --removed file |
|
278 | log --removed file | |
277 |
|
279 | |||
278 | $ hg log --removed -v a |
|
280 | $ hg log --removed -v a | |
279 | changeset: 3:7c6c671bb7cc |
|
281 | changeset: 3:7c6c671bb7cc | |
280 | user: test |
|
282 | user: test | |
281 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
283 | date: Thu Jan 01 00:00:04 1970 +0000 | |
282 | files: a b d |
|
284 | files: a b d | |
283 | description: |
|
285 | description: | |
284 | d |
|
286 | d | |
285 |
|
287 | |||
286 |
|
288 | |||
287 | changeset: 0:8580ff50825a |
|
289 | changeset: 0:8580ff50825a | |
288 | user: test |
|
290 | user: test | |
289 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
291 | date: Thu Jan 01 00:00:01 1970 +0000 | |
290 | files: a |
|
292 | files: a | |
291 | description: |
|
293 | description: | |
292 | a |
|
294 | a | |
293 |
|
295 | |||
294 |
|
296 | |||
295 |
|
297 | |||
296 | log --removed revrange file |
|
298 | log --removed revrange file | |
297 |
|
299 | |||
298 | $ hg log --removed -v -r0:2 a |
|
300 | $ hg log --removed -v -r0:2 a | |
299 | changeset: 0:8580ff50825a |
|
301 | changeset: 0:8580ff50825a | |
300 | user: test |
|
302 | user: test | |
301 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
303 | date: Thu Jan 01 00:00:01 1970 +0000 | |
302 | files: a |
|
304 | files: a | |
303 | description: |
|
305 | description: | |
304 | a |
|
306 | a | |
305 |
|
307 | |||
306 |
|
308 | |||
307 |
|
309 | |||
308 |
|
310 | |||
309 | log --follow tests |
|
311 | log --follow tests | |
310 |
|
312 | |||
311 | $ hg init ../follow |
|
313 | $ hg init ../follow | |
312 | $ cd ../follow |
|
314 | $ cd ../follow | |
313 |
|
315 | |||
314 | $ echo base > base |
|
316 | $ echo base > base | |
315 | $ hg ci -Ambase -d '1 0' |
|
317 | $ hg ci -Ambase -d '1 0' | |
316 | adding base |
|
318 | adding base | |
317 |
|
319 | |||
318 | $ echo r1 >> base |
|
320 | $ echo r1 >> base | |
319 | $ hg ci -Amr1 -d '1 0' |
|
321 | $ hg ci -Amr1 -d '1 0' | |
320 | $ echo r2 >> base |
|
322 | $ echo r2 >> base | |
321 | $ hg ci -Amr2 -d '1 0' |
|
323 | $ hg ci -Amr2 -d '1 0' | |
322 |
|
324 | |||
323 | $ hg up -C 1 |
|
325 | $ hg up -C 1 | |
324 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
326 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
325 | $ echo b1 > b1 |
|
327 | $ echo b1 > b1 | |
326 | $ hg ci -Amb1 -d '1 0' |
|
328 | $ hg ci -Amb1 -d '1 0' | |
327 | adding b1 |
|
329 | adding b1 | |
328 | created new head |
|
330 | created new head | |
329 |
|
331 | |||
330 |
|
332 | |||
331 | log -f |
|
333 | log -f | |
332 |
|
334 | |||
333 | $ hg log -f |
|
335 | $ hg log -f | |
334 | changeset: 3:e62f78d544b4 |
|
336 | changeset: 3:e62f78d544b4 | |
335 | tag: tip |
|
337 | tag: tip | |
336 | parent: 1:3d5bf5654eda |
|
338 | parent: 1:3d5bf5654eda | |
337 | user: test |
|
339 | user: test | |
338 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
340 | date: Thu Jan 01 00:00:01 1970 +0000 | |
339 | summary: b1 |
|
341 | summary: b1 | |
340 |
|
342 | |||
341 | changeset: 1:3d5bf5654eda |
|
343 | changeset: 1:3d5bf5654eda | |
342 | user: test |
|
344 | user: test | |
343 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
345 | date: Thu Jan 01 00:00:01 1970 +0000 | |
344 | summary: r1 |
|
346 | summary: r1 | |
345 |
|
347 | |||
346 | changeset: 0:67e992f2c4f3 |
|
348 | changeset: 0:67e992f2c4f3 | |
347 | user: test |
|
349 | user: test | |
348 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
350 | date: Thu Jan 01 00:00:01 1970 +0000 | |
349 | summary: base |
|
351 | summary: base | |
350 |
|
352 | |||
351 |
|
353 | |||
352 |
|
354 | |||
353 | log -f -r 1:tip |
|
355 | log -f -r 1:tip | |
354 |
|
356 | |||
355 | $ hg up -C 0 |
|
357 | $ hg up -C 0 | |
356 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
358 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
357 | $ echo b2 > b2 |
|
359 | $ echo b2 > b2 | |
358 | $ hg ci -Amb2 -d '1 0' |
|
360 | $ hg ci -Amb2 -d '1 0' | |
359 | adding b2 |
|
361 | adding b2 | |
360 | created new head |
|
362 | created new head | |
361 | $ hg log -f -r 1:tip |
|
363 | $ hg log -f -r 1:tip | |
362 | changeset: 1:3d5bf5654eda |
|
364 | changeset: 1:3d5bf5654eda | |
363 | user: test |
|
365 | user: test | |
364 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
366 | date: Thu Jan 01 00:00:01 1970 +0000 | |
365 | summary: r1 |
|
367 | summary: r1 | |
366 |
|
368 | |||
367 | changeset: 2:60c670bf5b30 |
|
369 | changeset: 2:60c670bf5b30 | |
368 | user: test |
|
370 | user: test | |
369 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
371 | date: Thu Jan 01 00:00:01 1970 +0000 | |
370 | summary: r2 |
|
372 | summary: r2 | |
371 |
|
373 | |||
372 | changeset: 3:e62f78d544b4 |
|
374 | changeset: 3:e62f78d544b4 | |
373 | parent: 1:3d5bf5654eda |
|
375 | parent: 1:3d5bf5654eda | |
374 | user: test |
|
376 | user: test | |
375 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
377 | date: Thu Jan 01 00:00:01 1970 +0000 | |
376 | summary: b1 |
|
378 | summary: b1 | |
377 |
|
379 | |||
378 |
|
380 | |||
379 |
|
381 | |||
380 | log -r . with two parents |
|
382 | log -r . with two parents | |
381 |
|
383 | |||
382 | $ hg up -C 3 |
|
384 | $ hg up -C 3 | |
383 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
385 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
384 | $ hg merge tip |
|
386 | $ hg merge tip | |
385 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
387 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
386 | (branch merge, don't forget to commit) |
|
388 | (branch merge, don't forget to commit) | |
387 | $ hg log -r . |
|
389 | $ hg log -r . | |
388 | changeset: 3:e62f78d544b4 |
|
390 | changeset: 3:e62f78d544b4 | |
389 | parent: 1:3d5bf5654eda |
|
391 | parent: 1:3d5bf5654eda | |
390 | user: test |
|
392 | user: test | |
391 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
393 | date: Thu Jan 01 00:00:01 1970 +0000 | |
392 | summary: b1 |
|
394 | summary: b1 | |
393 |
|
395 | |||
394 |
|
396 | |||
395 |
|
397 | |||
396 | log -r . with one parent |
|
398 | log -r . with one parent | |
397 |
|
399 | |||
398 | $ hg ci -mm12 -d '1 0' |
|
400 | $ hg ci -mm12 -d '1 0' | |
399 | $ hg log -r . |
|
401 | $ hg log -r . | |
400 | changeset: 5:302e9dd6890d |
|
402 | changeset: 5:302e9dd6890d | |
401 | tag: tip |
|
403 | tag: tip | |
402 | parent: 3:e62f78d544b4 |
|
404 | parent: 3:e62f78d544b4 | |
403 | parent: 4:ddb82e70d1a1 |
|
405 | parent: 4:ddb82e70d1a1 | |
404 | user: test |
|
406 | user: test | |
405 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
407 | date: Thu Jan 01 00:00:01 1970 +0000 | |
406 | summary: m12 |
|
408 | summary: m12 | |
407 |
|
409 | |||
408 |
|
410 | |||
409 | $ echo postm >> b1 |
|
411 | $ echo postm >> b1 | |
410 | $ hg ci -Amb1.1 -d'1 0' |
|
412 | $ hg ci -Amb1.1 -d'1 0' | |
411 |
|
413 | |||
412 |
|
414 | |||
413 | log --follow-first |
|
415 | log --follow-first | |
414 |
|
416 | |||
415 | $ hg log --follow-first |
|
417 | $ hg log --follow-first | |
416 | changeset: 6:2404bbcab562 |
|
418 | changeset: 6:2404bbcab562 | |
417 | tag: tip |
|
419 | tag: tip | |
418 | user: test |
|
420 | user: test | |
419 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
421 | date: Thu Jan 01 00:00:01 1970 +0000 | |
420 | summary: b1.1 |
|
422 | summary: b1.1 | |
421 |
|
423 | |||
422 | changeset: 5:302e9dd6890d |
|
424 | changeset: 5:302e9dd6890d | |
423 | parent: 3:e62f78d544b4 |
|
425 | parent: 3:e62f78d544b4 | |
424 | parent: 4:ddb82e70d1a1 |
|
426 | parent: 4:ddb82e70d1a1 | |
425 | user: test |
|
427 | user: test | |
426 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
428 | date: Thu Jan 01 00:00:01 1970 +0000 | |
427 | summary: m12 |
|
429 | summary: m12 | |
428 |
|
430 | |||
429 | changeset: 3:e62f78d544b4 |
|
431 | changeset: 3:e62f78d544b4 | |
430 | parent: 1:3d5bf5654eda |
|
432 | parent: 1:3d5bf5654eda | |
431 | user: test |
|
433 | user: test | |
432 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
434 | date: Thu Jan 01 00:00:01 1970 +0000 | |
433 | summary: b1 |
|
435 | summary: b1 | |
434 |
|
436 | |||
435 | changeset: 1:3d5bf5654eda |
|
437 | changeset: 1:3d5bf5654eda | |
436 | user: test |
|
438 | user: test | |
437 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
439 | date: Thu Jan 01 00:00:01 1970 +0000 | |
438 | summary: r1 |
|
440 | summary: r1 | |
439 |
|
441 | |||
440 | changeset: 0:67e992f2c4f3 |
|
442 | changeset: 0:67e992f2c4f3 | |
441 | user: test |
|
443 | user: test | |
442 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
444 | date: Thu Jan 01 00:00:01 1970 +0000 | |
443 | summary: base |
|
445 | summary: base | |
444 |
|
446 | |||
445 |
|
447 | |||
446 |
|
448 | |||
447 | log -P 2 |
|
449 | log -P 2 | |
448 |
|
450 | |||
449 | $ hg log -P 2 |
|
451 | $ hg log -P 2 | |
450 | changeset: 6:2404bbcab562 |
|
452 | changeset: 6:2404bbcab562 | |
451 | tag: tip |
|
453 | tag: tip | |
452 | user: test |
|
454 | user: test | |
453 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
455 | date: Thu Jan 01 00:00:01 1970 +0000 | |
454 | summary: b1.1 |
|
456 | summary: b1.1 | |
455 |
|
457 | |||
456 | changeset: 5:302e9dd6890d |
|
458 | changeset: 5:302e9dd6890d | |
457 | parent: 3:e62f78d544b4 |
|
459 | parent: 3:e62f78d544b4 | |
458 | parent: 4:ddb82e70d1a1 |
|
460 | parent: 4:ddb82e70d1a1 | |
459 | user: test |
|
461 | user: test | |
460 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
462 | date: Thu Jan 01 00:00:01 1970 +0000 | |
461 | summary: m12 |
|
463 | summary: m12 | |
462 |
|
464 | |||
463 | changeset: 4:ddb82e70d1a1 |
|
465 | changeset: 4:ddb82e70d1a1 | |
464 | parent: 0:67e992f2c4f3 |
|
466 | parent: 0:67e992f2c4f3 | |
465 | user: test |
|
467 | user: test | |
466 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
468 | date: Thu Jan 01 00:00:01 1970 +0000 | |
467 | summary: b2 |
|
469 | summary: b2 | |
468 |
|
470 | |||
469 | changeset: 3:e62f78d544b4 |
|
471 | changeset: 3:e62f78d544b4 | |
470 | parent: 1:3d5bf5654eda |
|
472 | parent: 1:3d5bf5654eda | |
471 | user: test |
|
473 | user: test | |
472 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
474 | date: Thu Jan 01 00:00:01 1970 +0000 | |
473 | summary: b1 |
|
475 | summary: b1 | |
474 |
|
476 | |||
475 |
|
477 | |||
476 |
|
478 | |||
477 | log -r tip -p --git |
|
479 | log -r tip -p --git | |
478 |
|
480 | |||
479 | $ hg log -r tip -p --git |
|
481 | $ hg log -r tip -p --git | |
480 | changeset: 6:2404bbcab562 |
|
482 | changeset: 6:2404bbcab562 | |
481 | tag: tip |
|
483 | tag: tip | |
482 | user: test |
|
484 | user: test | |
483 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
485 | date: Thu Jan 01 00:00:01 1970 +0000 | |
484 | summary: b1.1 |
|
486 | summary: b1.1 | |
485 |
|
487 | |||
486 | diff --git a/b1 b/b1 |
|
488 | diff --git a/b1 b/b1 | |
487 | --- a/b1 |
|
489 | --- a/b1 | |
488 | +++ b/b1 |
|
490 | +++ b/b1 | |
489 | @@ -1,1 +1,2 @@ |
|
491 | @@ -1,1 +1,2 @@ | |
490 | b1 |
|
492 | b1 | |
491 | +postm |
|
493 | +postm | |
492 |
|
494 | |||
493 |
|
495 | |||
494 |
|
496 | |||
495 | log -r "" |
|
497 | log -r "" | |
496 |
|
498 | |||
497 | $ hg log -r '' |
|
499 | $ hg log -r '' | |
498 | hg: parse error: empty query |
|
500 | hg: parse error: empty query | |
499 | [255] |
|
501 | [255] | |
500 |
|
502 | |||
501 | log -r <some unknown node id> |
|
503 | log -r <some unknown node id> | |
502 |
|
504 | |||
503 | $ hg log -r 1000000000000000000000000000000000000000 |
|
505 | $ hg log -r 1000000000000000000000000000000000000000 | |
504 | abort: unknown revision '1000000000000000000000000000000000000000'! |
|
506 | abort: unknown revision '1000000000000000000000000000000000000000'! | |
505 | [255] |
|
507 | [255] | |
506 |
|
508 | |||
507 | log -k r1 |
|
509 | log -k r1 | |
508 |
|
510 | |||
509 | $ hg log -k r1 |
|
511 | $ hg log -k r1 | |
510 | changeset: 1:3d5bf5654eda |
|
512 | changeset: 1:3d5bf5654eda | |
511 | user: test |
|
513 | user: test | |
512 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
514 | date: Thu Jan 01 00:00:01 1970 +0000 | |
513 | summary: r1 |
|
515 | summary: r1 | |
514 |
|
516 | |||
515 | log -d " " (whitespaces only) |
|
517 | log -d " " (whitespaces only) | |
516 |
|
518 | |||
517 | $ hg log -d " " |
|
519 | $ hg log -d " " | |
518 | abort: dates cannot consist entirely of whitespace |
|
520 | abort: dates cannot consist entirely of whitespace | |
519 | [255] |
|
521 | [255] | |
520 |
|
522 | |||
521 | log -d -1 |
|
523 | log -d -1 | |
522 |
|
524 | |||
523 | $ hg log -d -1 |
|
525 | $ hg log -d -1 | |
524 |
|
526 | |||
525 | log -d ">" |
|
527 | log -d ">" | |
526 |
|
528 | |||
527 | $ hg log -d ">" |
|
529 | $ hg log -d ">" | |
528 | abort: invalid day spec, use '>DATE' |
|
530 | abort: invalid day spec, use '>DATE' | |
529 | [255] |
|
531 | [255] | |
530 |
|
532 | |||
531 | log -d "<" |
|
533 | log -d "<" | |
532 |
|
534 | |||
533 | $ hg log -d "<" |
|
535 | $ hg log -d "<" | |
534 | abort: invalid day spec, use '<DATE' |
|
536 | abort: invalid day spec, use '<DATE' | |
535 | [255] |
|
537 | [255] | |
536 |
|
538 | |||
537 | Negative ranges |
|
539 | Negative ranges | |
538 | $ hg log -d "--2" |
|
540 | $ hg log -d "--2" | |
539 | abort: -2 must be nonnegative (see 'hg help dates') |
|
541 | abort: -2 must be nonnegative (see 'hg help dates') | |
540 | [255] |
|
542 | [255] | |
541 |
|
543 | |||
542 |
|
544 | |||
543 | log -p -l2 --color=always |
|
545 | log -p -l2 --color=always | |
544 |
|
546 | |||
545 | $ hg --config extensions.color= --config color.mode=ansi \ |
|
547 | $ hg --config extensions.color= --config color.mode=ansi \ | |
546 | > log -p -l2 --color=always |
|
548 | > log -p -l2 --color=always | |
547 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) |
|
549 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) | |
548 | tag: tip |
|
550 | tag: tip | |
549 | user: test |
|
551 | user: test | |
550 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
552 | date: Thu Jan 01 00:00:01 1970 +0000 | |
551 | summary: b1.1 |
|
553 | summary: b1.1 | |
552 |
|
554 | |||
553 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) |
|
555 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) | |
554 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
556 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
555 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
557 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
556 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) |
|
558 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) | |
557 | b1 |
|
559 | b1 | |
558 | \x1b[0;32m+postm\x1b[0m (esc) |
|
560 | \x1b[0;32m+postm\x1b[0m (esc) | |
559 |
|
561 | |||
560 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) |
|
562 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) | |
561 | parent: 3:e62f78d544b4 |
|
563 | parent: 3:e62f78d544b4 | |
562 | parent: 4:ddb82e70d1a1 |
|
564 | parent: 4:ddb82e70d1a1 | |
563 | user: test |
|
565 | user: test | |
564 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
566 | date: Thu Jan 01 00:00:01 1970 +0000 | |
565 | summary: m12 |
|
567 | summary: m12 | |
566 |
|
568 | |||
567 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) |
|
569 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) | |
568 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) |
|
570 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) | |
569 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
571 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
570 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) |
|
572 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) | |
571 | \x1b[0;32m+b2\x1b[0m (esc) |
|
573 | \x1b[0;32m+b2\x1b[0m (esc) | |
572 |
|
574 | |||
573 |
|
575 | |||
574 |
|
576 | |||
575 | log -r tip --stat |
|
577 | log -r tip --stat | |
576 |
|
578 | |||
577 | $ hg log -r tip --stat |
|
579 | $ hg log -r tip --stat | |
578 | changeset: 6:2404bbcab562 |
|
580 | changeset: 6:2404bbcab562 | |
579 | tag: tip |
|
581 | tag: tip | |
580 | user: test |
|
582 | user: test | |
581 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
583 | date: Thu Jan 01 00:00:01 1970 +0000 | |
582 | summary: b1.1 |
|
584 | summary: b1.1 | |
583 |
|
585 | |||
584 | b1 | 1 + |
|
586 | b1 | 1 + | |
585 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
587 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
586 |
|
588 | |||
587 |
|
589 | |||
588 | $ cd .. |
|
590 | $ cd .. | |
589 |
|
591 | |||
590 | $ hg init usertest |
|
592 | $ hg init usertest | |
591 | $ cd usertest |
|
593 | $ cd usertest | |
592 |
|
594 | |||
593 | $ echo a > a |
|
595 | $ echo a > a | |
594 | $ hg ci -A -m "a" -u "User One <user1@example.org>" |
|
596 | $ hg ci -A -m "a" -u "User One <user1@example.org>" | |
595 | adding a |
|
597 | adding a | |
596 | $ echo b > b |
|
598 | $ echo b > b | |
597 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" |
|
599 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" | |
598 | adding b |
|
600 | adding b | |
599 |
|
601 | |||
600 | $ hg log -u "User One <user1@example.org>" |
|
602 | $ hg log -u "User One <user1@example.org>" | |
601 | changeset: 0:29a4c94f1924 |
|
603 | changeset: 0:29a4c94f1924 | |
602 | user: User One <user1@example.org> |
|
604 | user: User One <user1@example.org> | |
603 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
605 | date: Thu Jan 01 00:00:00 1970 +0000 | |
604 | summary: a |
|
606 | summary: a | |
605 |
|
607 | |||
606 | $ hg log -u "user1" -u "user2" |
|
608 | $ hg log -u "user1" -u "user2" | |
607 | changeset: 1:e834b5e69c0e |
|
609 | changeset: 1:e834b5e69c0e | |
608 | tag: tip |
|
610 | tag: tip | |
609 | user: User Two <user2@example.org> |
|
611 | user: User Two <user2@example.org> | |
610 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
612 | date: Thu Jan 01 00:00:00 1970 +0000 | |
611 | summary: b |
|
613 | summary: b | |
612 |
|
614 | |||
613 | changeset: 0:29a4c94f1924 |
|
615 | changeset: 0:29a4c94f1924 | |
614 | user: User One <user1@example.org> |
|
616 | user: User One <user1@example.org> | |
615 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
617 | date: Thu Jan 01 00:00:00 1970 +0000 | |
616 | summary: a |
|
618 | summary: a | |
617 |
|
619 | |||
618 | $ hg log -u "user3" |
|
620 | $ hg log -u "user3" | |
619 |
|
621 | |||
620 | $ cd .. |
|
622 | $ cd .. | |
621 |
|
623 | |||
622 | $ hg init branches |
|
624 | $ hg init branches | |
623 | $ cd branches |
|
625 | $ cd branches | |
624 |
|
626 | |||
625 | $ echo a > a |
|
627 | $ echo a > a | |
626 | $ hg ci -A -m "commit on default" |
|
628 | $ hg ci -A -m "commit on default" | |
627 | adding a |
|
629 | adding a | |
628 | $ hg branch test |
|
630 | $ hg branch test | |
629 | marked working directory as branch test |
|
631 | marked working directory as branch test | |
630 | $ echo b > b |
|
632 | $ echo b > b | |
631 | $ hg ci -A -m "commit on test" |
|
633 | $ hg ci -A -m "commit on test" | |
632 | adding b |
|
634 | adding b | |
633 |
|
635 | |||
634 | $ hg up default |
|
636 | $ hg up default | |
635 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
637 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
636 | $ echo c > c |
|
638 | $ echo c > c | |
637 | $ hg ci -A -m "commit on default" |
|
639 | $ hg ci -A -m "commit on default" | |
638 | adding c |
|
640 | adding c | |
639 | $ hg up test |
|
641 | $ hg up test | |
640 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
642 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
641 | $ echo c > c |
|
643 | $ echo c > c | |
642 | $ hg ci -A -m "commit on test" |
|
644 | $ hg ci -A -m "commit on test" | |
643 | adding c |
|
645 | adding c | |
644 |
|
646 | |||
645 |
|
647 | |||
646 | log -b default |
|
648 | log -b default | |
647 |
|
649 | |||
648 | $ hg log -b default |
|
650 | $ hg log -b default | |
649 | changeset: 2:c3a4f03cc9a7 |
|
651 | changeset: 2:c3a4f03cc9a7 | |
650 | parent: 0:24427303d56f |
|
652 | parent: 0:24427303d56f | |
651 | user: test |
|
653 | user: test | |
652 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
654 | date: Thu Jan 01 00:00:00 1970 +0000 | |
653 | summary: commit on default |
|
655 | summary: commit on default | |
654 |
|
656 | |||
655 | changeset: 0:24427303d56f |
|
657 | changeset: 0:24427303d56f | |
656 | user: test |
|
658 | user: test | |
657 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
659 | date: Thu Jan 01 00:00:00 1970 +0000 | |
658 | summary: commit on default |
|
660 | summary: commit on default | |
659 |
|
661 | |||
660 |
|
662 | |||
661 |
|
663 | |||
662 | log -b test |
|
664 | log -b test | |
663 |
|
665 | |||
664 | $ hg log -b test |
|
666 | $ hg log -b test | |
665 | changeset: 3:f5d8de11c2e2 |
|
667 | changeset: 3:f5d8de11c2e2 | |
666 | branch: test |
|
668 | branch: test | |
667 | tag: tip |
|
669 | tag: tip | |
668 | parent: 1:d32277701ccb |
|
670 | parent: 1:d32277701ccb | |
669 | user: test |
|
671 | user: test | |
670 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
672 | date: Thu Jan 01 00:00:00 1970 +0000 | |
671 | summary: commit on test |
|
673 | summary: commit on test | |
672 |
|
674 | |||
673 | changeset: 1:d32277701ccb |
|
675 | changeset: 1:d32277701ccb | |
674 | branch: test |
|
676 | branch: test | |
675 | user: test |
|
677 | user: test | |
676 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
678 | date: Thu Jan 01 00:00:00 1970 +0000 | |
677 | summary: commit on test |
|
679 | summary: commit on test | |
678 |
|
680 | |||
679 |
|
681 | |||
680 |
|
682 | |||
681 | log -b dummy |
|
683 | log -b dummy | |
682 |
|
684 | |||
683 | $ hg log -b dummy |
|
685 | $ hg log -b dummy | |
684 | abort: unknown revision 'dummy'! |
|
686 | abort: unknown revision 'dummy'! | |
685 | [255] |
|
687 | [255] | |
686 |
|
688 | |||
687 |
|
689 | |||
688 | log -b . |
|
690 | log -b . | |
689 |
|
691 | |||
690 | $ hg log -b . |
|
692 | $ hg log -b . | |
691 | changeset: 3:f5d8de11c2e2 |
|
693 | changeset: 3:f5d8de11c2e2 | |
692 | branch: test |
|
694 | branch: test | |
693 | tag: tip |
|
695 | tag: tip | |
694 | parent: 1:d32277701ccb |
|
696 | parent: 1:d32277701ccb | |
695 | user: test |
|
697 | user: test | |
696 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
698 | date: Thu Jan 01 00:00:00 1970 +0000 | |
697 | summary: commit on test |
|
699 | summary: commit on test | |
698 |
|
700 | |||
699 | changeset: 1:d32277701ccb |
|
701 | changeset: 1:d32277701ccb | |
700 | branch: test |
|
702 | branch: test | |
701 | user: test |
|
703 | user: test | |
702 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
704 | date: Thu Jan 01 00:00:00 1970 +0000 | |
703 | summary: commit on test |
|
705 | summary: commit on test | |
704 |
|
706 | |||
705 |
|
707 | |||
706 |
|
708 | |||
707 | log -b default -b test |
|
709 | log -b default -b test | |
708 |
|
710 | |||
709 | $ hg log -b default -b test |
|
711 | $ hg log -b default -b test | |
710 | changeset: 3:f5d8de11c2e2 |
|
712 | changeset: 3:f5d8de11c2e2 | |
711 | branch: test |
|
713 | branch: test | |
712 | tag: tip |
|
714 | tag: tip | |
713 | parent: 1:d32277701ccb |
|
715 | parent: 1:d32277701ccb | |
714 | user: test |
|
716 | user: test | |
715 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
717 | date: Thu Jan 01 00:00:00 1970 +0000 | |
716 | summary: commit on test |
|
718 | summary: commit on test | |
717 |
|
719 | |||
718 | changeset: 2:c3a4f03cc9a7 |
|
720 | changeset: 2:c3a4f03cc9a7 | |
719 | parent: 0:24427303d56f |
|
721 | parent: 0:24427303d56f | |
720 | user: test |
|
722 | user: test | |
721 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
723 | date: Thu Jan 01 00:00:00 1970 +0000 | |
722 | summary: commit on default |
|
724 | summary: commit on default | |
723 |
|
725 | |||
724 | changeset: 1:d32277701ccb |
|
726 | changeset: 1:d32277701ccb | |
725 | branch: test |
|
727 | branch: test | |
726 | user: test |
|
728 | user: test | |
727 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
729 | date: Thu Jan 01 00:00:00 1970 +0000 | |
728 | summary: commit on test |
|
730 | summary: commit on test | |
729 |
|
731 | |||
730 | changeset: 0:24427303d56f |
|
732 | changeset: 0:24427303d56f | |
731 | user: test |
|
733 | user: test | |
732 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
734 | date: Thu Jan 01 00:00:00 1970 +0000 | |
733 | summary: commit on default |
|
735 | summary: commit on default | |
734 |
|
736 | |||
735 |
|
737 | |||
736 |
|
738 | |||
737 | log -b default -b . |
|
739 | log -b default -b . | |
738 |
|
740 | |||
739 | $ hg log -b default -b . |
|
741 | $ hg log -b default -b . | |
740 | changeset: 3:f5d8de11c2e2 |
|
742 | changeset: 3:f5d8de11c2e2 | |
741 | branch: test |
|
743 | branch: test | |
742 | tag: tip |
|
744 | tag: tip | |
743 | parent: 1:d32277701ccb |
|
745 | parent: 1:d32277701ccb | |
744 | user: test |
|
746 | user: test | |
745 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
747 | date: Thu Jan 01 00:00:00 1970 +0000 | |
746 | summary: commit on test |
|
748 | summary: commit on test | |
747 |
|
749 | |||
748 | changeset: 2:c3a4f03cc9a7 |
|
750 | changeset: 2:c3a4f03cc9a7 | |
749 | parent: 0:24427303d56f |
|
751 | parent: 0:24427303d56f | |
750 | user: test |
|
752 | user: test | |
751 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
753 | date: Thu Jan 01 00:00:00 1970 +0000 | |
752 | summary: commit on default |
|
754 | summary: commit on default | |
753 |
|
755 | |||
754 | changeset: 1:d32277701ccb |
|
756 | changeset: 1:d32277701ccb | |
755 | branch: test |
|
757 | branch: test | |
756 | user: test |
|
758 | user: test | |
757 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
759 | date: Thu Jan 01 00:00:00 1970 +0000 | |
758 | summary: commit on test |
|
760 | summary: commit on test | |
759 |
|
761 | |||
760 | changeset: 0:24427303d56f |
|
762 | changeset: 0:24427303d56f | |
761 | user: test |
|
763 | user: test | |
762 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
764 | date: Thu Jan 01 00:00:00 1970 +0000 | |
763 | summary: commit on default |
|
765 | summary: commit on default | |
764 |
|
766 | |||
765 |
|
767 | |||
766 |
|
768 | |||
767 | log -b . -b test |
|
769 | log -b . -b test | |
768 |
|
770 | |||
769 | $ hg log -b . -b test |
|
771 | $ hg log -b . -b test | |
770 | changeset: 3:f5d8de11c2e2 |
|
772 | changeset: 3:f5d8de11c2e2 | |
771 | branch: test |
|
773 | branch: test | |
772 | tag: tip |
|
774 | tag: tip | |
773 | parent: 1:d32277701ccb |
|
775 | parent: 1:d32277701ccb | |
774 | user: test |
|
776 | user: test | |
775 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
777 | date: Thu Jan 01 00:00:00 1970 +0000 | |
776 | summary: commit on test |
|
778 | summary: commit on test | |
777 |
|
779 | |||
778 | changeset: 1:d32277701ccb |
|
780 | changeset: 1:d32277701ccb | |
779 | branch: test |
|
781 | branch: test | |
780 | user: test |
|
782 | user: test | |
781 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
783 | date: Thu Jan 01 00:00:00 1970 +0000 | |
782 | summary: commit on test |
|
784 | summary: commit on test | |
783 |
|
785 | |||
784 |
|
786 | |||
785 |
|
787 | |||
786 | log -b 2 |
|
788 | log -b 2 | |
787 |
|
789 | |||
788 | $ hg log -b 2 |
|
790 | $ hg log -b 2 | |
789 | changeset: 2:c3a4f03cc9a7 |
|
791 | changeset: 2:c3a4f03cc9a7 | |
790 | parent: 0:24427303d56f |
|
792 | parent: 0:24427303d56f | |
791 | user: test |
|
793 | user: test | |
792 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
794 | date: Thu Jan 01 00:00:00 1970 +0000 | |
793 | summary: commit on default |
|
795 | summary: commit on default | |
794 |
|
796 | |||
795 | changeset: 0:24427303d56f |
|
797 | changeset: 0:24427303d56f | |
796 | user: test |
|
798 | user: test | |
797 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
799 | date: Thu Jan 01 00:00:00 1970 +0000 | |
798 | summary: commit on default |
|
800 | summary: commit on default | |
799 |
|
801 | |||
800 |
|
802 | |||
801 |
|
803 | |||
802 | log -p --cwd dir (in subdir) |
|
804 | log -p --cwd dir (in subdir) | |
803 |
|
805 | |||
804 | $ mkdir dir |
|
806 | $ mkdir dir | |
805 | $ hg log -p --cwd dir |
|
807 | $ hg log -p --cwd dir | |
806 | changeset: 3:f5d8de11c2e2 |
|
808 | changeset: 3:f5d8de11c2e2 | |
807 | branch: test |
|
809 | branch: test | |
808 | tag: tip |
|
810 | tag: tip | |
809 | parent: 1:d32277701ccb |
|
811 | parent: 1:d32277701ccb | |
810 | user: test |
|
812 | user: test | |
811 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
813 | date: Thu Jan 01 00:00:00 1970 +0000 | |
812 | summary: commit on test |
|
814 | summary: commit on test | |
813 |
|
815 | |||
814 | diff -r d32277701ccb -r f5d8de11c2e2 c |
|
816 | diff -r d32277701ccb -r f5d8de11c2e2 c | |
815 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
817 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
816 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
818 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
817 | @@ -0,0 +1,1 @@ |
|
819 | @@ -0,0 +1,1 @@ | |
818 | +c |
|
820 | +c | |
819 |
|
821 | |||
820 | changeset: 2:c3a4f03cc9a7 |
|
822 | changeset: 2:c3a4f03cc9a7 | |
821 | parent: 0:24427303d56f |
|
823 | parent: 0:24427303d56f | |
822 | user: test |
|
824 | user: test | |
823 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
825 | date: Thu Jan 01 00:00:00 1970 +0000 | |
824 | summary: commit on default |
|
826 | summary: commit on default | |
825 |
|
827 | |||
826 | diff -r 24427303d56f -r c3a4f03cc9a7 c |
|
828 | diff -r 24427303d56f -r c3a4f03cc9a7 c | |
827 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
829 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
828 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
830 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
829 | @@ -0,0 +1,1 @@ |
|
831 | @@ -0,0 +1,1 @@ | |
830 | +c |
|
832 | +c | |
831 |
|
833 | |||
832 | changeset: 1:d32277701ccb |
|
834 | changeset: 1:d32277701ccb | |
833 | branch: test |
|
835 | branch: test | |
834 | user: test |
|
836 | user: test | |
835 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
837 | date: Thu Jan 01 00:00:00 1970 +0000 | |
836 | summary: commit on test |
|
838 | summary: commit on test | |
837 |
|
839 | |||
838 | diff -r 24427303d56f -r d32277701ccb b |
|
840 | diff -r 24427303d56f -r d32277701ccb b | |
839 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
841 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
840 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
842 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
841 | @@ -0,0 +1,1 @@ |
|
843 | @@ -0,0 +1,1 @@ | |
842 | +b |
|
844 | +b | |
843 |
|
845 | |||
844 | changeset: 0:24427303d56f |
|
846 | changeset: 0:24427303d56f | |
845 | user: test |
|
847 | user: test | |
846 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
848 | date: Thu Jan 01 00:00:00 1970 +0000 | |
847 | summary: commit on default |
|
849 | summary: commit on default | |
848 |
|
850 | |||
849 | diff -r 000000000000 -r 24427303d56f a |
|
851 | diff -r 000000000000 -r 24427303d56f a | |
850 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
852 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
851 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
853 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
852 | @@ -0,0 +1,1 @@ |
|
854 | @@ -0,0 +1,1 @@ | |
853 | +a |
|
855 | +a | |
854 |
|
856 | |||
855 |
|
857 | |||
856 |
|
858 | |||
857 | log -p -R repo |
|
859 | log -p -R repo | |
858 |
|
860 | |||
859 | $ cd dir |
|
861 | $ cd dir | |
860 | $ hg log -p -R .. ../a |
|
862 | $ hg log -p -R .. ../a | |
861 | changeset: 0:24427303d56f |
|
863 | changeset: 0:24427303d56f | |
862 | user: test |
|
864 | user: test | |
863 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
865 | date: Thu Jan 01 00:00:00 1970 +0000 | |
864 | summary: commit on default |
|
866 | summary: commit on default | |
865 |
|
867 | |||
866 | diff -r 000000000000 -r 24427303d56f a |
|
868 | diff -r 000000000000 -r 24427303d56f a | |
867 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
869 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
868 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
870 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
869 | @@ -0,0 +1,1 @@ |
|
871 | @@ -0,0 +1,1 @@ | |
870 | +a |
|
872 | +a | |
871 |
|
873 | |||
872 |
|
874 | |||
873 |
|
875 | |||
874 | $ cd .. |
|
876 | $ cd .. | |
875 | $ hg init follow2 |
|
877 | $ hg init follow2 | |
876 | $ cd follow2 |
|
878 | $ cd follow2 | |
877 |
|
879 | |||
878 |
|
880 | |||
879 | # Build the following history: |
|
881 | # Build the following history: | |
880 | # tip - o - x - o - x - x |
|
882 | # tip - o - x - o - x - x | |
881 | # \ / |
|
883 | # \ / | |
882 | # o - o - o - x |
|
884 | # o - o - o - x | |
883 | # \ / |
|
885 | # \ / | |
884 | # o |
|
886 | # o | |
885 | # |
|
887 | # | |
886 | # Where "o" is a revision containing "foo" and |
|
888 | # Where "o" is a revision containing "foo" and | |
887 | # "x" is a revision without "foo" |
|
889 | # "x" is a revision without "foo" | |
888 |
|
890 | |||
889 | $ touch init |
|
891 | $ touch init | |
890 | $ hg ci -A -m "init, unrelated" |
|
892 | $ hg ci -A -m "init, unrelated" | |
891 | adding init |
|
893 | adding init | |
892 | $ echo 'foo' > init |
|
894 | $ echo 'foo' > init | |
893 | $ hg ci -m "change, unrelated" |
|
895 | $ hg ci -m "change, unrelated" | |
894 | $ echo 'foo' > foo |
|
896 | $ echo 'foo' > foo | |
895 | $ hg ci -A -m "add unrelated old foo" |
|
897 | $ hg ci -A -m "add unrelated old foo" | |
896 | adding foo |
|
898 | adding foo | |
897 | $ hg rm foo |
|
899 | $ hg rm foo | |
898 | $ hg ci -m "delete foo, unrelated" |
|
900 | $ hg ci -m "delete foo, unrelated" | |
899 | $ echo 'related' > foo |
|
901 | $ echo 'related' > foo | |
900 | $ hg ci -A -m "add foo, related" |
|
902 | $ hg ci -A -m "add foo, related" | |
901 | adding foo |
|
903 | adding foo | |
902 |
|
904 | |||
903 | $ hg up 0 |
|
905 | $ hg up 0 | |
904 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
906 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
905 | $ touch branch |
|
907 | $ touch branch | |
906 | $ hg ci -A -m "first branch, unrelated" |
|
908 | $ hg ci -A -m "first branch, unrelated" | |
907 | adding branch |
|
909 | adding branch | |
908 | created new head |
|
910 | created new head | |
909 | $ touch foo |
|
911 | $ touch foo | |
910 | $ hg ci -A -m "create foo, related" |
|
912 | $ hg ci -A -m "create foo, related" | |
911 | adding foo |
|
913 | adding foo | |
912 | $ echo 'change' > foo |
|
914 | $ echo 'change' > foo | |
913 | $ hg ci -m "change foo, related" |
|
915 | $ hg ci -m "change foo, related" | |
914 |
|
916 | |||
915 | $ hg up 6 |
|
917 | $ hg up 6 | |
916 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
918 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
917 | $ echo 'change foo in branch' > foo |
|
919 | $ echo 'change foo in branch' > foo | |
918 | $ hg ci -m "change foo in branch, related" |
|
920 | $ hg ci -m "change foo in branch, related" | |
919 | created new head |
|
921 | created new head | |
920 | $ hg merge 7 |
|
922 | $ hg merge 7 | |
921 | merging foo |
|
923 | merging foo | |
922 | warning: conflicts during merge. |
|
924 | warning: conflicts during merge. | |
923 | merging foo failed! |
|
925 | merging foo failed! | |
924 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
926 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
925 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
927 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
926 | [1] |
|
928 | [1] | |
927 | $ echo 'merge 1' > foo |
|
929 | $ echo 'merge 1' > foo | |
928 | $ hg resolve -m foo |
|
930 | $ hg resolve -m foo | |
929 | $ hg ci -m "First merge, related" |
|
931 | $ hg ci -m "First merge, related" | |
930 |
|
932 | |||
931 | $ hg merge 4 |
|
933 | $ hg merge 4 | |
932 | merging foo |
|
934 | merging foo | |
933 | warning: conflicts during merge. |
|
935 | warning: conflicts during merge. | |
934 | merging foo failed! |
|
936 | merging foo failed! | |
935 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
937 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
936 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
938 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
937 | [1] |
|
939 | [1] | |
938 | $ echo 'merge 2' > foo |
|
940 | $ echo 'merge 2' > foo | |
939 | $ hg resolve -m foo |
|
941 | $ hg resolve -m foo | |
940 | $ hg ci -m "Last merge, related" |
|
942 | $ hg ci -m "Last merge, related" | |
941 |
|
943 | |||
942 | $ hg --config "extensions.graphlog=" glog |
|
944 | $ hg --config "extensions.graphlog=" glog | |
943 | @ changeset: 10:4dae8563d2c5 |
|
945 | @ changeset: 10:4dae8563d2c5 | |
944 | |\ tag: tip |
|
946 | |\ tag: tip | |
945 | | | parent: 9:7b35701b003e |
|
947 | | | parent: 9:7b35701b003e | |
946 | | | parent: 4:88176d361b69 |
|
948 | | | parent: 4:88176d361b69 | |
947 | | | user: test |
|
949 | | | user: test | |
948 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
950 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
949 | | | summary: Last merge, related |
|
951 | | | summary: Last merge, related | |
950 | | | |
|
952 | | | | |
951 | | o changeset: 9:7b35701b003e |
|
953 | | o changeset: 9:7b35701b003e | |
952 | | |\ parent: 8:e5416ad8a855 |
|
954 | | |\ parent: 8:e5416ad8a855 | |
953 | | | | parent: 7:87fe3144dcfa |
|
955 | | | | parent: 7:87fe3144dcfa | |
954 | | | | user: test |
|
956 | | | | user: test | |
955 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
957 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
956 | | | | summary: First merge, related |
|
958 | | | | summary: First merge, related | |
957 | | | | |
|
959 | | | | | |
958 | | | o changeset: 8:e5416ad8a855 |
|
960 | | | o changeset: 8:e5416ad8a855 | |
959 | | | | parent: 6:dc6c325fe5ee |
|
961 | | | | parent: 6:dc6c325fe5ee | |
960 | | | | user: test |
|
962 | | | | user: test | |
961 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
963 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
962 | | | | summary: change foo in branch, related |
|
964 | | | | summary: change foo in branch, related | |
963 | | | | |
|
965 | | | | | |
964 | | o | changeset: 7:87fe3144dcfa |
|
966 | | o | changeset: 7:87fe3144dcfa | |
965 | | |/ user: test |
|
967 | | |/ user: test | |
966 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
968 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
967 | | | summary: change foo, related |
|
969 | | | summary: change foo, related | |
968 | | | |
|
970 | | | | |
969 | | o changeset: 6:dc6c325fe5ee |
|
971 | | o changeset: 6:dc6c325fe5ee | |
970 | | | user: test |
|
972 | | | user: test | |
971 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
973 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
972 | | | summary: create foo, related |
|
974 | | | summary: create foo, related | |
973 | | | |
|
975 | | | | |
974 | | o changeset: 5:73db34516eb9 |
|
976 | | o changeset: 5:73db34516eb9 | |
975 | | | parent: 0:e87515fd044a |
|
977 | | | parent: 0:e87515fd044a | |
976 | | | user: test |
|
978 | | | user: test | |
977 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
979 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
978 | | | summary: first branch, unrelated |
|
980 | | | summary: first branch, unrelated | |
979 | | | |
|
981 | | | | |
980 | o | changeset: 4:88176d361b69 |
|
982 | o | changeset: 4:88176d361b69 | |
981 | | | user: test |
|
983 | | | user: test | |
982 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
984 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
983 | | | summary: add foo, related |
|
985 | | | summary: add foo, related | |
984 | | | |
|
986 | | | | |
985 | o | changeset: 3:dd78ae4afb56 |
|
987 | o | changeset: 3:dd78ae4afb56 | |
986 | | | user: test |
|
988 | | | user: test | |
987 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
989 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
988 | | | summary: delete foo, unrelated |
|
990 | | | summary: delete foo, unrelated | |
989 | | | |
|
991 | | | | |
990 | o | changeset: 2:c4c64aedf0f7 |
|
992 | o | changeset: 2:c4c64aedf0f7 | |
991 | | | user: test |
|
993 | | | user: test | |
992 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
994 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
993 | | | summary: add unrelated old foo |
|
995 | | | summary: add unrelated old foo | |
994 | | | |
|
996 | | | | |
995 | o | changeset: 1:e5faa7440653 |
|
997 | o | changeset: 1:e5faa7440653 | |
996 | |/ user: test |
|
998 | |/ user: test | |
997 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
999 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
998 | | summary: change, unrelated |
|
1000 | | summary: change, unrelated | |
999 | | |
|
1001 | | | |
1000 | o changeset: 0:e87515fd044a |
|
1002 | o changeset: 0:e87515fd044a | |
1001 | user: test |
|
1003 | user: test | |
1002 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1004 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1003 | summary: init, unrelated |
|
1005 | summary: init, unrelated | |
1004 |
|
1006 | |||
1005 |
|
1007 | |||
1006 | $ hg --traceback log -f foo |
|
1008 | $ hg --traceback log -f foo | |
1007 | changeset: 10:4dae8563d2c5 |
|
1009 | changeset: 10:4dae8563d2c5 | |
1008 | tag: tip |
|
1010 | tag: tip | |
1009 | parent: 9:7b35701b003e |
|
1011 | parent: 9:7b35701b003e | |
1010 | parent: 4:88176d361b69 |
|
1012 | parent: 4:88176d361b69 | |
1011 | user: test |
|
1013 | user: test | |
1012 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1014 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1013 | summary: Last merge, related |
|
1015 | summary: Last merge, related | |
1014 |
|
1016 | |||
1015 | changeset: 9:7b35701b003e |
|
1017 | changeset: 9:7b35701b003e | |
1016 | parent: 8:e5416ad8a855 |
|
1018 | parent: 8:e5416ad8a855 | |
1017 | parent: 7:87fe3144dcfa |
|
1019 | parent: 7:87fe3144dcfa | |
1018 | user: test |
|
1020 | user: test | |
1019 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1021 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1020 | summary: First merge, related |
|
1022 | summary: First merge, related | |
1021 |
|
1023 | |||
1022 | changeset: 8:e5416ad8a855 |
|
1024 | changeset: 8:e5416ad8a855 | |
1023 | parent: 6:dc6c325fe5ee |
|
1025 | parent: 6:dc6c325fe5ee | |
1024 | user: test |
|
1026 | user: test | |
1025 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1027 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1026 | summary: change foo in branch, related |
|
1028 | summary: change foo in branch, related | |
1027 |
|
1029 | |||
1028 | changeset: 7:87fe3144dcfa |
|
1030 | changeset: 7:87fe3144dcfa | |
1029 | user: test |
|
1031 | user: test | |
1030 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1032 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1031 | summary: change foo, related |
|
1033 | summary: change foo, related | |
1032 |
|
1034 | |||
1033 | changeset: 6:dc6c325fe5ee |
|
1035 | changeset: 6:dc6c325fe5ee | |
1034 | user: test |
|
1036 | user: test | |
1035 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1037 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1036 | summary: create foo, related |
|
1038 | summary: create foo, related | |
1037 |
|
1039 | |||
1038 | changeset: 4:88176d361b69 |
|
1040 | changeset: 4:88176d361b69 | |
1039 | user: test |
|
1041 | user: test | |
1040 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1042 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1041 | summary: add foo, related |
|
1043 | summary: add foo, related | |
1042 |
|
1044 | |||
1043 |
|
1045 | |||
1044 | Also check when maxrev < lastrevfilelog |
|
1046 | Also check when maxrev < lastrevfilelog | |
1045 |
|
1047 | |||
1046 | $ hg --traceback log -f -r4 foo |
|
1048 | $ hg --traceback log -f -r4 foo | |
1047 | changeset: 4:88176d361b69 |
|
1049 | changeset: 4:88176d361b69 | |
1048 | user: test |
|
1050 | user: test | |
1049 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1051 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1050 | summary: add foo, related |
|
1052 | summary: add foo, related | |
1051 |
|
1053 | |||
1052 |
|
1054 | |||
1053 | Issue2383: hg log showing _less_ differences than hg diff |
|
1055 | Issue2383: hg log showing _less_ differences than hg diff | |
1054 |
|
1056 | |||
1055 | $ hg init issue2383 |
|
1057 | $ hg init issue2383 | |
1056 | $ cd issue2383 |
|
1058 | $ cd issue2383 | |
1057 |
|
1059 | |||
1058 | Create a test repo: |
|
1060 | Create a test repo: | |
1059 |
|
1061 | |||
1060 | $ echo a > a |
|
1062 | $ echo a > a | |
1061 | $ hg ci -Am0 |
|
1063 | $ hg ci -Am0 | |
1062 | adding a |
|
1064 | adding a | |
1063 | $ echo b > b |
|
1065 | $ echo b > b | |
1064 | $ hg ci -Am1 |
|
1066 | $ hg ci -Am1 | |
1065 | adding b |
|
1067 | adding b | |
1066 | $ hg co 0 |
|
1068 | $ hg co 0 | |
1067 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1069 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1068 | $ echo b > a |
|
1070 | $ echo b > a | |
1069 | $ hg ci -m2 |
|
1071 | $ hg ci -m2 | |
1070 | created new head |
|
1072 | created new head | |
1071 |
|
1073 | |||
1072 | Merge: |
|
1074 | Merge: | |
1073 |
|
1075 | |||
1074 | $ hg merge |
|
1076 | $ hg merge | |
1075 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1077 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1076 | (branch merge, don't forget to commit) |
|
1078 | (branch merge, don't forget to commit) | |
1077 |
|
1079 | |||
1078 | Make sure there's a file listed in the merge to trigger the bug: |
|
1080 | Make sure there's a file listed in the merge to trigger the bug: | |
1079 |
|
1081 | |||
1080 | $ echo c > a |
|
1082 | $ echo c > a | |
1081 | $ hg ci -m3 |
|
1083 | $ hg ci -m3 | |
1082 |
|
1084 | |||
1083 | Two files shown here in diff: |
|
1085 | Two files shown here in diff: | |
1084 |
|
1086 | |||
1085 | $ hg diff --rev 2:3 |
|
1087 | $ hg diff --rev 2:3 | |
1086 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1088 | diff -r b09be438c43a -r 8e07aafe1edc a | |
1087 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1089 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1088 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1090 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1089 | @@ -1,1 +1,1 @@ |
|
1091 | @@ -1,1 +1,1 @@ | |
1090 | -b |
|
1092 | -b | |
1091 | +c |
|
1093 | +c | |
1092 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1094 | diff -r b09be438c43a -r 8e07aafe1edc b | |
1093 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1095 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1094 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1096 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1095 | @@ -0,0 +1,1 @@ |
|
1097 | @@ -0,0 +1,1 @@ | |
1096 | +b |
|
1098 | +b | |
1097 |
|
1099 | |||
1098 | Diff here should be the same: |
|
1100 | Diff here should be the same: | |
1099 |
|
1101 | |||
1100 | $ hg log -vpr 3 |
|
1102 | $ hg log -vpr 3 | |
1101 | changeset: 3:8e07aafe1edc |
|
1103 | changeset: 3:8e07aafe1edc | |
1102 | tag: tip |
|
1104 | tag: tip | |
1103 | parent: 2:b09be438c43a |
|
1105 | parent: 2:b09be438c43a | |
1104 | parent: 1:925d80f479bb |
|
1106 | parent: 1:925d80f479bb | |
1105 | user: test |
|
1107 | user: test | |
1106 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1108 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1107 | files: a |
|
1109 | files: a | |
1108 | description: |
|
1110 | description: | |
1109 | 3 |
|
1111 | 3 | |
1110 |
|
1112 | |||
1111 |
|
1113 | |||
1112 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1114 | diff -r b09be438c43a -r 8e07aafe1edc a | |
1113 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1115 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1114 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1116 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1115 | @@ -1,1 +1,1 @@ |
|
1117 | @@ -1,1 +1,1 @@ | |
1116 | -b |
|
1118 | -b | |
1117 | +c |
|
1119 | +c | |
1118 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1120 | diff -r b09be438c43a -r 8e07aafe1edc b | |
1119 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1121 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1120 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1122 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1121 | @@ -0,0 +1,1 @@ |
|
1123 | @@ -0,0 +1,1 @@ | |
1122 | +b |
|
1124 | +b | |
1123 |
|
1125 | |||
1124 | $ cd .. |
|
1126 | $ cd .. | |
1125 |
|
1127 | |||
1126 | 'hg log -r rev fn' when last(filelog(fn)) != rev |
|
1128 | 'hg log -r rev fn' when last(filelog(fn)) != rev | |
1127 |
|
1129 | |||
1128 | $ hg init simplelog; cd simplelog |
|
1130 | $ hg init simplelog; cd simplelog | |
1129 | $ echo f > a |
|
1131 | $ echo f > a | |
1130 | $ hg ci -Am'a' -d '0 0' |
|
1132 | $ hg ci -Am'a' -d '0 0' | |
1131 | adding a |
|
1133 | adding a | |
1132 | $ echo f >> a |
|
1134 | $ echo f >> a | |
1133 | $ hg ci -Am'a bis' -d '1 0' |
|
1135 | $ hg ci -Am'a bis' -d '1 0' | |
1134 |
|
1136 | |||
1135 | $ hg log -r0 a |
|
1137 | $ hg log -r0 a | |
1136 | changeset: 0:9f758d63dcde |
|
1138 | changeset: 0:9f758d63dcde | |
1137 | user: test |
|
1139 | user: test | |
1138 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1140 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1139 | summary: a |
|
1141 | summary: a | |
1140 |
|
1142 | |||
1141 | $ cat > $HGTMP/testhidden.py << EOF |
|
1143 | $ cat > $HGTMP/testhidden.py << EOF | |
1142 | > def reposetup(ui, repo): |
|
1144 | > def reposetup(ui, repo): | |
1143 | > for line in repo.opener('hidden'): |
|
1145 | > for line in repo.opener('hidden'): | |
1144 | > ctx = repo[line.strip()] |
|
1146 | > ctx = repo[line.strip()] | |
1145 | > repo.changelog.hiddenrevs.add(ctx.rev()) |
|
1147 | > repo.changelog.hiddenrevs.add(ctx.rev()) | |
1146 | > EOF |
|
1148 | > EOF | |
1147 | $ echo '[extensions]' >> $HGRCPATH |
|
1149 | $ echo '[extensions]' >> $HGRCPATH | |
1148 | $ echo "hidden=$HGTMP/testhidden.py" >> $HGRCPATH |
|
1150 | $ echo "hidden=$HGTMP/testhidden.py" >> $HGRCPATH | |
1149 | $ touch .hg/hidden |
|
1151 | $ touch .hg/hidden | |
1150 | $ hg log --template='{rev}:{node}\n' |
|
1152 | $ hg log --template='{rev}:{node}\n' | |
1151 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1153 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1152 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1154 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1153 | $ echo a765632148dc55d38c35c4f247c618701886cb2f > .hg/hidden |
|
1155 | $ echo a765632148dc55d38c35c4f247c618701886cb2f > .hg/hidden | |
1154 | $ hg log --template='{rev}:{node}\n' |
|
1156 | $ hg log --template='{rev}:{node}\n' | |
1155 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1157 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1156 | $ hg log --template='{rev}:{node}\n' --hidden |
|
1158 | $ hg log --template='{rev}:{node}\n' --hidden | |
1157 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1159 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1158 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1160 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
@@ -1,72 +1,72 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink || 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 None partial False |
|
22 | overwrite None 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 None partial False |
|
50 | overwrite None 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 |
@@ -1,1394 +1,1396 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | $ checkundo() |
|
3 | $ checkundo() | |
2 | > { |
|
4 | > { | |
3 | > if [ -f .hg/store/undo ]; then |
|
5 | > if [ -f .hg/store/undo ]; then | |
4 | > echo ".hg/store/undo still exists after $1" |
|
6 | > echo ".hg/store/undo still exists after $1" | |
5 | > fi |
|
7 | > fi | |
6 | > } |
|
8 | > } | |
7 |
|
9 | |||
8 | $ echo "[extensions]" >> $HGRCPATH |
|
10 | $ echo "[extensions]" >> $HGRCPATH | |
9 | $ echo "mq=" >> $HGRCPATH |
|
11 | $ echo "mq=" >> $HGRCPATH | |
10 |
|
12 | |||
11 | $ echo "[mq]" >> $HGRCPATH |
|
13 | $ echo "[mq]" >> $HGRCPATH | |
12 | $ echo "plain=true" >> $HGRCPATH |
|
14 | $ echo "plain=true" >> $HGRCPATH | |
13 |
|
15 | |||
14 |
|
16 | |||
15 | help |
|
17 | help | |
16 |
|
18 | |||
17 | $ hg help mq |
|
19 | $ hg help mq | |
18 | mq extension - manage a stack of patches |
|
20 | mq extension - manage a stack of patches | |
19 |
|
21 | |||
20 | This extension lets you work with a stack of patches in a Mercurial |
|
22 | This extension lets you work with a stack of patches in a Mercurial | |
21 | repository. It manages two stacks of patches - all known patches, and applied |
|
23 | repository. It manages two stacks of patches - all known patches, and applied | |
22 | patches (subset of known patches). |
|
24 | patches (subset of known patches). | |
23 |
|
25 | |||
24 | Known patches are represented as patch files in the .hg/patches directory. |
|
26 | Known patches are represented as patch files in the .hg/patches directory. | |
25 | Applied patches are both patch files and changesets. |
|
27 | Applied patches are both patch files and changesets. | |
26 |
|
28 | |||
27 | Common tasks (use "hg help command" for more details): |
|
29 | Common tasks (use "hg help command" for more details): | |
28 |
|
30 | |||
29 | create new patch qnew |
|
31 | create new patch qnew | |
30 | import existing patch qimport |
|
32 | import existing patch qimport | |
31 |
|
33 | |||
32 | print patch series qseries |
|
34 | print patch series qseries | |
33 | print applied patches qapplied |
|
35 | print applied patches qapplied | |
34 |
|
36 | |||
35 | add known patch to applied stack qpush |
|
37 | add known patch to applied stack qpush | |
36 | remove patch from applied stack qpop |
|
38 | remove patch from applied stack qpop | |
37 | refresh contents of top applied patch qrefresh |
|
39 | refresh contents of top applied patch qrefresh | |
38 |
|
40 | |||
39 | By default, mq will automatically use git patches when required to avoid |
|
41 | By default, mq will automatically use git patches when required to avoid | |
40 | losing file mode changes, copy records, binary files or empty files creations |
|
42 | losing file mode changes, copy records, binary files or empty files creations | |
41 | or deletions. This behaviour can be configured with: |
|
43 | or deletions. This behaviour can be configured with: | |
42 |
|
44 | |||
43 | [mq] |
|
45 | [mq] | |
44 | git = auto/keep/yes/no |
|
46 | git = auto/keep/yes/no | |
45 |
|
47 | |||
46 | If set to 'keep', mq will obey the [diff] section configuration while |
|
48 | If set to 'keep', mq will obey the [diff] section configuration while | |
47 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq |
|
49 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq | |
48 | will override the [diff] section and always generate git or regular patches, |
|
50 | will override the [diff] section and always generate git or regular patches, | |
49 | possibly losing data in the second case. |
|
51 | possibly losing data in the second case. | |
50 |
|
52 | |||
51 | You will by default be managing a patch queue named "patches". You can create |
|
53 | You will by default be managing a patch queue named "patches". You can create | |
52 | other, independent patch queues with the "hg qqueue" command. |
|
54 | other, independent patch queues with the "hg qqueue" command. | |
53 |
|
55 | |||
54 | list of commands: |
|
56 | list of commands: | |
55 |
|
57 | |||
56 | qapplied print the patches already applied |
|
58 | qapplied print the patches already applied | |
57 | qclone clone main and patch repository at same time |
|
59 | qclone clone main and patch repository at same time | |
58 | qdelete remove patches from queue |
|
60 | qdelete remove patches from queue | |
59 | qdiff diff of the current patch and subsequent modifications |
|
61 | qdiff diff of the current patch and subsequent modifications | |
60 | qfinish move applied patches into repository history |
|
62 | qfinish move applied patches into repository history | |
61 | qfold fold the named patches into the current patch |
|
63 | qfold fold the named patches into the current patch | |
62 | qgoto push or pop patches until named patch is at top of stack |
|
64 | qgoto push or pop patches until named patch is at top of stack | |
63 | qguard set or print guards for a patch |
|
65 | qguard set or print guards for a patch | |
64 | qheader print the header of the topmost or specified patch |
|
66 | qheader print the header of the topmost or specified patch | |
65 | qimport import a patch |
|
67 | qimport import a patch | |
66 | qnew create a new patch |
|
68 | qnew create a new patch | |
67 | qnext print the name of the next patch |
|
69 | qnext print the name of the next patch | |
68 | qpop pop the current patch off the stack |
|
70 | qpop pop the current patch off the stack | |
69 | qprev print the name of the previous patch |
|
71 | qprev print the name of the previous patch | |
70 | qpush push the next patch onto the stack |
|
72 | qpush push the next patch onto the stack | |
71 | qqueue manage multiple patch queues |
|
73 | qqueue manage multiple patch queues | |
72 | qrefresh update the current patch |
|
74 | qrefresh update the current patch | |
73 | qrename rename a patch |
|
75 | qrename rename a patch | |
74 | qselect set or print guarded patches to push |
|
76 | qselect set or print guarded patches to push | |
75 | qseries print the entire series file |
|
77 | qseries print the entire series file | |
76 | qtop print the name of the current patch |
|
78 | qtop print the name of the current patch | |
77 | qunapplied print the patches not yet applied |
|
79 | qunapplied print the patches not yet applied | |
78 | strip strip changesets and all their descendants from the repository |
|
80 | strip strip changesets and all their descendants from the repository | |
79 |
|
81 | |||
80 | use "hg -v help mq" to show builtin aliases and global options |
|
82 | use "hg -v help mq" to show builtin aliases and global options | |
81 |
|
83 | |||
82 | $ hg init a |
|
84 | $ hg init a | |
83 | $ cd a |
|
85 | $ cd a | |
84 | $ echo a > a |
|
86 | $ echo a > a | |
85 | $ hg ci -Ama |
|
87 | $ hg ci -Ama | |
86 | adding a |
|
88 | adding a | |
87 |
|
89 | |||
88 | $ hg clone . ../k |
|
90 | $ hg clone . ../k | |
89 | updating to branch default |
|
91 | updating to branch default | |
90 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
92 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 |
|
93 | |||
92 | $ mkdir b |
|
94 | $ mkdir b | |
93 | $ echo z > b/z |
|
95 | $ echo z > b/z | |
94 | $ hg ci -Ama |
|
96 | $ hg ci -Ama | |
95 | adding b/z |
|
97 | adding b/z | |
96 |
|
98 | |||
97 |
|
99 | |||
98 | qinit |
|
100 | qinit | |
99 |
|
101 | |||
100 | $ hg qinit |
|
102 | $ hg qinit | |
101 |
|
103 | |||
102 | $ cd .. |
|
104 | $ cd .. | |
103 | $ hg init b |
|
105 | $ hg init b | |
104 |
|
106 | |||
105 |
|
107 | |||
106 | -R qinit |
|
108 | -R qinit | |
107 |
|
109 | |||
108 | $ hg -R b qinit |
|
110 | $ hg -R b qinit | |
109 |
|
111 | |||
110 | $ hg init c |
|
112 | $ hg init c | |
111 |
|
113 | |||
112 |
|
114 | |||
113 | qinit -c |
|
115 | qinit -c | |
114 |
|
116 | |||
115 | $ hg --cwd c qinit -c |
|
117 | $ hg --cwd c qinit -c | |
116 | $ hg -R c/.hg/patches st |
|
118 | $ hg -R c/.hg/patches st | |
117 | A .hgignore |
|
119 | A .hgignore | |
118 | A series |
|
120 | A series | |
119 |
|
121 | |||
120 |
|
122 | |||
121 | qinit; qinit -c |
|
123 | qinit; qinit -c | |
122 |
|
124 | |||
123 | $ hg init d |
|
125 | $ hg init d | |
124 | $ cd d |
|
126 | $ cd d | |
125 | $ hg qinit |
|
127 | $ hg qinit | |
126 | $ hg qinit -c |
|
128 | $ hg qinit -c | |
127 |
|
129 | |||
128 | qinit -c should create both files if they don't exist |
|
130 | qinit -c should create both files if they don't exist | |
129 |
|
131 | |||
130 | $ cat .hg/patches/.hgignore |
|
132 | $ cat .hg/patches/.hgignore | |
131 | ^\.hg |
|
133 | ^\.hg | |
132 | ^\.mq |
|
134 | ^\.mq | |
133 | syntax: glob |
|
135 | syntax: glob | |
134 | status |
|
136 | status | |
135 | guards |
|
137 | guards | |
136 | $ cat .hg/patches/series |
|
138 | $ cat .hg/patches/series | |
137 | $ hg qinit -c |
|
139 | $ hg qinit -c | |
138 | abort: repository $TESTTMP/d/.hg/patches already exists! |
|
140 | abort: repository $TESTTMP/d/.hg/patches already exists! | |
139 | [255] |
|
141 | [255] | |
140 | $ cd .. |
|
142 | $ cd .. | |
141 |
|
143 | |||
142 | $ echo '% qinit; <stuff>; qinit -c' |
|
144 | $ echo '% qinit; <stuff>; qinit -c' | |
143 | % qinit; <stuff>; qinit -c |
|
145 | % qinit; <stuff>; qinit -c | |
144 | $ hg init e |
|
146 | $ hg init e | |
145 | $ cd e |
|
147 | $ cd e | |
146 | $ hg qnew A |
|
148 | $ hg qnew A | |
147 | $ checkundo qnew |
|
149 | $ checkundo qnew | |
148 | $ echo foo > foo |
|
150 | $ echo foo > foo | |
149 | $ hg add foo |
|
151 | $ hg add foo | |
150 | $ hg qrefresh |
|
152 | $ hg qrefresh | |
151 | $ hg qnew B |
|
153 | $ hg qnew B | |
152 | $ echo >> foo |
|
154 | $ echo >> foo | |
153 | $ hg qrefresh |
|
155 | $ hg qrefresh | |
154 | $ echo status >> .hg/patches/.hgignore |
|
156 | $ echo status >> .hg/patches/.hgignore | |
155 | $ echo bleh >> .hg/patches/.hgignore |
|
157 | $ echo bleh >> .hg/patches/.hgignore | |
156 | $ hg qinit -c |
|
158 | $ hg qinit -c | |
157 | adding .hg/patches/A |
|
159 | adding .hg/patches/A | |
158 | adding .hg/patches/B |
|
160 | adding .hg/patches/B | |
159 | $ hg -R .hg/patches status |
|
161 | $ hg -R .hg/patches status | |
160 | A .hgignore |
|
162 | A .hgignore | |
161 | A A |
|
163 | A A | |
162 | A B |
|
164 | A B | |
163 | A series |
|
165 | A series | |
164 |
|
166 | |||
165 | qinit -c shouldn't touch these files if they already exist |
|
167 | qinit -c shouldn't touch these files if they already exist | |
166 |
|
168 | |||
167 | $ cat .hg/patches/.hgignore |
|
169 | $ cat .hg/patches/.hgignore | |
168 | status |
|
170 | status | |
169 | bleh |
|
171 | bleh | |
170 | $ cat .hg/patches/series |
|
172 | $ cat .hg/patches/series | |
171 | A |
|
173 | A | |
172 | B |
|
174 | B | |
173 |
|
175 | |||
174 | add an untracked file |
|
176 | add an untracked file | |
175 |
|
177 | |||
176 | $ echo >> .hg/patches/flaf |
|
178 | $ echo >> .hg/patches/flaf | |
177 |
|
179 | |||
178 | status --mq with color (issue2096) |
|
180 | status --mq with color (issue2096) | |
179 |
|
181 | |||
180 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always |
|
182 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always | |
181 | \x1b[0;32;1mA .hgignore\x1b[0m (esc) |
|
183 | \x1b[0;32;1mA .hgignore\x1b[0m (esc) | |
182 | \x1b[0;32;1mA A\x1b[0m (esc) |
|
184 | \x1b[0;32;1mA A\x1b[0m (esc) | |
183 | \x1b[0;32;1mA B\x1b[0m (esc) |
|
185 | \x1b[0;32;1mA B\x1b[0m (esc) | |
184 | \x1b[0;32;1mA series\x1b[0m (esc) |
|
186 | \x1b[0;32;1mA series\x1b[0m (esc) | |
185 | \x1b[0;35;1;4m? flaf\x1b[0m (esc) |
|
187 | \x1b[0;35;1;4m? flaf\x1b[0m (esc) | |
186 |
|
188 | |||
187 | try the --mq option on a command provided by an extension |
|
189 | try the --mq option on a command provided by an extension | |
188 |
|
190 | |||
189 | $ hg purge --mq --verbose --config extensions.purge= |
|
191 | $ hg purge --mq --verbose --config extensions.purge= | |
190 | Removing file flaf |
|
192 | Removing file flaf | |
191 |
|
193 | |||
192 | $ cd .. |
|
194 | $ cd .. | |
193 |
|
195 | |||
194 | init --mq without repo |
|
196 | init --mq without repo | |
195 |
|
197 | |||
196 | $ mkdir f |
|
198 | $ mkdir f | |
197 | $ cd f |
|
199 | $ cd f | |
198 | $ hg init --mq |
|
200 | $ hg init --mq | |
199 | abort: there is no Mercurial repository here (.hg not found) |
|
201 | abort: there is no Mercurial repository here (.hg not found) | |
200 | [255] |
|
202 | [255] | |
201 | $ cd .. |
|
203 | $ cd .. | |
202 |
|
204 | |||
203 | init --mq with repo path |
|
205 | init --mq with repo path | |
204 |
|
206 | |||
205 | $ hg init g |
|
207 | $ hg init g | |
206 | $ hg init --mq g |
|
208 | $ hg init --mq g | |
207 | $ test -d g/.hg/patches/.hg |
|
209 | $ test -d g/.hg/patches/.hg | |
208 |
|
210 | |||
209 | init --mq with nonexistent directory |
|
211 | init --mq with nonexistent directory | |
210 |
|
212 | |||
211 | $ hg init --mq nonexistentdir |
|
213 | $ hg init --mq nonexistentdir | |
212 | abort: repository nonexistentdir not found! |
|
214 | abort: repository nonexistentdir not found! | |
213 | [255] |
|
215 | [255] | |
214 |
|
216 | |||
215 |
|
217 | |||
216 | init --mq with bundle (non "local") |
|
218 | init --mq with bundle (non "local") | |
217 |
|
219 | |||
218 | $ hg -R a bundle --all a.bundle >/dev/null |
|
220 | $ hg -R a bundle --all a.bundle >/dev/null | |
219 | $ hg init --mq a.bundle |
|
221 | $ hg init --mq a.bundle | |
220 | abort: only a local queue repository may be initialized |
|
222 | abort: only a local queue repository may be initialized | |
221 | [255] |
|
223 | [255] | |
222 |
|
224 | |||
223 | $ cd a |
|
225 | $ cd a | |
224 |
|
226 | |||
225 | $ hg qnew -m 'foo bar' test.patch |
|
227 | $ hg qnew -m 'foo bar' test.patch | |
226 |
|
228 | |||
227 | $ echo '# comment' > .hg/patches/series.tmp |
|
229 | $ echo '# comment' > .hg/patches/series.tmp | |
228 | $ echo >> .hg/patches/series.tmp # empty line |
|
230 | $ echo >> .hg/patches/series.tmp # empty line | |
229 | $ cat .hg/patches/series >> .hg/patches/series.tmp |
|
231 | $ cat .hg/patches/series >> .hg/patches/series.tmp | |
230 | $ mv .hg/patches/series.tmp .hg/patches/series |
|
232 | $ mv .hg/patches/series.tmp .hg/patches/series | |
231 |
|
233 | |||
232 |
|
234 | |||
233 | qrefresh |
|
235 | qrefresh | |
234 |
|
236 | |||
235 | $ echo a >> a |
|
237 | $ echo a >> a | |
236 | $ hg qrefresh |
|
238 | $ hg qrefresh | |
237 | $ cat .hg/patches/test.patch |
|
239 | $ cat .hg/patches/test.patch | |
238 | foo bar |
|
240 | foo bar | |
239 |
|
241 | |||
240 | diff -r [a-f0-9]* a (re) |
|
242 | diff -r [a-f0-9]* a (re) | |
241 | --- a/a\t(?P<date>.*) (re) |
|
243 | --- a/a\t(?P<date>.*) (re) | |
242 | \+\+\+ b/a\t(?P<date2>.*) (re) |
|
244 | \+\+\+ b/a\t(?P<date2>.*) (re) | |
243 | @@ -1,1 +1,2 @@ |
|
245 | @@ -1,1 +1,2 @@ | |
244 | a |
|
246 | a | |
245 | +a |
|
247 | +a | |
246 |
|
248 | |||
247 | empty qrefresh |
|
249 | empty qrefresh | |
248 |
|
250 | |||
249 | $ hg qrefresh -X a |
|
251 | $ hg qrefresh -X a | |
250 |
|
252 | |||
251 | revision: |
|
253 | revision: | |
252 |
|
254 | |||
253 | $ hg diff -r -2 -r -1 |
|
255 | $ hg diff -r -2 -r -1 | |
254 |
|
256 | |||
255 | patch: |
|
257 | patch: | |
256 |
|
258 | |||
257 | $ cat .hg/patches/test.patch |
|
259 | $ cat .hg/patches/test.patch | |
258 | foo bar |
|
260 | foo bar | |
259 |
|
261 | |||
260 |
|
262 | |||
261 | working dir diff: |
|
263 | working dir diff: | |
262 |
|
264 | |||
263 | $ hg diff --nodates -q |
|
265 | $ hg diff --nodates -q | |
264 | --- a/a |
|
266 | --- a/a | |
265 | +++ b/a |
|
267 | +++ b/a | |
266 | @@ -1,1 +1,2 @@ |
|
268 | @@ -1,1 +1,2 @@ | |
267 | a |
|
269 | a | |
268 | +a |
|
270 | +a | |
269 |
|
271 | |||
270 | restore things |
|
272 | restore things | |
271 |
|
273 | |||
272 | $ hg qrefresh |
|
274 | $ hg qrefresh | |
273 | $ checkundo qrefresh |
|
275 | $ checkundo qrefresh | |
274 |
|
276 | |||
275 |
|
277 | |||
276 | qpop |
|
278 | qpop | |
277 |
|
279 | |||
278 | $ hg qpop |
|
280 | $ hg qpop | |
279 | popping test.patch |
|
281 | popping test.patch | |
280 | patch queue now empty |
|
282 | patch queue now empty | |
281 | $ checkundo qpop |
|
283 | $ checkundo qpop | |
282 |
|
284 | |||
283 |
|
285 | |||
284 | qpush with dump of tag cache |
|
286 | qpush with dump of tag cache | |
285 | Dump the tag cache to ensure that it has exactly one head after qpush. |
|
287 | Dump the tag cache to ensure that it has exactly one head after qpush. | |
286 |
|
288 | |||
287 | $ rm -f .hg/cache/tags |
|
289 | $ rm -f .hg/cache/tags | |
288 | $ hg tags > /dev/null |
|
290 | $ hg tags > /dev/null | |
289 |
|
291 | |||
290 | .hg/cache/tags (pre qpush): |
|
292 | .hg/cache/tags (pre qpush): | |
291 |
|
293 | |||
292 | $ cat .hg/cache/tags |
|
294 | $ cat .hg/cache/tags | |
293 | 1 [\da-f]{40} (re) |
|
295 | 1 [\da-f]{40} (re) | |
294 |
|
296 | |||
295 | $ hg qpush |
|
297 | $ hg qpush | |
296 | applying test.patch |
|
298 | applying test.patch | |
297 | now at: test.patch |
|
299 | now at: test.patch | |
298 | $ hg tags > /dev/null |
|
300 | $ hg tags > /dev/null | |
299 |
|
301 | |||
300 | .hg/cache/tags (post qpush): |
|
302 | .hg/cache/tags (post qpush): | |
301 |
|
303 | |||
302 | $ cat .hg/cache/tags |
|
304 | $ cat .hg/cache/tags | |
303 | 2 [\da-f]{40} (re) |
|
305 | 2 [\da-f]{40} (re) | |
304 |
|
306 | |||
305 | $ checkundo qpush |
|
307 | $ checkundo qpush | |
306 | $ cd .. |
|
308 | $ cd .. | |
307 |
|
309 | |||
308 |
|
310 | |||
309 | pop/push outside repo |
|
311 | pop/push outside repo | |
310 | $ hg -R a qpop |
|
312 | $ hg -R a qpop | |
311 | popping test.patch |
|
313 | popping test.patch | |
312 | patch queue now empty |
|
314 | patch queue now empty | |
313 | $ hg -R a qpush |
|
315 | $ hg -R a qpush | |
314 | applying test.patch |
|
316 | applying test.patch | |
315 | now at: test.patch |
|
317 | now at: test.patch | |
316 |
|
318 | |||
317 | $ cd a |
|
319 | $ cd a | |
318 | $ hg qnew test2.patch |
|
320 | $ hg qnew test2.patch | |
319 |
|
321 | |||
320 | qrefresh in subdir |
|
322 | qrefresh in subdir | |
321 |
|
323 | |||
322 | $ cd b |
|
324 | $ cd b | |
323 | $ echo a > a |
|
325 | $ echo a > a | |
324 | $ hg add a |
|
326 | $ hg add a | |
325 | $ hg qrefresh |
|
327 | $ hg qrefresh | |
326 |
|
328 | |||
327 | pop/push -a in subdir |
|
329 | pop/push -a in subdir | |
328 |
|
330 | |||
329 | $ hg qpop -a |
|
331 | $ hg qpop -a | |
330 | popping test2.patch |
|
332 | popping test2.patch | |
331 | popping test.patch |
|
333 | popping test.patch | |
332 | patch queue now empty |
|
334 | patch queue now empty | |
333 | $ hg --traceback qpush -a |
|
335 | $ hg --traceback qpush -a | |
334 | applying test.patch |
|
336 | applying test.patch | |
335 | applying test2.patch |
|
337 | applying test2.patch | |
336 | now at: test2.patch |
|
338 | now at: test2.patch | |
337 |
|
339 | |||
338 |
|
340 | |||
339 | setting columns & formatted tests truncating (issue1912) |
|
341 | setting columns & formatted tests truncating (issue1912) | |
340 |
|
342 | |||
341 | $ COLUMNS=4 hg qseries --config ui.formatted=true |
|
343 | $ COLUMNS=4 hg qseries --config ui.formatted=true | |
342 | test.patch |
|
344 | test.patch | |
343 | test2.patch |
|
345 | test2.patch | |
344 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs |
|
346 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs | |
345 | 0 A test.patch: f... |
|
347 | 0 A test.patch: f... | |
346 | 1 A test2.patch: |
|
348 | 1 A test2.patch: | |
347 | $ hg qpop |
|
349 | $ hg qpop | |
348 | popping test2.patch |
|
350 | popping test2.patch | |
349 | now at: test.patch |
|
351 | now at: test.patch | |
350 | $ hg qseries -vs |
|
352 | $ hg qseries -vs | |
351 | 0 A test.patch: foo bar |
|
353 | 0 A test.patch: foo bar | |
352 | 1 U test2.patch: |
|
354 | 1 U test2.patch: | |
353 | $ hg sum | grep mq |
|
355 | $ hg sum | grep mq | |
354 | mq: 1 applied, 1 unapplied |
|
356 | mq: 1 applied, 1 unapplied | |
355 | $ hg qpush |
|
357 | $ hg qpush | |
356 | applying test2.patch |
|
358 | applying test2.patch | |
357 | now at: test2.patch |
|
359 | now at: test2.patch | |
358 | $ hg sum | grep mq |
|
360 | $ hg sum | grep mq | |
359 | mq: 2 applied |
|
361 | mq: 2 applied | |
360 | $ hg qapplied |
|
362 | $ hg qapplied | |
361 | test.patch |
|
363 | test.patch | |
362 | test2.patch |
|
364 | test2.patch | |
363 | $ hg qtop |
|
365 | $ hg qtop | |
364 | test2.patch |
|
366 | test2.patch | |
365 |
|
367 | |||
366 |
|
368 | |||
367 | prev |
|
369 | prev | |
368 |
|
370 | |||
369 | $ hg qapp -1 |
|
371 | $ hg qapp -1 | |
370 | test.patch |
|
372 | test.patch | |
371 |
|
373 | |||
372 | next |
|
374 | next | |
373 |
|
375 | |||
374 | $ hg qunapp -1 |
|
376 | $ hg qunapp -1 | |
375 | all patches applied |
|
377 | all patches applied | |
376 | [1] |
|
378 | [1] | |
377 |
|
379 | |||
378 | $ hg qpop |
|
380 | $ hg qpop | |
379 | popping test2.patch |
|
381 | popping test2.patch | |
380 | now at: test.patch |
|
382 | now at: test.patch | |
381 |
|
383 | |||
382 | commit should fail |
|
384 | commit should fail | |
383 |
|
385 | |||
384 | $ hg commit |
|
386 | $ hg commit | |
385 | abort: cannot commit over an applied mq patch |
|
387 | abort: cannot commit over an applied mq patch | |
386 | [255] |
|
388 | [255] | |
387 |
|
389 | |||
388 | push should fail |
|
390 | push should fail | |
389 |
|
391 | |||
390 | $ hg push ../../k |
|
392 | $ hg push ../../k | |
391 | pushing to ../../k |
|
393 | pushing to ../../k | |
392 | abort: source has mq patches applied |
|
394 | abort: source has mq patches applied | |
393 | [255] |
|
395 | [255] | |
394 |
|
396 | |||
395 |
|
397 | |||
396 | import should fail |
|
398 | import should fail | |
397 |
|
399 | |||
398 | $ hg st . |
|
400 | $ hg st . | |
399 | $ echo foo >> ../a |
|
401 | $ echo foo >> ../a | |
400 | $ hg diff > ../../import.diff |
|
402 | $ hg diff > ../../import.diff | |
401 | $ hg revert --no-backup ../a |
|
403 | $ hg revert --no-backup ../a | |
402 | $ hg import ../../import.diff |
|
404 | $ hg import ../../import.diff | |
403 | abort: cannot import over an applied patch |
|
405 | abort: cannot import over an applied patch | |
404 | [255] |
|
406 | [255] | |
405 | $ hg st |
|
407 | $ hg st | |
406 |
|
408 | |||
407 | import --no-commit should succeed |
|
409 | import --no-commit should succeed | |
408 |
|
410 | |||
409 | $ hg import --no-commit ../../import.diff |
|
411 | $ hg import --no-commit ../../import.diff | |
410 | applying ../../import.diff |
|
412 | applying ../../import.diff | |
411 | $ hg st |
|
413 | $ hg st | |
412 | M a |
|
414 | M a | |
413 | $ hg revert --no-backup ../a |
|
415 | $ hg revert --no-backup ../a | |
414 |
|
416 | |||
415 |
|
417 | |||
416 | qunapplied |
|
418 | qunapplied | |
417 |
|
419 | |||
418 | $ hg qunapplied |
|
420 | $ hg qunapplied | |
419 | test2.patch |
|
421 | test2.patch | |
420 |
|
422 | |||
421 |
|
423 | |||
422 | qpush/qpop with index |
|
424 | qpush/qpop with index | |
423 |
|
425 | |||
424 | $ hg qnew test1b.patch |
|
426 | $ hg qnew test1b.patch | |
425 | $ echo 1b > 1b |
|
427 | $ echo 1b > 1b | |
426 | $ hg add 1b |
|
428 | $ hg add 1b | |
427 | $ hg qrefresh |
|
429 | $ hg qrefresh | |
428 | $ hg qpush 2 |
|
430 | $ hg qpush 2 | |
429 | applying test2.patch |
|
431 | applying test2.patch | |
430 | now at: test2.patch |
|
432 | now at: test2.patch | |
431 | $ hg qpop 0 |
|
433 | $ hg qpop 0 | |
432 | popping test2.patch |
|
434 | popping test2.patch | |
433 | popping test1b.patch |
|
435 | popping test1b.patch | |
434 | now at: test.patch |
|
436 | now at: test.patch | |
435 | $ hg qpush test.patch+1 |
|
437 | $ hg qpush test.patch+1 | |
436 | applying test1b.patch |
|
438 | applying test1b.patch | |
437 | now at: test1b.patch |
|
439 | now at: test1b.patch | |
438 | $ hg qpush test.patch+2 |
|
440 | $ hg qpush test.patch+2 | |
439 | applying test2.patch |
|
441 | applying test2.patch | |
440 | now at: test2.patch |
|
442 | now at: test2.patch | |
441 | $ hg qpop test2.patch-1 |
|
443 | $ hg qpop test2.patch-1 | |
442 | popping test2.patch |
|
444 | popping test2.patch | |
443 | now at: test1b.patch |
|
445 | now at: test1b.patch | |
444 | $ hg qpop test2.patch-2 |
|
446 | $ hg qpop test2.patch-2 | |
445 | popping test1b.patch |
|
447 | popping test1b.patch | |
446 | now at: test.patch |
|
448 | now at: test.patch | |
447 | $ hg qpush test1b.patch+1 |
|
449 | $ hg qpush test1b.patch+1 | |
448 | applying test1b.patch |
|
450 | applying test1b.patch | |
449 | applying test2.patch |
|
451 | applying test2.patch | |
450 | now at: test2.patch |
|
452 | now at: test2.patch | |
451 |
|
453 | |||
452 |
|
454 | |||
453 | qpush --move |
|
455 | qpush --move | |
454 |
|
456 | |||
455 | $ hg qpop -a |
|
457 | $ hg qpop -a | |
456 | popping test2.patch |
|
458 | popping test2.patch | |
457 | popping test1b.patch |
|
459 | popping test1b.patch | |
458 | popping test.patch |
|
460 | popping test.patch | |
459 | patch queue now empty |
|
461 | patch queue now empty | |
460 | $ hg qguard test1b.patch -- -negguard |
|
462 | $ hg qguard test1b.patch -- -negguard | |
461 | $ hg qguard test2.patch -- +posguard |
|
463 | $ hg qguard test2.patch -- +posguard | |
462 | $ hg qpush --move test2.patch # can't move guarded patch |
|
464 | $ hg qpush --move test2.patch # can't move guarded patch | |
463 | cannot push 'test2.patch' - guarded by '+posguard' |
|
465 | cannot push 'test2.patch' - guarded by '+posguard' | |
464 | [1] |
|
466 | [1] | |
465 | $ hg qselect posguard |
|
467 | $ hg qselect posguard | |
466 | number of unguarded, unapplied patches has changed from 2 to 3 |
|
468 | number of unguarded, unapplied patches has changed from 2 to 3 | |
467 | $ hg qpush --move test2.patch # move to front |
|
469 | $ hg qpush --move test2.patch # move to front | |
468 | applying test2.patch |
|
470 | applying test2.patch | |
469 | now at: test2.patch |
|
471 | now at: test2.patch | |
470 | $ hg qpush --move test1b.patch # negative guard unselected |
|
472 | $ hg qpush --move test1b.patch # negative guard unselected | |
471 | applying test1b.patch |
|
473 | applying test1b.patch | |
472 | now at: test1b.patch |
|
474 | now at: test1b.patch | |
473 | $ hg qpush --move test.patch # noop move |
|
475 | $ hg qpush --move test.patch # noop move | |
474 | applying test.patch |
|
476 | applying test.patch | |
475 | now at: test.patch |
|
477 | now at: test.patch | |
476 | $ hg qseries -v |
|
478 | $ hg qseries -v | |
477 | 0 A test2.patch |
|
479 | 0 A test2.patch | |
478 | 1 A test1b.patch |
|
480 | 1 A test1b.patch | |
479 | 2 A test.patch |
|
481 | 2 A test.patch | |
480 | $ hg qpop -a |
|
482 | $ hg qpop -a | |
481 | popping test.patch |
|
483 | popping test.patch | |
482 | popping test1b.patch |
|
484 | popping test1b.patch | |
483 | popping test2.patch |
|
485 | popping test2.patch | |
484 | patch queue now empty |
|
486 | patch queue now empty | |
485 |
|
487 | |||
486 | cleaning up |
|
488 | cleaning up | |
487 |
|
489 | |||
488 | $ hg qselect --none |
|
490 | $ hg qselect --none | |
489 | guards deactivated |
|
491 | guards deactivated | |
490 | number of unguarded, unapplied patches has changed from 3 to 2 |
|
492 | number of unguarded, unapplied patches has changed from 3 to 2 | |
491 | $ hg qguard --none test1b.patch |
|
493 | $ hg qguard --none test1b.patch | |
492 | $ hg qguard --none test2.patch |
|
494 | $ hg qguard --none test2.patch | |
493 | $ hg qpush --move test.patch |
|
495 | $ hg qpush --move test.patch | |
494 | applying test.patch |
|
496 | applying test.patch | |
495 | now at: test.patch |
|
497 | now at: test.patch | |
496 | $ hg qpush --move test1b.patch |
|
498 | $ hg qpush --move test1b.patch | |
497 | applying test1b.patch |
|
499 | applying test1b.patch | |
498 | now at: test1b.patch |
|
500 | now at: test1b.patch | |
499 | $ hg qpush --move bogus # nonexistent patch |
|
501 | $ hg qpush --move bogus # nonexistent patch | |
500 | abort: patch bogus not in series |
|
502 | abort: patch bogus not in series | |
501 | [255] |
|
503 | [255] | |
502 | $ hg qpush --move # no patch |
|
504 | $ hg qpush --move # no patch | |
503 | abort: please specify the patch to move |
|
505 | abort: please specify the patch to move | |
504 | [255] |
|
506 | [255] | |
505 | $ hg qpush --move test.patch # already applied |
|
507 | $ hg qpush --move test.patch # already applied | |
506 | abort: cannot push to a previous patch: test.patch |
|
508 | abort: cannot push to a previous patch: test.patch | |
507 | [255] |
|
509 | [255] | |
508 | $ hg qpush |
|
510 | $ hg qpush | |
509 | applying test2.patch |
|
511 | applying test2.patch | |
510 | now at: test2.patch |
|
512 | now at: test2.patch | |
511 |
|
513 | |||
512 |
|
514 | |||
513 | series after move |
|
515 | series after move | |
514 |
|
516 | |||
515 | $ cat `hg root`/.hg/patches/series |
|
517 | $ cat `hg root`/.hg/patches/series | |
516 | test.patch |
|
518 | test.patch | |
517 | test1b.patch |
|
519 | test1b.patch | |
518 | test2.patch |
|
520 | test2.patch | |
519 | # comment |
|
521 | # comment | |
520 |
|
522 | |||
521 |
|
523 | |||
522 |
|
524 | |||
523 | pop, qapplied, qunapplied |
|
525 | pop, qapplied, qunapplied | |
524 |
|
526 | |||
525 | $ hg qseries -v |
|
527 | $ hg qseries -v | |
526 | 0 A test.patch |
|
528 | 0 A test.patch | |
527 | 1 A test1b.patch |
|
529 | 1 A test1b.patch | |
528 | 2 A test2.patch |
|
530 | 2 A test2.patch | |
529 |
|
531 | |||
530 | qapplied -1 test.patch |
|
532 | qapplied -1 test.patch | |
531 |
|
533 | |||
532 | $ hg qapplied -1 test.patch |
|
534 | $ hg qapplied -1 test.patch | |
533 | only one patch applied |
|
535 | only one patch applied | |
534 | [1] |
|
536 | [1] | |
535 |
|
537 | |||
536 | qapplied -1 test1b.patch |
|
538 | qapplied -1 test1b.patch | |
537 |
|
539 | |||
538 | $ hg qapplied -1 test1b.patch |
|
540 | $ hg qapplied -1 test1b.patch | |
539 | test.patch |
|
541 | test.patch | |
540 |
|
542 | |||
541 | qapplied -1 test2.patch |
|
543 | qapplied -1 test2.patch | |
542 |
|
544 | |||
543 | $ hg qapplied -1 test2.patch |
|
545 | $ hg qapplied -1 test2.patch | |
544 | test1b.patch |
|
546 | test1b.patch | |
545 |
|
547 | |||
546 | qapplied -1 |
|
548 | qapplied -1 | |
547 |
|
549 | |||
548 | $ hg qapplied -1 |
|
550 | $ hg qapplied -1 | |
549 | test1b.patch |
|
551 | test1b.patch | |
550 |
|
552 | |||
551 | qapplied |
|
553 | qapplied | |
552 |
|
554 | |||
553 | $ hg qapplied |
|
555 | $ hg qapplied | |
554 | test.patch |
|
556 | test.patch | |
555 | test1b.patch |
|
557 | test1b.patch | |
556 | test2.patch |
|
558 | test2.patch | |
557 |
|
559 | |||
558 | qapplied test1b.patch |
|
560 | qapplied test1b.patch | |
559 |
|
561 | |||
560 | $ hg qapplied test1b.patch |
|
562 | $ hg qapplied test1b.patch | |
561 | test.patch |
|
563 | test.patch | |
562 | test1b.patch |
|
564 | test1b.patch | |
563 |
|
565 | |||
564 | qunapplied -1 |
|
566 | qunapplied -1 | |
565 |
|
567 | |||
566 | $ hg qunapplied -1 |
|
568 | $ hg qunapplied -1 | |
567 | all patches applied |
|
569 | all patches applied | |
568 | [1] |
|
570 | [1] | |
569 |
|
571 | |||
570 | qunapplied |
|
572 | qunapplied | |
571 |
|
573 | |||
572 | $ hg qunapplied |
|
574 | $ hg qunapplied | |
573 |
|
575 | |||
574 | popping |
|
576 | popping | |
575 |
|
577 | |||
576 | $ hg qpop |
|
578 | $ hg qpop | |
577 | popping test2.patch |
|
579 | popping test2.patch | |
578 | now at: test1b.patch |
|
580 | now at: test1b.patch | |
579 |
|
581 | |||
580 | qunapplied -1 |
|
582 | qunapplied -1 | |
581 |
|
583 | |||
582 | $ hg qunapplied -1 |
|
584 | $ hg qunapplied -1 | |
583 | test2.patch |
|
585 | test2.patch | |
584 |
|
586 | |||
585 | qunapplied |
|
587 | qunapplied | |
586 |
|
588 | |||
587 | $ hg qunapplied |
|
589 | $ hg qunapplied | |
588 | test2.patch |
|
590 | test2.patch | |
589 |
|
591 | |||
590 | qunapplied test2.patch |
|
592 | qunapplied test2.patch | |
591 |
|
593 | |||
592 | $ hg qunapplied test2.patch |
|
594 | $ hg qunapplied test2.patch | |
593 |
|
595 | |||
594 | qunapplied -1 test2.patch |
|
596 | qunapplied -1 test2.patch | |
595 |
|
597 | |||
596 | $ hg qunapplied -1 test2.patch |
|
598 | $ hg qunapplied -1 test2.patch | |
597 | all patches applied |
|
599 | all patches applied | |
598 | [1] |
|
600 | [1] | |
599 |
|
601 | |||
600 | popping -a |
|
602 | popping -a | |
601 |
|
603 | |||
602 | $ hg qpop -a |
|
604 | $ hg qpop -a | |
603 | popping test1b.patch |
|
605 | popping test1b.patch | |
604 | popping test.patch |
|
606 | popping test.patch | |
605 | patch queue now empty |
|
607 | patch queue now empty | |
606 |
|
608 | |||
607 | qapplied |
|
609 | qapplied | |
608 |
|
610 | |||
609 | $ hg qapplied |
|
611 | $ hg qapplied | |
610 |
|
612 | |||
611 | qapplied -1 |
|
613 | qapplied -1 | |
612 |
|
614 | |||
613 | $ hg qapplied -1 |
|
615 | $ hg qapplied -1 | |
614 | no patches applied |
|
616 | no patches applied | |
615 | [1] |
|
617 | [1] | |
616 | $ hg qpush |
|
618 | $ hg qpush | |
617 | applying test.patch |
|
619 | applying test.patch | |
618 | now at: test.patch |
|
620 | now at: test.patch | |
619 |
|
621 | |||
620 |
|
622 | |||
621 | push should succeed |
|
623 | push should succeed | |
622 |
|
624 | |||
623 | $ hg qpop -a |
|
625 | $ hg qpop -a | |
624 | popping test.patch |
|
626 | popping test.patch | |
625 | patch queue now empty |
|
627 | patch queue now empty | |
626 | $ hg push ../../k |
|
628 | $ hg push ../../k | |
627 | pushing to ../../k |
|
629 | pushing to ../../k | |
628 | searching for changes |
|
630 | searching for changes | |
629 | adding changesets |
|
631 | adding changesets | |
630 | adding manifests |
|
632 | adding manifests | |
631 | adding file changes |
|
633 | adding file changes | |
632 | added 1 changesets with 1 changes to 1 files |
|
634 | added 1 changesets with 1 changes to 1 files | |
633 |
|
635 | |||
634 |
|
636 | |||
635 | we want to start with some patches applied |
|
637 | we want to start with some patches applied | |
636 |
|
638 | |||
637 | $ hg qpush -a |
|
639 | $ hg qpush -a | |
638 | applying test.patch |
|
640 | applying test.patch | |
639 | applying test1b.patch |
|
641 | applying test1b.patch | |
640 | applying test2.patch |
|
642 | applying test2.patch | |
641 | now at: test2.patch |
|
643 | now at: test2.patch | |
642 |
|
644 | |||
643 | % pops all patches and succeeds |
|
645 | % pops all patches and succeeds | |
644 |
|
646 | |||
645 | $ hg qpop -a |
|
647 | $ hg qpop -a | |
646 | popping test2.patch |
|
648 | popping test2.patch | |
647 | popping test1b.patch |
|
649 | popping test1b.patch | |
648 | popping test.patch |
|
650 | popping test.patch | |
649 | patch queue now empty |
|
651 | patch queue now empty | |
650 |
|
652 | |||
651 | % does nothing and succeeds |
|
653 | % does nothing and succeeds | |
652 |
|
654 | |||
653 | $ hg qpop -a |
|
655 | $ hg qpop -a | |
654 | no patches applied |
|
656 | no patches applied | |
655 |
|
657 | |||
656 | % fails - nothing else to pop |
|
658 | % fails - nothing else to pop | |
657 |
|
659 | |||
658 | $ hg qpop |
|
660 | $ hg qpop | |
659 | no patches applied |
|
661 | no patches applied | |
660 | [1] |
|
662 | [1] | |
661 |
|
663 | |||
662 | % pushes a patch and succeeds |
|
664 | % pushes a patch and succeeds | |
663 |
|
665 | |||
664 | $ hg qpush |
|
666 | $ hg qpush | |
665 | applying test.patch |
|
667 | applying test.patch | |
666 | now at: test.patch |
|
668 | now at: test.patch | |
667 |
|
669 | |||
668 | % pops a patch and succeeds |
|
670 | % pops a patch and succeeds | |
669 |
|
671 | |||
670 | $ hg qpop |
|
672 | $ hg qpop | |
671 | popping test.patch |
|
673 | popping test.patch | |
672 | patch queue now empty |
|
674 | patch queue now empty | |
673 |
|
675 | |||
674 | % pushes up to test1b.patch and succeeds |
|
676 | % pushes up to test1b.patch and succeeds | |
675 |
|
677 | |||
676 | $ hg qpush test1b.patch |
|
678 | $ hg qpush test1b.patch | |
677 | applying test.patch |
|
679 | applying test.patch | |
678 | applying test1b.patch |
|
680 | applying test1b.patch | |
679 | now at: test1b.patch |
|
681 | now at: test1b.patch | |
680 |
|
682 | |||
681 | % does nothing and succeeds |
|
683 | % does nothing and succeeds | |
682 |
|
684 | |||
683 | $ hg qpush test1b.patch |
|
685 | $ hg qpush test1b.patch | |
684 | qpush: test1b.patch is already at the top |
|
686 | qpush: test1b.patch is already at the top | |
685 |
|
687 | |||
686 | % does nothing and succeeds |
|
688 | % does nothing and succeeds | |
687 |
|
689 | |||
688 | $ hg qpop test1b.patch |
|
690 | $ hg qpop test1b.patch | |
689 | qpop: test1b.patch is already at the top |
|
691 | qpop: test1b.patch is already at the top | |
690 |
|
692 | |||
691 | % fails - can't push to this patch |
|
693 | % fails - can't push to this patch | |
692 |
|
694 | |||
693 | $ hg qpush test.patch |
|
695 | $ hg qpush test.patch | |
694 | abort: cannot push to a previous patch: test.patch |
|
696 | abort: cannot push to a previous patch: test.patch | |
695 | [255] |
|
697 | [255] | |
696 |
|
698 | |||
697 | % fails - can't pop to this patch |
|
699 | % fails - can't pop to this patch | |
698 |
|
700 | |||
699 | $ hg qpop test2.patch |
|
701 | $ hg qpop test2.patch | |
700 | abort: patch test2.patch is not applied |
|
702 | abort: patch test2.patch is not applied | |
701 | [255] |
|
703 | [255] | |
702 |
|
704 | |||
703 | % pops up to test.patch and succeeds |
|
705 | % pops up to test.patch and succeeds | |
704 |
|
706 | |||
705 | $ hg qpop test.patch |
|
707 | $ hg qpop test.patch | |
706 | popping test1b.patch |
|
708 | popping test1b.patch | |
707 | now at: test.patch |
|
709 | now at: test.patch | |
708 |
|
710 | |||
709 | % pushes all patches and succeeds |
|
711 | % pushes all patches and succeeds | |
710 |
|
712 | |||
711 | $ hg qpush -a |
|
713 | $ hg qpush -a | |
712 | applying test1b.patch |
|
714 | applying test1b.patch | |
713 | applying test2.patch |
|
715 | applying test2.patch | |
714 | now at: test2.patch |
|
716 | now at: test2.patch | |
715 |
|
717 | |||
716 | % does nothing and succeeds |
|
718 | % does nothing and succeeds | |
717 |
|
719 | |||
718 | $ hg qpush -a |
|
720 | $ hg qpush -a | |
719 | all patches are currently applied |
|
721 | all patches are currently applied | |
720 |
|
722 | |||
721 | % fails - nothing else to push |
|
723 | % fails - nothing else to push | |
722 |
|
724 | |||
723 | $ hg qpush |
|
725 | $ hg qpush | |
724 | patch series already fully applied |
|
726 | patch series already fully applied | |
725 | [1] |
|
727 | [1] | |
726 |
|
728 | |||
727 | % does nothing and succeeds |
|
729 | % does nothing and succeeds | |
728 |
|
730 | |||
729 | $ hg qpush test2.patch |
|
731 | $ hg qpush test2.patch | |
730 | qpush: test2.patch is already at the top |
|
732 | qpush: test2.patch is already at the top | |
731 |
|
733 | |||
732 | strip |
|
734 | strip | |
733 |
|
735 | |||
734 | $ cd ../../b |
|
736 | $ cd ../../b | |
735 | $ echo x>x |
|
737 | $ echo x>x | |
736 | $ hg ci -Ama |
|
738 | $ hg ci -Ama | |
737 | adding x |
|
739 | adding x | |
738 | $ hg strip tip |
|
740 | $ hg strip tip | |
739 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
741 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
740 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
742 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) | |
741 | $ hg unbundle .hg/strip-backup/* |
|
743 | $ hg unbundle .hg/strip-backup/* | |
742 | adding changesets |
|
744 | adding changesets | |
743 | adding manifests |
|
745 | adding manifests | |
744 | adding file changes |
|
746 | adding file changes | |
745 | added 1 changesets with 1 changes to 1 files |
|
747 | added 1 changesets with 1 changes to 1 files | |
746 | (run 'hg update' to get a working copy) |
|
748 | (run 'hg update' to get a working copy) | |
747 |
|
749 | |||
748 |
|
750 | |||
749 | strip with local changes, should complain |
|
751 | strip with local changes, should complain | |
750 |
|
752 | |||
751 | $ hg up |
|
753 | $ hg up | |
752 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
754 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
753 | $ echo y>y |
|
755 | $ echo y>y | |
754 | $ hg add y |
|
756 | $ hg add y | |
755 | $ hg strip tip |
|
757 | $ hg strip tip | |
756 | abort: local changes found |
|
758 | abort: local changes found | |
757 | [255] |
|
759 | [255] | |
758 |
|
760 | |||
759 | --force strip with local changes |
|
761 | --force strip with local changes | |
760 |
|
762 | |||
761 | $ hg strip -f tip |
|
763 | $ hg strip -f tip | |
762 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
764 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
763 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
765 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) | |
764 |
|
766 | |||
765 |
|
767 | |||
766 | cd b; hg qrefresh |
|
768 | cd b; hg qrefresh | |
767 |
|
769 | |||
768 | $ hg init refresh |
|
770 | $ hg init refresh | |
769 | $ cd refresh |
|
771 | $ cd refresh | |
770 | $ echo a > a |
|
772 | $ echo a > a | |
771 | $ hg ci -Ama |
|
773 | $ hg ci -Ama | |
772 | adding a |
|
774 | adding a | |
773 | $ hg qnew -mfoo foo |
|
775 | $ hg qnew -mfoo foo | |
774 | $ echo a >> a |
|
776 | $ echo a >> a | |
775 | $ hg qrefresh |
|
777 | $ hg qrefresh | |
776 | $ mkdir b |
|
778 | $ mkdir b | |
777 | $ cd b |
|
779 | $ cd b | |
778 | $ echo f > f |
|
780 | $ echo f > f | |
779 | $ hg add f |
|
781 | $ hg add f | |
780 | $ hg qrefresh |
|
782 | $ hg qrefresh | |
781 | $ cat ../.hg/patches/foo |
|
783 | $ cat ../.hg/patches/foo | |
782 | foo |
|
784 | foo | |
783 |
|
785 | |||
784 | diff -r cb9a9f314b8b a |
|
786 | diff -r cb9a9f314b8b a | |
785 | --- a/a\t(?P<date>.*) (re) |
|
787 | --- a/a\t(?P<date>.*) (re) | |
786 | \+\+\+ b/a\t(?P<date>.*) (re) |
|
788 | \+\+\+ b/a\t(?P<date>.*) (re) | |
787 | @@ -1,1 +1,2 @@ |
|
789 | @@ -1,1 +1,2 @@ | |
788 | a |
|
790 | a | |
789 | +a |
|
791 | +a | |
790 | diff -r cb9a9f314b8b b/f |
|
792 | diff -r cb9a9f314b8b b/f | |
791 | --- /dev/null\t(?P<date>.*) (re) |
|
793 | --- /dev/null\t(?P<date>.*) (re) | |
792 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
794 | \+\+\+ b/b/f\t(?P<date>.*) (re) | |
793 | @@ -0,0 +1,1 @@ |
|
795 | @@ -0,0 +1,1 @@ | |
794 | +f |
|
796 | +f | |
795 |
|
797 | |||
796 | hg qrefresh . |
|
798 | hg qrefresh . | |
797 |
|
799 | |||
798 | $ hg qrefresh . |
|
800 | $ hg qrefresh . | |
799 | $ cat ../.hg/patches/foo |
|
801 | $ cat ../.hg/patches/foo | |
800 | foo |
|
802 | foo | |
801 |
|
803 | |||
802 | diff -r cb9a9f314b8b b/f |
|
804 | diff -r cb9a9f314b8b b/f | |
803 | --- /dev/null\t(?P<date>.*) (re) |
|
805 | --- /dev/null\t(?P<date>.*) (re) | |
804 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
806 | \+\+\+ b/b/f\t(?P<date>.*) (re) | |
805 | @@ -0,0 +1,1 @@ |
|
807 | @@ -0,0 +1,1 @@ | |
806 | +f |
|
808 | +f | |
807 | $ hg status |
|
809 | $ hg status | |
808 | M a |
|
810 | M a | |
809 |
|
811 | |||
810 |
|
812 | |||
811 | qpush failure |
|
813 | qpush failure | |
812 |
|
814 | |||
813 | $ cd .. |
|
815 | $ cd .. | |
814 | $ hg qrefresh |
|
816 | $ hg qrefresh | |
815 | $ hg qnew -mbar bar |
|
817 | $ hg qnew -mbar bar | |
816 | $ echo foo > foo |
|
818 | $ echo foo > foo | |
817 | $ echo bar > bar |
|
819 | $ echo bar > bar | |
818 | $ hg add foo bar |
|
820 | $ hg add foo bar | |
819 | $ hg qrefresh |
|
821 | $ hg qrefresh | |
820 | $ hg qpop -a |
|
822 | $ hg qpop -a | |
821 | popping bar |
|
823 | popping bar | |
822 | popping foo |
|
824 | popping foo | |
823 | patch queue now empty |
|
825 | patch queue now empty | |
824 | $ echo bar > foo |
|
826 | $ echo bar > foo | |
825 | $ hg qpush -a |
|
827 | $ hg qpush -a | |
826 | applying foo |
|
828 | applying foo | |
827 | applying bar |
|
829 | applying bar | |
828 | file foo already exists |
|
830 | file foo already exists | |
829 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
831 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
830 | patch failed, unable to continue (try -v) |
|
832 | patch failed, unable to continue (try -v) | |
831 | patch failed, rejects left in working dir |
|
833 | patch failed, rejects left in working dir | |
832 | errors during apply, please fix and refresh bar |
|
834 | errors during apply, please fix and refresh bar | |
833 | [2] |
|
835 | [2] | |
834 | $ hg st |
|
836 | $ hg st | |
835 | ? foo |
|
837 | ? foo | |
836 | ? foo.rej |
|
838 | ? foo.rej | |
837 |
|
839 | |||
838 |
|
840 | |||
839 | mq tags |
|
841 | mq tags | |
840 |
|
842 | |||
841 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip |
|
843 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip | |
842 | 0 qparent |
|
844 | 0 qparent | |
843 | 1 foo qbase |
|
845 | 1 foo qbase | |
844 | 2 bar qtip tip |
|
846 | 2 bar qtip tip | |
845 |
|
847 | |||
846 | mq revset |
|
848 | mq revset | |
847 |
|
849 | |||
848 | $ hg log -r 'mq()' --template '{rev}\n' |
|
850 | $ hg log -r 'mq()' --template '{rev}\n' | |
849 | 1 |
|
851 | 1 | |
850 | 2 |
|
852 | 2 | |
851 | $ hg help revsets | grep -i mq |
|
853 | $ hg help revsets | grep -i mq | |
852 | "mq()" |
|
854 | "mq()" | |
853 | Changesets managed by MQ. |
|
855 | Changesets managed by MQ. | |
854 |
|
856 | |||
855 | bad node in status |
|
857 | bad node in status | |
856 |
|
858 | |||
857 | $ hg qpop |
|
859 | $ hg qpop | |
858 | popping bar |
|
860 | popping bar | |
859 | now at: foo |
|
861 | now at: foo | |
860 | $ hg strip -qn tip |
|
862 | $ hg strip -qn tip | |
861 | $ hg tip |
|
863 | $ hg tip | |
862 | changeset: 0:cb9a9f314b8b |
|
864 | changeset: 0:cb9a9f314b8b | |
863 | tag: tip |
|
865 | tag: tip | |
864 | user: test |
|
866 | user: test | |
865 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
867 | date: Thu Jan 01 00:00:00 1970 +0000 | |
866 | summary: a |
|
868 | summary: a | |
867 |
|
869 | |||
868 | $ hg branches |
|
870 | $ hg branches | |
869 | default 0:cb9a9f314b8b |
|
871 | default 0:cb9a9f314b8b | |
870 | $ hg qpop |
|
872 | $ hg qpop | |
871 | no patches applied |
|
873 | no patches applied | |
872 | [1] |
|
874 | [1] | |
873 |
|
875 | |||
874 | $ cat >>$HGRCPATH <<EOF |
|
876 | $ cat >>$HGRCPATH <<EOF | |
875 | > [diff] |
|
877 | > [diff] | |
876 | > git = True |
|
878 | > git = True | |
877 | > EOF |
|
879 | > EOF | |
878 | $ cd .. |
|
880 | $ cd .. | |
879 | $ hg init git |
|
881 | $ hg init git | |
880 | $ cd git |
|
882 | $ cd git | |
881 | $ hg qinit |
|
883 | $ hg qinit | |
882 |
|
884 | |||
883 | $ hg qnew -m'new file' new |
|
885 | $ hg qnew -m'new file' new | |
884 | $ echo foo > new |
|
886 | $ echo foo > new | |
885 | $ chmod +x new |
|
887 | $ chmod +x new | |
886 | $ hg add new |
|
888 | $ hg add new | |
887 | $ hg qrefresh |
|
889 | $ hg qrefresh | |
888 | $ cat .hg/patches/new |
|
890 | $ cat .hg/patches/new | |
889 | new file |
|
891 | new file | |
890 |
|
892 | |||
891 | diff --git a/new b/new |
|
893 | diff --git a/new b/new | |
892 | new file mode 100755 |
|
894 | new file mode 100755 | |
893 | --- /dev/null |
|
895 | --- /dev/null | |
894 | +++ b/new |
|
896 | +++ b/new | |
895 | @@ -0,0 +1,1 @@ |
|
897 | @@ -0,0 +1,1 @@ | |
896 | +foo |
|
898 | +foo | |
897 |
|
899 | |||
898 | $ hg qnew -m'copy file' copy |
|
900 | $ hg qnew -m'copy file' copy | |
899 | $ hg cp new copy |
|
901 | $ hg cp new copy | |
900 | $ hg qrefresh |
|
902 | $ hg qrefresh | |
901 | $ cat .hg/patches/copy |
|
903 | $ cat .hg/patches/copy | |
902 | copy file |
|
904 | copy file | |
903 |
|
905 | |||
904 | diff --git a/new b/copy |
|
906 | diff --git a/new b/copy | |
905 | copy from new |
|
907 | copy from new | |
906 | copy to copy |
|
908 | copy to copy | |
907 |
|
909 | |||
908 | $ hg qpop |
|
910 | $ hg qpop | |
909 | popping copy |
|
911 | popping copy | |
910 | now at: new |
|
912 | now at: new | |
911 | $ hg qpush |
|
913 | $ hg qpush | |
912 | applying copy |
|
914 | applying copy | |
913 | now at: copy |
|
915 | now at: copy | |
914 | $ hg qdiff |
|
916 | $ hg qdiff | |
915 | diff --git a/new b/copy |
|
917 | diff --git a/new b/copy | |
916 | copy from new |
|
918 | copy from new | |
917 | copy to copy |
|
919 | copy to copy | |
918 | $ cat >>$HGRCPATH <<EOF |
|
920 | $ cat >>$HGRCPATH <<EOF | |
919 | > [diff] |
|
921 | > [diff] | |
920 | > git = False |
|
922 | > git = False | |
921 | > EOF |
|
923 | > EOF | |
922 | $ hg qdiff --git |
|
924 | $ hg qdiff --git | |
923 | diff --git a/new b/copy |
|
925 | diff --git a/new b/copy | |
924 | copy from new |
|
926 | copy from new | |
925 | copy to copy |
|
927 | copy to copy | |
926 | $ cd .. |
|
928 | $ cd .. | |
927 |
|
929 | |||
928 | empty lines in status |
|
930 | empty lines in status | |
929 |
|
931 | |||
930 | $ hg init emptystatus |
|
932 | $ hg init emptystatus | |
931 | $ cd emptystatus |
|
933 | $ cd emptystatus | |
932 | $ hg qinit |
|
934 | $ hg qinit | |
933 | $ printf '\n\n' > .hg/patches/status |
|
935 | $ printf '\n\n' > .hg/patches/status | |
934 | $ hg qser |
|
936 | $ hg qser | |
935 | $ cd .. |
|
937 | $ cd .. | |
936 |
|
938 | |||
937 | bad line in status (without ":") |
|
939 | bad line in status (without ":") | |
938 |
|
940 | |||
939 | $ hg init badstatus |
|
941 | $ hg init badstatus | |
940 | $ cd badstatus |
|
942 | $ cd badstatus | |
941 | $ hg qinit |
|
943 | $ hg qinit | |
942 | $ printf 'babar has no colon in this line\n' > .hg/patches/status |
|
944 | $ printf 'babar has no colon in this line\n' > .hg/patches/status | |
943 | $ hg qser |
|
945 | $ hg qser | |
944 | malformated mq status line: ['babar has no colon in this line'] |
|
946 | malformated mq status line: ['babar has no colon in this line'] | |
945 | $ cd .. |
|
947 | $ cd .. | |
946 |
|
948 | |||
947 |
|
949 | |||
948 | test file addition in slow path |
|
950 | test file addition in slow path | |
949 |
|
951 | |||
950 | $ hg init slow |
|
952 | $ hg init slow | |
951 | $ cd slow |
|
953 | $ cd slow | |
952 | $ hg qinit |
|
954 | $ hg qinit | |
953 | $ echo foo > foo |
|
955 | $ echo foo > foo | |
954 | $ hg add foo |
|
956 | $ hg add foo | |
955 | $ hg ci -m 'add foo' |
|
957 | $ hg ci -m 'add foo' | |
956 | $ hg qnew bar |
|
958 | $ hg qnew bar | |
957 | $ echo bar > bar |
|
959 | $ echo bar > bar | |
958 | $ hg add bar |
|
960 | $ hg add bar | |
959 | $ hg mv foo baz |
|
961 | $ hg mv foo baz | |
960 | $ hg qrefresh --git |
|
962 | $ hg qrefresh --git | |
961 | $ hg up -C 0 |
|
963 | $ hg up -C 0 | |
962 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
964 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
963 | $ echo >> foo |
|
965 | $ echo >> foo | |
964 | $ hg ci -m 'change foo' |
|
966 | $ hg ci -m 'change foo' | |
965 | created new head |
|
967 | created new head | |
966 | $ hg up -C 1 |
|
968 | $ hg up -C 1 | |
967 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
969 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
968 | $ hg qrefresh --git |
|
970 | $ hg qrefresh --git | |
969 | $ cat .hg/patches/bar |
|
971 | $ cat .hg/patches/bar | |
970 | diff --git a/bar b/bar |
|
972 | diff --git a/bar b/bar | |
971 | new file mode 100644 |
|
973 | new file mode 100644 | |
972 | --- /dev/null |
|
974 | --- /dev/null | |
973 | +++ b/bar |
|
975 | +++ b/bar | |
974 | @@ -0,0 +1,1 @@ |
|
976 | @@ -0,0 +1,1 @@ | |
975 | +bar |
|
977 | +bar | |
976 | diff --git a/foo b/baz |
|
978 | diff --git a/foo b/baz | |
977 | rename from foo |
|
979 | rename from foo | |
978 | rename to baz |
|
980 | rename to baz | |
979 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
981 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
980 | 2 baz (foo) |
|
982 | 2 baz (foo) | |
981 | $ hg qrefresh --git |
|
983 | $ hg qrefresh --git | |
982 | $ cat .hg/patches/bar |
|
984 | $ cat .hg/patches/bar | |
983 | diff --git a/bar b/bar |
|
985 | diff --git a/bar b/bar | |
984 | new file mode 100644 |
|
986 | new file mode 100644 | |
985 | --- /dev/null |
|
987 | --- /dev/null | |
986 | +++ b/bar |
|
988 | +++ b/bar | |
987 | @@ -0,0 +1,1 @@ |
|
989 | @@ -0,0 +1,1 @@ | |
988 | +bar |
|
990 | +bar | |
989 | diff --git a/foo b/baz |
|
991 | diff --git a/foo b/baz | |
990 | rename from foo |
|
992 | rename from foo | |
991 | rename to baz |
|
993 | rename to baz | |
992 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
994 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
993 | 2 baz (foo) |
|
995 | 2 baz (foo) | |
994 | $ hg qrefresh |
|
996 | $ hg qrefresh | |
995 | $ grep 'diff --git' .hg/patches/bar |
|
997 | $ grep 'diff --git' .hg/patches/bar | |
996 | diff --git a/bar b/bar |
|
998 | diff --git a/bar b/bar | |
997 | diff --git a/foo b/baz |
|
999 | diff --git a/foo b/baz | |
998 |
|
1000 | |||
999 |
|
1001 | |||
1000 | test file move chains in the slow path |
|
1002 | test file move chains in the slow path | |
1001 |
|
1003 | |||
1002 | $ hg up -C 1 |
|
1004 | $ hg up -C 1 | |
1003 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1005 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1004 | $ echo >> foo |
|
1006 | $ echo >> foo | |
1005 | $ hg ci -m 'change foo again' |
|
1007 | $ hg ci -m 'change foo again' | |
1006 | $ hg up -C 2 |
|
1008 | $ hg up -C 2 | |
1007 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1009 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1008 | $ hg mv bar quux |
|
1010 | $ hg mv bar quux | |
1009 | $ hg mv baz bleh |
|
1011 | $ hg mv baz bleh | |
1010 | $ hg qrefresh --git |
|
1012 | $ hg qrefresh --git | |
1011 | $ cat .hg/patches/bar |
|
1013 | $ cat .hg/patches/bar | |
1012 | diff --git a/foo b/bleh |
|
1014 | diff --git a/foo b/bleh | |
1013 | rename from foo |
|
1015 | rename from foo | |
1014 | rename to bleh |
|
1016 | rename to bleh | |
1015 | diff --git a/quux b/quux |
|
1017 | diff --git a/quux b/quux | |
1016 | new file mode 100644 |
|
1018 | new file mode 100644 | |
1017 | --- /dev/null |
|
1019 | --- /dev/null | |
1018 | +++ b/quux |
|
1020 | +++ b/quux | |
1019 | @@ -0,0 +1,1 @@ |
|
1021 | @@ -0,0 +1,1 @@ | |
1020 | +bar |
|
1022 | +bar | |
1021 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1023 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1022 | 3 bleh (foo) |
|
1024 | 3 bleh (foo) | |
1023 | $ hg mv quux fred |
|
1025 | $ hg mv quux fred | |
1024 | $ hg mv bleh barney |
|
1026 | $ hg mv bleh barney | |
1025 | $ hg qrefresh --git |
|
1027 | $ hg qrefresh --git | |
1026 | $ cat .hg/patches/bar |
|
1028 | $ cat .hg/patches/bar | |
1027 | diff --git a/foo b/barney |
|
1029 | diff --git a/foo b/barney | |
1028 | rename from foo |
|
1030 | rename from foo | |
1029 | rename to barney |
|
1031 | rename to barney | |
1030 | diff --git a/fred b/fred |
|
1032 | diff --git a/fred b/fred | |
1031 | new file mode 100644 |
|
1033 | new file mode 100644 | |
1032 | --- /dev/null |
|
1034 | --- /dev/null | |
1033 | +++ b/fred |
|
1035 | +++ b/fred | |
1034 | @@ -0,0 +1,1 @@ |
|
1036 | @@ -0,0 +1,1 @@ | |
1035 | +bar |
|
1037 | +bar | |
1036 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1038 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1037 | 3 barney (foo) |
|
1039 | 3 barney (foo) | |
1038 |
|
1040 | |||
1039 |
|
1041 | |||
1040 | refresh omitting an added file |
|
1042 | refresh omitting an added file | |
1041 |
|
1043 | |||
1042 | $ hg qnew baz |
|
1044 | $ hg qnew baz | |
1043 | $ echo newfile > newfile |
|
1045 | $ echo newfile > newfile | |
1044 | $ hg add newfile |
|
1046 | $ hg add newfile | |
1045 | $ hg qrefresh |
|
1047 | $ hg qrefresh | |
1046 | $ hg st -A newfile |
|
1048 | $ hg st -A newfile | |
1047 | C newfile |
|
1049 | C newfile | |
1048 | $ hg qrefresh -X newfile |
|
1050 | $ hg qrefresh -X newfile | |
1049 | $ hg st -A newfile |
|
1051 | $ hg st -A newfile | |
1050 | A newfile |
|
1052 | A newfile | |
1051 | $ hg revert newfile |
|
1053 | $ hg revert newfile | |
1052 | $ rm newfile |
|
1054 | $ rm newfile | |
1053 | $ hg qpop |
|
1055 | $ hg qpop | |
1054 | popping baz |
|
1056 | popping baz | |
1055 | now at: bar |
|
1057 | now at: bar | |
1056 | $ hg qdel baz |
|
1058 | $ hg qdel baz | |
1057 |
|
1059 | |||
1058 |
|
1060 | |||
1059 | create a git patch |
|
1061 | create a git patch | |
1060 |
|
1062 | |||
1061 | $ echo a > alexander |
|
1063 | $ echo a > alexander | |
1062 | $ hg add alexander |
|
1064 | $ hg add alexander | |
1063 | $ hg qnew -f --git addalexander |
|
1065 | $ hg qnew -f --git addalexander | |
1064 | $ grep diff .hg/patches/addalexander |
|
1066 | $ grep diff .hg/patches/addalexander | |
1065 | diff --git a/alexander b/alexander |
|
1067 | diff --git a/alexander b/alexander | |
1066 |
|
1068 | |||
1067 |
|
1069 | |||
1068 | create a git binary patch |
|
1070 | create a git binary patch | |
1069 |
|
1071 | |||
1070 | $ cat > writebin.py <<EOF |
|
1072 | $ cat > writebin.py <<EOF | |
1071 | > import sys |
|
1073 | > import sys | |
1072 | > path = sys.argv[1] |
|
1074 | > path = sys.argv[1] | |
1073 | > open(path, 'wb').write('BIN\x00ARY') |
|
1075 | > open(path, 'wb').write('BIN\x00ARY') | |
1074 | > EOF |
|
1076 | > EOF | |
1075 | $ python writebin.py bucephalus |
|
1077 | $ python writebin.py bucephalus | |
1076 |
|
1078 | |||
1077 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1079 | $ python "$TESTDIR/md5sum.py" bucephalus | |
1078 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1080 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
1079 | $ hg add bucephalus |
|
1081 | $ hg add bucephalus | |
1080 | $ hg qnew -f --git addbucephalus |
|
1082 | $ hg qnew -f --git addbucephalus | |
1081 | $ grep diff .hg/patches/addbucephalus |
|
1083 | $ grep diff .hg/patches/addbucephalus | |
1082 | diff --git a/bucephalus b/bucephalus |
|
1084 | diff --git a/bucephalus b/bucephalus | |
1083 |
|
1085 | |||
1084 |
|
1086 | |||
1085 | check binary patches can be popped and pushed |
|
1087 | check binary patches can be popped and pushed | |
1086 |
|
1088 | |||
1087 | $ hg qpop |
|
1089 | $ hg qpop | |
1088 | popping addbucephalus |
|
1090 | popping addbucephalus | |
1089 | now at: addalexander |
|
1091 | now at: addalexander | |
1090 | $ test -f bucephalus && echo % bucephalus should not be there |
|
1092 | $ test -f bucephalus && echo % bucephalus should not be there | |
1091 | [1] |
|
1093 | [1] | |
1092 | $ hg qpush |
|
1094 | $ hg qpush | |
1093 | applying addbucephalus |
|
1095 | applying addbucephalus | |
1094 | now at: addbucephalus |
|
1096 | now at: addbucephalus | |
1095 | $ test -f bucephalus |
|
1097 | $ test -f bucephalus | |
1096 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1098 | $ python "$TESTDIR/md5sum.py" bucephalus | |
1097 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1099 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
1098 |
|
1100 | |||
1099 |
|
1101 | |||
1100 |
|
1102 | |||
1101 | strip again |
|
1103 | strip again | |
1102 |
|
1104 | |||
1103 | $ cd .. |
|
1105 | $ cd .. | |
1104 | $ hg init strip |
|
1106 | $ hg init strip | |
1105 | $ cd strip |
|
1107 | $ cd strip | |
1106 | $ touch foo |
|
1108 | $ touch foo | |
1107 | $ hg add foo |
|
1109 | $ hg add foo | |
1108 | $ hg ci -m 'add foo' |
|
1110 | $ hg ci -m 'add foo' | |
1109 | $ echo >> foo |
|
1111 | $ echo >> foo | |
1110 | $ hg ci -m 'change foo 1' |
|
1112 | $ hg ci -m 'change foo 1' | |
1111 | $ hg up -C 0 |
|
1113 | $ hg up -C 0 | |
1112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1114 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1113 | $ echo 1 >> foo |
|
1115 | $ echo 1 >> foo | |
1114 | $ hg ci -m 'change foo 2' |
|
1116 | $ hg ci -m 'change foo 2' | |
1115 | created new head |
|
1117 | created new head | |
1116 | $ HGMERGE=true hg merge |
|
1118 | $ HGMERGE=true hg merge | |
1117 | merging foo |
|
1119 | merging foo | |
1118 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1120 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1119 | (branch merge, don't forget to commit) |
|
1121 | (branch merge, don't forget to commit) | |
1120 | $ hg ci -m merge |
|
1122 | $ hg ci -m merge | |
1121 | $ hg log |
|
1123 | $ hg log | |
1122 | changeset: 3:99615015637b |
|
1124 | changeset: 3:99615015637b | |
1123 | tag: tip |
|
1125 | tag: tip | |
1124 | parent: 2:20cbbe65cff7 |
|
1126 | parent: 2:20cbbe65cff7 | |
1125 | parent: 1:d2871fc282d4 |
|
1127 | parent: 1:d2871fc282d4 | |
1126 | user: test |
|
1128 | user: test | |
1127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1129 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1128 | summary: merge |
|
1130 | summary: merge | |
1129 |
|
1131 | |||
1130 | changeset: 2:20cbbe65cff7 |
|
1132 | changeset: 2:20cbbe65cff7 | |
1131 | parent: 0:53245c60e682 |
|
1133 | parent: 0:53245c60e682 | |
1132 | user: test |
|
1134 | user: test | |
1133 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1135 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1134 | summary: change foo 2 |
|
1136 | summary: change foo 2 | |
1135 |
|
1137 | |||
1136 | changeset: 1:d2871fc282d4 |
|
1138 | changeset: 1:d2871fc282d4 | |
1137 | user: test |
|
1139 | user: test | |
1138 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1140 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1139 | summary: change foo 1 |
|
1141 | summary: change foo 1 | |
1140 |
|
1142 | |||
1141 | changeset: 0:53245c60e682 |
|
1143 | changeset: 0:53245c60e682 | |
1142 | user: test |
|
1144 | user: test | |
1143 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1145 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1144 | summary: add foo |
|
1146 | summary: add foo | |
1145 |
|
1147 | |||
1146 | $ hg strip 1 |
|
1148 | $ hg strip 1 | |
1147 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1148 | saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob) |
|
1150 | saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob) | |
1149 | $ checkundo strip |
|
1151 | $ checkundo strip | |
1150 | $ hg log |
|
1152 | $ hg log | |
1151 | changeset: 1:20cbbe65cff7 |
|
1153 | changeset: 1:20cbbe65cff7 | |
1152 | tag: tip |
|
1154 | tag: tip | |
1153 | user: test |
|
1155 | user: test | |
1154 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1156 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1155 | summary: change foo 2 |
|
1157 | summary: change foo 2 | |
1156 |
|
1158 | |||
1157 | changeset: 0:53245c60e682 |
|
1159 | changeset: 0:53245c60e682 | |
1158 | user: test |
|
1160 | user: test | |
1159 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1161 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1160 | summary: add foo |
|
1162 | summary: add foo | |
1161 |
|
1163 | |||
1162 | $ cd .. |
|
1164 | $ cd .. | |
1163 |
|
1165 | |||
1164 |
|
1166 | |||
1165 | qclone |
|
1167 | qclone | |
1166 |
|
1168 | |||
1167 | $ qlog() |
|
1169 | $ qlog() | |
1168 | > { |
|
1170 | > { | |
1169 | > echo 'main repo:' |
|
1171 | > echo 'main repo:' | |
1170 | > hg log --template ' rev {rev}: {desc}\n' |
|
1172 | > hg log --template ' rev {rev}: {desc}\n' | |
1171 | > echo 'patch repo:' |
|
1173 | > echo 'patch repo:' | |
1172 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
|
1174 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' | |
1173 | > } |
|
1175 | > } | |
1174 | $ hg init qclonesource |
|
1176 | $ hg init qclonesource | |
1175 | $ cd qclonesource |
|
1177 | $ cd qclonesource | |
1176 | $ echo foo > foo |
|
1178 | $ echo foo > foo | |
1177 | $ hg add foo |
|
1179 | $ hg add foo | |
1178 | $ hg ci -m 'add foo' |
|
1180 | $ hg ci -m 'add foo' | |
1179 | $ hg qinit |
|
1181 | $ hg qinit | |
1180 | $ hg qnew patch1 |
|
1182 | $ hg qnew patch1 | |
1181 | $ echo bar >> foo |
|
1183 | $ echo bar >> foo | |
1182 | $ hg qrefresh -m 'change foo' |
|
1184 | $ hg qrefresh -m 'change foo' | |
1183 | $ cd .. |
|
1185 | $ cd .. | |
1184 |
|
1186 | |||
1185 |
|
1187 | |||
1186 | repo with unversioned patch dir |
|
1188 | repo with unversioned patch dir | |
1187 |
|
1189 | |||
1188 | $ hg qclone qclonesource failure |
|
1190 | $ hg qclone qclonesource failure | |
1189 | abort: versioned patch repository not found (see init --mq) |
|
1191 | abort: versioned patch repository not found (see init --mq) | |
1190 | [255] |
|
1192 | [255] | |
1191 |
|
1193 | |||
1192 | $ cd qclonesource |
|
1194 | $ cd qclonesource | |
1193 | $ hg qinit -c |
|
1195 | $ hg qinit -c | |
1194 | adding .hg/patches/patch1 |
|
1196 | adding .hg/patches/patch1 | |
1195 | $ hg qci -m checkpoint |
|
1197 | $ hg qci -m checkpoint | |
1196 | $ qlog |
|
1198 | $ qlog | |
1197 | main repo: |
|
1199 | main repo: | |
1198 | rev 1: change foo |
|
1200 | rev 1: change foo | |
1199 | rev 0: add foo |
|
1201 | rev 0: add foo | |
1200 | patch repo: |
|
1202 | patch repo: | |
1201 | rev 0: checkpoint |
|
1203 | rev 0: checkpoint | |
1202 | $ cd .. |
|
1204 | $ cd .. | |
1203 |
|
1205 | |||
1204 |
|
1206 | |||
1205 | repo with patches applied |
|
1207 | repo with patches applied | |
1206 |
|
1208 | |||
1207 | $ hg qclone qclonesource qclonedest |
|
1209 | $ hg qclone qclonesource qclonedest | |
1208 | updating to branch default |
|
1210 | updating to branch default | |
1209 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1211 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1210 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1211 | $ cd qclonedest |
|
1213 | $ cd qclonedest | |
1212 | $ qlog |
|
1214 | $ qlog | |
1213 | main repo: |
|
1215 | main repo: | |
1214 | rev 0: add foo |
|
1216 | rev 0: add foo | |
1215 | patch repo: |
|
1217 | patch repo: | |
1216 | rev 0: checkpoint |
|
1218 | rev 0: checkpoint | |
1217 | $ cd .. |
|
1219 | $ cd .. | |
1218 |
|
1220 | |||
1219 |
|
1221 | |||
1220 | repo with patches unapplied |
|
1222 | repo with patches unapplied | |
1221 |
|
1223 | |||
1222 | $ cd qclonesource |
|
1224 | $ cd qclonesource | |
1223 | $ hg qpop -a |
|
1225 | $ hg qpop -a | |
1224 | popping patch1 |
|
1226 | popping patch1 | |
1225 | patch queue now empty |
|
1227 | patch queue now empty | |
1226 | $ qlog |
|
1228 | $ qlog | |
1227 | main repo: |
|
1229 | main repo: | |
1228 | rev 0: add foo |
|
1230 | rev 0: add foo | |
1229 | patch repo: |
|
1231 | patch repo: | |
1230 | rev 0: checkpoint |
|
1232 | rev 0: checkpoint | |
1231 | $ cd .. |
|
1233 | $ cd .. | |
1232 | $ hg qclone qclonesource qclonedest2 |
|
1234 | $ hg qclone qclonesource qclonedest2 | |
1233 | updating to branch default |
|
1235 | updating to branch default | |
1234 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1236 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1237 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1236 | $ cd qclonedest2 |
|
1238 | $ cd qclonedest2 | |
1237 | $ qlog |
|
1239 | $ qlog | |
1238 | main repo: |
|
1240 | main repo: | |
1239 | rev 0: add foo |
|
1241 | rev 0: add foo | |
1240 | patch repo: |
|
1242 | patch repo: | |
1241 | rev 0: checkpoint |
|
1243 | rev 0: checkpoint | |
1242 | $ cd .. |
|
1244 | $ cd .. | |
1243 |
|
1245 | |||
1244 |
|
1246 | |||
1245 | Issue1033: test applying on an empty file |
|
1247 | Issue1033: test applying on an empty file | |
1246 |
|
1248 | |||
1247 | $ hg init empty |
|
1249 | $ hg init empty | |
1248 | $ cd empty |
|
1250 | $ cd empty | |
1249 | $ touch a |
|
1251 | $ touch a | |
1250 | $ hg ci -Am addempty |
|
1252 | $ hg ci -Am addempty | |
1251 | adding a |
|
1253 | adding a | |
1252 | $ echo a > a |
|
1254 | $ echo a > a | |
1253 | $ hg qnew -f -e changea |
|
1255 | $ hg qnew -f -e changea | |
1254 | $ hg qpop |
|
1256 | $ hg qpop | |
1255 | popping changea |
|
1257 | popping changea | |
1256 | patch queue now empty |
|
1258 | patch queue now empty | |
1257 | $ hg qpush |
|
1259 | $ hg qpush | |
1258 | applying changea |
|
1260 | applying changea | |
1259 | now at: changea |
|
1261 | now at: changea | |
1260 | $ cd .. |
|
1262 | $ cd .. | |
1261 |
|
1263 | |||
1262 | test qpush with --force, issue1087 |
|
1264 | test qpush with --force, issue1087 | |
1263 |
|
1265 | |||
1264 | $ hg init forcepush |
|
1266 | $ hg init forcepush | |
1265 | $ cd forcepush |
|
1267 | $ cd forcepush | |
1266 | $ echo hello > hello.txt |
|
1268 | $ echo hello > hello.txt | |
1267 | $ echo bye > bye.txt |
|
1269 | $ echo bye > bye.txt | |
1268 | $ hg ci -Ama |
|
1270 | $ hg ci -Ama | |
1269 | adding bye.txt |
|
1271 | adding bye.txt | |
1270 | adding hello.txt |
|
1272 | adding hello.txt | |
1271 | $ hg qnew -d '0 0' empty |
|
1273 | $ hg qnew -d '0 0' empty | |
1272 | $ hg qpop |
|
1274 | $ hg qpop | |
1273 | popping empty |
|
1275 | popping empty | |
1274 | patch queue now empty |
|
1276 | patch queue now empty | |
1275 | $ echo world >> hello.txt |
|
1277 | $ echo world >> hello.txt | |
1276 |
|
1278 | |||
1277 |
|
1279 | |||
1278 | qpush should fail, local changes |
|
1280 | qpush should fail, local changes | |
1279 |
|
1281 | |||
1280 | $ hg qpush |
|
1282 | $ hg qpush | |
1281 | abort: local changes found |
|
1283 | abort: local changes found | |
1282 | [255] |
|
1284 | [255] | |
1283 |
|
1285 | |||
1284 |
|
1286 | |||
1285 | apply force, should not discard changes with empty patch |
|
1287 | apply force, should not discard changes with empty patch | |
1286 |
|
1288 | |||
1287 | $ hg qpush -f |
|
1289 | $ hg qpush -f | |
1288 | applying empty |
|
1290 | applying empty | |
1289 | patch empty is empty |
|
1291 | patch empty is empty | |
1290 | now at: empty |
|
1292 | now at: empty | |
1291 | $ hg diff --config diff.nodates=True |
|
1293 | $ hg diff --config diff.nodates=True | |
1292 | diff -r d58265112590 hello.txt |
|
1294 | diff -r d58265112590 hello.txt | |
1293 | --- a/hello.txt |
|
1295 | --- a/hello.txt | |
1294 | +++ b/hello.txt |
|
1296 | +++ b/hello.txt | |
1295 | @@ -1,1 +1,2 @@ |
|
1297 | @@ -1,1 +1,2 @@ | |
1296 | hello |
|
1298 | hello | |
1297 | +world |
|
1299 | +world | |
1298 | $ hg qdiff --config diff.nodates=True |
|
1300 | $ hg qdiff --config diff.nodates=True | |
1299 | diff -r 9ecee4f634e3 hello.txt |
|
1301 | diff -r 9ecee4f634e3 hello.txt | |
1300 | --- a/hello.txt |
|
1302 | --- a/hello.txt | |
1301 | +++ b/hello.txt |
|
1303 | +++ b/hello.txt | |
1302 | @@ -1,1 +1,2 @@ |
|
1304 | @@ -1,1 +1,2 @@ | |
1303 | hello |
|
1305 | hello | |
1304 | +world |
|
1306 | +world | |
1305 | $ hg log -l1 -p |
|
1307 | $ hg log -l1 -p | |
1306 | changeset: 1:d58265112590 |
|
1308 | changeset: 1:d58265112590 | |
1307 | tag: empty |
|
1309 | tag: empty | |
1308 | tag: qbase |
|
1310 | tag: qbase | |
1309 | tag: qtip |
|
1311 | tag: qtip | |
1310 | tag: tip |
|
1312 | tag: tip | |
1311 | user: test |
|
1313 | user: test | |
1312 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1314 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1313 | summary: imported patch empty |
|
1315 | summary: imported patch empty | |
1314 |
|
1316 | |||
1315 |
|
1317 | |||
1316 | $ hg qref -d '0 0' |
|
1318 | $ hg qref -d '0 0' | |
1317 | $ hg qpop |
|
1319 | $ hg qpop | |
1318 | popping empty |
|
1320 | popping empty | |
1319 | patch queue now empty |
|
1321 | patch queue now empty | |
1320 | $ echo universe >> hello.txt |
|
1322 | $ echo universe >> hello.txt | |
1321 | $ echo universe >> bye.txt |
|
1323 | $ echo universe >> bye.txt | |
1322 |
|
1324 | |||
1323 |
|
1325 | |||
1324 | qpush should fail, local changes |
|
1326 | qpush should fail, local changes | |
1325 |
|
1327 | |||
1326 | $ hg qpush |
|
1328 | $ hg qpush | |
1327 | abort: local changes found |
|
1329 | abort: local changes found | |
1328 | [255] |
|
1330 | [255] | |
1329 |
|
1331 | |||
1330 |
|
1332 | |||
1331 | apply force, should discard changes in hello, but not bye |
|
1333 | apply force, should discard changes in hello, but not bye | |
1332 |
|
1334 | |||
1333 | $ hg qpush -f |
|
1335 | $ hg qpush -f | |
1334 | applying empty |
|
1336 | applying empty | |
1335 | now at: empty |
|
1337 | now at: empty | |
1336 | $ hg st |
|
1338 | $ hg st | |
1337 | M bye.txt |
|
1339 | M bye.txt | |
1338 | $ hg diff --config diff.nodates=True |
|
1340 | $ hg diff --config diff.nodates=True | |
1339 | diff -r ba252371dbc1 bye.txt |
|
1341 | diff -r ba252371dbc1 bye.txt | |
1340 | --- a/bye.txt |
|
1342 | --- a/bye.txt | |
1341 | +++ b/bye.txt |
|
1343 | +++ b/bye.txt | |
1342 | @@ -1,1 +1,2 @@ |
|
1344 | @@ -1,1 +1,2 @@ | |
1343 | bye |
|
1345 | bye | |
1344 | +universe |
|
1346 | +universe | |
1345 | $ hg qdiff --config diff.nodates=True |
|
1347 | $ hg qdiff --config diff.nodates=True | |
1346 | diff -r 9ecee4f634e3 bye.txt |
|
1348 | diff -r 9ecee4f634e3 bye.txt | |
1347 | --- a/bye.txt |
|
1349 | --- a/bye.txt | |
1348 | +++ b/bye.txt |
|
1350 | +++ b/bye.txt | |
1349 | @@ -1,1 +1,2 @@ |
|
1351 | @@ -1,1 +1,2 @@ | |
1350 | bye |
|
1352 | bye | |
1351 | +universe |
|
1353 | +universe | |
1352 | diff -r 9ecee4f634e3 hello.txt |
|
1354 | diff -r 9ecee4f634e3 hello.txt | |
1353 | --- a/hello.txt |
|
1355 | --- a/hello.txt | |
1354 | +++ b/hello.txt |
|
1356 | +++ b/hello.txt | |
1355 | @@ -1,1 +1,3 @@ |
|
1357 | @@ -1,1 +1,3 @@ | |
1356 | hello |
|
1358 | hello | |
1357 | +world |
|
1359 | +world | |
1358 | +universe |
|
1360 | +universe | |
1359 |
|
1361 | |||
1360 |
|
1362 | |||
1361 | test popping revisions not in working dir ancestry |
|
1363 | test popping revisions not in working dir ancestry | |
1362 |
|
1364 | |||
1363 | $ hg qseries -v |
|
1365 | $ hg qseries -v | |
1364 | 0 A empty |
|
1366 | 0 A empty | |
1365 | $ hg up qparent |
|
1367 | $ hg up qparent | |
1366 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1368 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1367 | $ hg qpop |
|
1369 | $ hg qpop | |
1368 | popping empty |
|
1370 | popping empty | |
1369 | patch queue now empty |
|
1371 | patch queue now empty | |
1370 |
|
1372 | |||
1371 | $ cd .. |
|
1373 | $ cd .. | |
1372 | $ hg init deletion-order |
|
1374 | $ hg init deletion-order | |
1373 | $ cd deletion-order |
|
1375 | $ cd deletion-order | |
1374 |
|
1376 | |||
1375 | $ touch a |
|
1377 | $ touch a | |
1376 | $ hg ci -Aqm0 |
|
1378 | $ hg ci -Aqm0 | |
1377 |
|
1379 | |||
1378 | $ hg qnew rename-dir |
|
1380 | $ hg qnew rename-dir | |
1379 | $ hg rm a |
|
1381 | $ hg rm a | |
1380 | $ hg qrefresh |
|
1382 | $ hg qrefresh | |
1381 |
|
1383 | |||
1382 | $ mkdir a b |
|
1384 | $ mkdir a b | |
1383 | $ touch a/a b/b |
|
1385 | $ touch a/a b/b | |
1384 | $ hg add -q a b |
|
1386 | $ hg add -q a b | |
1385 | $ hg qrefresh |
|
1387 | $ hg qrefresh | |
1386 |
|
1388 | |||
1387 |
|
1389 | |||
1388 | test popping must remove files added in subdirectories first |
|
1390 | test popping must remove files added in subdirectories first | |
1389 |
|
1391 | |||
1390 | $ hg qpop |
|
1392 | $ hg qpop | |
1391 | popping rename-dir |
|
1393 | popping rename-dir | |
1392 | patch queue now empty |
|
1394 | patch queue now empty | |
1393 | $ cd .. |
|
1395 | $ cd .. | |
1394 |
|
1396 |
@@ -1,961 +1,963 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | Set up a repo |
|
3 | Set up a repo | |
2 |
|
4 | |||
3 | $ echo "[ui]" >> $HGRCPATH |
|
5 | $ echo "[ui]" >> $HGRCPATH | |
4 | $ echo "interactive=true" >> $HGRCPATH |
|
6 | $ echo "interactive=true" >> $HGRCPATH | |
5 | $ echo "[extensions]" >> $HGRCPATH |
|
7 | $ echo "[extensions]" >> $HGRCPATH | |
6 | $ echo "record=" >> $HGRCPATH |
|
8 | $ echo "record=" >> $HGRCPATH | |
7 |
|
9 | |||
8 | $ hg init a |
|
10 | $ hg init a | |
9 | $ cd a |
|
11 | $ cd a | |
10 |
|
12 | |||
11 | Select no files |
|
13 | Select no files | |
12 |
|
14 | |||
13 | $ touch empty-rw |
|
15 | $ touch empty-rw | |
14 | $ hg add empty-rw |
|
16 | $ hg add empty-rw | |
15 |
|
17 | |||
16 | $ hg record empty-rw<<EOF |
|
18 | $ hg record empty-rw<<EOF | |
17 | > n |
|
19 | > n | |
18 | > EOF |
|
20 | > EOF | |
19 | diff --git a/empty-rw b/empty-rw |
|
21 | diff --git a/empty-rw b/empty-rw | |
20 | new file mode 100644 |
|
22 | new file mode 100644 | |
21 | examine changes to 'empty-rw'? [Ynsfdaq?] |
|
23 | examine changes to 'empty-rw'? [Ynsfdaq?] | |
22 | no changes to record |
|
24 | no changes to record | |
23 |
|
25 | |||
24 | $ hg tip -p |
|
26 | $ hg tip -p | |
25 | changeset: -1:000000000000 |
|
27 | changeset: -1:000000000000 | |
26 | tag: tip |
|
28 | tag: tip | |
27 | user: |
|
29 | user: | |
28 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
30 | date: Thu Jan 01 00:00:00 1970 +0000 | |
29 |
|
31 | |||
30 |
|
32 | |||
31 |
|
33 | |||
32 | Select files but no hunks |
|
34 | Select files but no hunks | |
33 |
|
35 | |||
34 | $ hg record empty-rw<<EOF |
|
36 | $ hg record empty-rw<<EOF | |
35 | > y |
|
37 | > y | |
36 | > n |
|
38 | > n | |
37 | > EOF |
|
39 | > EOF | |
38 | diff --git a/empty-rw b/empty-rw |
|
40 | diff --git a/empty-rw b/empty-rw | |
39 | new file mode 100644 |
|
41 | new file mode 100644 | |
40 | examine changes to 'empty-rw'? [Ynsfdaq?] |
|
42 | examine changes to 'empty-rw'? [Ynsfdaq?] | |
41 | abort: empty commit message |
|
43 | abort: empty commit message | |
42 | [255] |
|
44 | [255] | |
43 |
|
45 | |||
44 | $ hg tip -p |
|
46 | $ hg tip -p | |
45 | changeset: -1:000000000000 |
|
47 | changeset: -1:000000000000 | |
46 | tag: tip |
|
48 | tag: tip | |
47 | user: |
|
49 | user: | |
48 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
50 | date: Thu Jan 01 00:00:00 1970 +0000 | |
49 |
|
51 | |||
50 |
|
52 | |||
51 |
|
53 | |||
52 | Record empty file |
|
54 | Record empty file | |
53 |
|
55 | |||
54 | $ hg record -d '0 0' -m empty empty-rw<<EOF |
|
56 | $ hg record -d '0 0' -m empty empty-rw<<EOF | |
55 | > y |
|
57 | > y | |
56 | > y |
|
58 | > y | |
57 | > EOF |
|
59 | > EOF | |
58 | diff --git a/empty-rw b/empty-rw |
|
60 | diff --git a/empty-rw b/empty-rw | |
59 | new file mode 100644 |
|
61 | new file mode 100644 | |
60 | examine changes to 'empty-rw'? [Ynsfdaq?] |
|
62 | examine changes to 'empty-rw'? [Ynsfdaq?] | |
61 |
|
63 | |||
62 | $ hg tip -p |
|
64 | $ hg tip -p | |
63 | changeset: 0:c0708cf4e46e |
|
65 | changeset: 0:c0708cf4e46e | |
64 | tag: tip |
|
66 | tag: tip | |
65 | user: test |
|
67 | user: test | |
66 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
68 | date: Thu Jan 01 00:00:00 1970 +0000 | |
67 | summary: empty |
|
69 | summary: empty | |
68 |
|
70 | |||
69 |
|
71 | |||
70 |
|
72 | |||
71 | Summary shows we updated to the new cset |
|
73 | Summary shows we updated to the new cset | |
72 |
|
74 | |||
73 | $ hg summary |
|
75 | $ hg summary | |
74 | parent: 0:c0708cf4e46e tip |
|
76 | parent: 0:c0708cf4e46e tip | |
75 | empty |
|
77 | empty | |
76 | branch: default |
|
78 | branch: default | |
77 | commit: (clean) |
|
79 | commit: (clean) | |
78 | update: (current) |
|
80 | update: (current) | |
79 |
|
81 | |||
80 | Rename empty file |
|
82 | Rename empty file | |
81 |
|
83 | |||
82 | $ hg mv empty-rw empty-rename |
|
84 | $ hg mv empty-rw empty-rename | |
83 | $ hg record -d '1 0' -m rename<<EOF |
|
85 | $ hg record -d '1 0' -m rename<<EOF | |
84 | > y |
|
86 | > y | |
85 | > EOF |
|
87 | > EOF | |
86 | diff --git a/empty-rw b/empty-rename |
|
88 | diff --git a/empty-rw b/empty-rename | |
87 | rename from empty-rw |
|
89 | rename from empty-rw | |
88 | rename to empty-rename |
|
90 | rename to empty-rename | |
89 | examine changes to 'empty-rw' and 'empty-rename'? [Ynsfdaq?] |
|
91 | examine changes to 'empty-rw' and 'empty-rename'? [Ynsfdaq?] | |
90 |
|
92 | |||
91 | $ hg tip -p |
|
93 | $ hg tip -p | |
92 | changeset: 1:d695e8dcb197 |
|
94 | changeset: 1:d695e8dcb197 | |
93 | tag: tip |
|
95 | tag: tip | |
94 | user: test |
|
96 | user: test | |
95 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
97 | date: Thu Jan 01 00:00:01 1970 +0000 | |
96 | summary: rename |
|
98 | summary: rename | |
97 |
|
99 | |||
98 |
|
100 | |||
99 |
|
101 | |||
100 | Copy empty file |
|
102 | Copy empty file | |
101 |
|
103 | |||
102 | $ hg cp empty-rename empty-copy |
|
104 | $ hg cp empty-rename empty-copy | |
103 | $ hg record -d '2 0' -m copy<<EOF |
|
105 | $ hg record -d '2 0' -m copy<<EOF | |
104 | > y |
|
106 | > y | |
105 | > EOF |
|
107 | > EOF | |
106 | diff --git a/empty-rename b/empty-copy |
|
108 | diff --git a/empty-rename b/empty-copy | |
107 | copy from empty-rename |
|
109 | copy from empty-rename | |
108 | copy to empty-copy |
|
110 | copy to empty-copy | |
109 | examine changes to 'empty-rename' and 'empty-copy'? [Ynsfdaq?] |
|
111 | examine changes to 'empty-rename' and 'empty-copy'? [Ynsfdaq?] | |
110 |
|
112 | |||
111 | $ hg tip -p |
|
113 | $ hg tip -p | |
112 | changeset: 2:1d4b90bea524 |
|
114 | changeset: 2:1d4b90bea524 | |
113 | tag: tip |
|
115 | tag: tip | |
114 | user: test |
|
116 | user: test | |
115 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
117 | date: Thu Jan 01 00:00:02 1970 +0000 | |
116 | summary: copy |
|
118 | summary: copy | |
117 |
|
119 | |||
118 |
|
120 | |||
119 |
|
121 | |||
120 | Delete empty file |
|
122 | Delete empty file | |
121 |
|
123 | |||
122 | $ hg rm empty-copy |
|
124 | $ hg rm empty-copy | |
123 | $ hg record -d '3 0' -m delete<<EOF |
|
125 | $ hg record -d '3 0' -m delete<<EOF | |
124 | > y |
|
126 | > y | |
125 | > EOF |
|
127 | > EOF | |
126 | diff --git a/empty-copy b/empty-copy |
|
128 | diff --git a/empty-copy b/empty-copy | |
127 | deleted file mode 100644 |
|
129 | deleted file mode 100644 | |
128 | examine changes to 'empty-copy'? [Ynsfdaq?] |
|
130 | examine changes to 'empty-copy'? [Ynsfdaq?] | |
129 |
|
131 | |||
130 | $ hg tip -p |
|
132 | $ hg tip -p | |
131 | changeset: 3:b39a238f01a1 |
|
133 | changeset: 3:b39a238f01a1 | |
132 | tag: tip |
|
134 | tag: tip | |
133 | user: test |
|
135 | user: test | |
134 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
136 | date: Thu Jan 01 00:00:03 1970 +0000 | |
135 | summary: delete |
|
137 | summary: delete | |
136 |
|
138 | |||
137 |
|
139 | |||
138 |
|
140 | |||
139 | Add binary file |
|
141 | Add binary file | |
140 |
|
142 | |||
141 | $ hg bundle --base -2 tip.bundle |
|
143 | $ hg bundle --base -2 tip.bundle | |
142 | 1 changesets found |
|
144 | 1 changesets found | |
143 | $ hg add tip.bundle |
|
145 | $ hg add tip.bundle | |
144 | $ hg record -d '4 0' -m binary<<EOF |
|
146 | $ hg record -d '4 0' -m binary<<EOF | |
145 | > y |
|
147 | > y | |
146 | > EOF |
|
148 | > EOF | |
147 | diff --git a/tip.bundle b/tip.bundle |
|
149 | diff --git a/tip.bundle b/tip.bundle | |
148 | new file mode 100644 |
|
150 | new file mode 100644 | |
149 | this is a binary file |
|
151 | this is a binary file | |
150 | examine changes to 'tip.bundle'? [Ynsfdaq?] |
|
152 | examine changes to 'tip.bundle'? [Ynsfdaq?] | |
151 |
|
153 | |||
152 | $ hg tip -p |
|
154 | $ hg tip -p | |
153 | changeset: 4:ad816da3711e |
|
155 | changeset: 4:ad816da3711e | |
154 | tag: tip |
|
156 | tag: tip | |
155 | user: test |
|
157 | user: test | |
156 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
158 | date: Thu Jan 01 00:00:04 1970 +0000 | |
157 | summary: binary |
|
159 | summary: binary | |
158 |
|
160 | |||
159 | diff -r b39a238f01a1 -r ad816da3711e tip.bundle |
|
161 | diff -r b39a238f01a1 -r ad816da3711e tip.bundle | |
160 | Binary file tip.bundle has changed |
|
162 | Binary file tip.bundle has changed | |
161 |
|
163 | |||
162 |
|
164 | |||
163 | Change binary file |
|
165 | Change binary file | |
164 |
|
166 | |||
165 | $ hg bundle --base -2 tip.bundle |
|
167 | $ hg bundle --base -2 tip.bundle | |
166 | 1 changesets found |
|
168 | 1 changesets found | |
167 | $ hg record -d '5 0' -m binary-change<<EOF |
|
169 | $ hg record -d '5 0' -m binary-change<<EOF | |
168 | > y |
|
170 | > y | |
169 | > EOF |
|
171 | > EOF | |
170 | diff --git a/tip.bundle b/tip.bundle |
|
172 | diff --git a/tip.bundle b/tip.bundle | |
171 | this modifies a binary file (all or nothing) |
|
173 | this modifies a binary file (all or nothing) | |
172 | examine changes to 'tip.bundle'? [Ynsfdaq?] |
|
174 | examine changes to 'tip.bundle'? [Ynsfdaq?] | |
173 |
|
175 | |||
174 | $ hg tip -p |
|
176 | $ hg tip -p | |
175 | changeset: 5:dccd6f3eb485 |
|
177 | changeset: 5:dccd6f3eb485 | |
176 | tag: tip |
|
178 | tag: tip | |
177 | user: test |
|
179 | user: test | |
178 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
180 | date: Thu Jan 01 00:00:05 1970 +0000 | |
179 | summary: binary-change |
|
181 | summary: binary-change | |
180 |
|
182 | |||
181 | diff -r ad816da3711e -r dccd6f3eb485 tip.bundle |
|
183 | diff -r ad816da3711e -r dccd6f3eb485 tip.bundle | |
182 | Binary file tip.bundle has changed |
|
184 | Binary file tip.bundle has changed | |
183 |
|
185 | |||
184 |
|
186 | |||
185 | Rename and change binary file |
|
187 | Rename and change binary file | |
186 |
|
188 | |||
187 | $ hg mv tip.bundle top.bundle |
|
189 | $ hg mv tip.bundle top.bundle | |
188 | $ hg bundle --base -2 top.bundle |
|
190 | $ hg bundle --base -2 top.bundle | |
189 | 1 changesets found |
|
191 | 1 changesets found | |
190 | $ hg record -d '6 0' -m binary-change-rename<<EOF |
|
192 | $ hg record -d '6 0' -m binary-change-rename<<EOF | |
191 | > y |
|
193 | > y | |
192 | > EOF |
|
194 | > EOF | |
193 | diff --git a/tip.bundle b/top.bundle |
|
195 | diff --git a/tip.bundle b/top.bundle | |
194 | rename from tip.bundle |
|
196 | rename from tip.bundle | |
195 | rename to top.bundle |
|
197 | rename to top.bundle | |
196 | this modifies a binary file (all or nothing) |
|
198 | this modifies a binary file (all or nothing) | |
197 | examine changes to 'tip.bundle' and 'top.bundle'? [Ynsfdaq?] |
|
199 | examine changes to 'tip.bundle' and 'top.bundle'? [Ynsfdaq?] | |
198 |
|
200 | |||
199 | $ hg tip -p |
|
201 | $ hg tip -p | |
200 | changeset: 6:7fa44105f5b3 |
|
202 | changeset: 6:7fa44105f5b3 | |
201 | tag: tip |
|
203 | tag: tip | |
202 | user: test |
|
204 | user: test | |
203 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
205 | date: Thu Jan 01 00:00:06 1970 +0000 | |
204 | summary: binary-change-rename |
|
206 | summary: binary-change-rename | |
205 |
|
207 | |||
206 | diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle |
|
208 | diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle | |
207 | Binary file tip.bundle has changed |
|
209 | Binary file tip.bundle has changed | |
208 | diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle |
|
210 | diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle | |
209 | Binary file top.bundle has changed |
|
211 | Binary file top.bundle has changed | |
210 |
|
212 | |||
211 |
|
213 | |||
212 | Add plain file |
|
214 | Add plain file | |
213 |
|
215 | |||
214 | $ for i in 1 2 3 4 5 6 7 8 9 10; do |
|
216 | $ for i in 1 2 3 4 5 6 7 8 9 10; do | |
215 | > echo $i >> plain |
|
217 | > echo $i >> plain | |
216 | > done |
|
218 | > done | |
217 |
|
219 | |||
218 | $ hg add plain |
|
220 | $ hg add plain | |
219 | $ hg record -d '7 0' -m plain plain<<EOF |
|
221 | $ hg record -d '7 0' -m plain plain<<EOF | |
220 | > y |
|
222 | > y | |
221 | > y |
|
223 | > y | |
222 | > EOF |
|
224 | > EOF | |
223 | diff --git a/plain b/plain |
|
225 | diff --git a/plain b/plain | |
224 | new file mode 100644 |
|
226 | new file mode 100644 | |
225 | examine changes to 'plain'? [Ynsfdaq?] |
|
227 | examine changes to 'plain'? [Ynsfdaq?] | |
226 |
|
228 | |||
227 | $ hg tip -p |
|
229 | $ hg tip -p | |
228 | changeset: 7:11fb457c1be4 |
|
230 | changeset: 7:11fb457c1be4 | |
229 | tag: tip |
|
231 | tag: tip | |
230 | user: test |
|
232 | user: test | |
231 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
233 | date: Thu Jan 01 00:00:07 1970 +0000 | |
232 | summary: plain |
|
234 | summary: plain | |
233 |
|
235 | |||
234 | diff -r 7fa44105f5b3 -r 11fb457c1be4 plain |
|
236 | diff -r 7fa44105f5b3 -r 11fb457c1be4 plain | |
235 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
237 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
236 | +++ b/plain Thu Jan 01 00:00:07 1970 +0000 |
|
238 | +++ b/plain Thu Jan 01 00:00:07 1970 +0000 | |
237 | @@ -0,0 +1,10 @@ |
|
239 | @@ -0,0 +1,10 @@ | |
238 | +1 |
|
240 | +1 | |
239 | +2 |
|
241 | +2 | |
240 | +3 |
|
242 | +3 | |
241 | +4 |
|
243 | +4 | |
242 | +5 |
|
244 | +5 | |
243 | +6 |
|
245 | +6 | |
244 | +7 |
|
246 | +7 | |
245 | +8 |
|
247 | +8 | |
246 | +9 |
|
248 | +9 | |
247 | +10 |
|
249 | +10 | |
248 |
|
250 | |||
249 |
|
251 | |||
250 | Modify end of plain file |
|
252 | Modify end of plain file | |
251 |
|
253 | |||
252 | $ echo 11 >> plain |
|
254 | $ echo 11 >> plain | |
253 | $ hg record -d '8 0' -m end plain <<EOF |
|
255 | $ hg record -d '8 0' -m end plain <<EOF | |
254 | > y |
|
256 | > y | |
255 | > y |
|
257 | > y | |
256 | > EOF |
|
258 | > EOF | |
257 | diff --git a/plain b/plain |
|
259 | diff --git a/plain b/plain | |
258 | 1 hunks, 1 lines changed |
|
260 | 1 hunks, 1 lines changed | |
259 | examine changes to 'plain'? [Ynsfdaq?] |
|
261 | examine changes to 'plain'? [Ynsfdaq?] | |
260 | @@ -8,3 +8,4 @@ |
|
262 | @@ -8,3 +8,4 @@ | |
261 | 8 |
|
263 | 8 | |
262 | 9 |
|
264 | 9 | |
263 | 10 |
|
265 | 10 | |
264 | +11 |
|
266 | +11 | |
265 | record this change to 'plain'? [Ynsfdaq?] |
|
267 | record this change to 'plain'? [Ynsfdaq?] | |
266 |
|
268 | |||
267 | Modify end of plain file, no EOL |
|
269 | Modify end of plain file, no EOL | |
268 |
|
270 | |||
269 | $ hg tip --template '{node}' >> plain |
|
271 | $ hg tip --template '{node}' >> plain | |
270 | $ hg record -d '9 0' -m noeol plain <<EOF |
|
272 | $ hg record -d '9 0' -m noeol plain <<EOF | |
271 | > y |
|
273 | > y | |
272 | > y |
|
274 | > y | |
273 | > EOF |
|
275 | > EOF | |
274 | diff --git a/plain b/plain |
|
276 | diff --git a/plain b/plain | |
275 | 1 hunks, 1 lines changed |
|
277 | 1 hunks, 1 lines changed | |
276 | examine changes to 'plain'? [Ynsfdaq?] |
|
278 | examine changes to 'plain'? [Ynsfdaq?] | |
277 | @@ -9,3 +9,4 @@ |
|
279 | @@ -9,3 +9,4 @@ | |
278 | 9 |
|
280 | 9 | |
279 | 10 |
|
281 | 10 | |
280 | 11 |
|
282 | 11 | |
281 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
283 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
282 | \ No newline at end of file |
|
284 | \ No newline at end of file | |
283 | record this change to 'plain'? [Ynsfdaq?] |
|
285 | record this change to 'plain'? [Ynsfdaq?] | |
284 |
|
286 | |||
285 | Modify end of plain file, add EOL |
|
287 | Modify end of plain file, add EOL | |
286 |
|
288 | |||
287 | $ echo >> plain |
|
289 | $ echo >> plain | |
288 | $ echo 1 > plain2 |
|
290 | $ echo 1 > plain2 | |
289 | $ hg add plain2 |
|
291 | $ hg add plain2 | |
290 | $ hg record -d '10 0' -m eol plain plain2 <<EOF |
|
292 | $ hg record -d '10 0' -m eol plain plain2 <<EOF | |
291 | > y |
|
293 | > y | |
292 | > y |
|
294 | > y | |
293 | > y |
|
295 | > y | |
294 | > EOF |
|
296 | > EOF | |
295 | diff --git a/plain b/plain |
|
297 | diff --git a/plain b/plain | |
296 | 1 hunks, 1 lines changed |
|
298 | 1 hunks, 1 lines changed | |
297 | examine changes to 'plain'? [Ynsfdaq?] |
|
299 | examine changes to 'plain'? [Ynsfdaq?] | |
298 | @@ -9,4 +9,4 @@ |
|
300 | @@ -9,4 +9,4 @@ | |
299 | 9 |
|
301 | 9 | |
300 | 10 |
|
302 | 10 | |
301 | 11 |
|
303 | 11 | |
302 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
304 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
303 | \ No newline at end of file |
|
305 | \ No newline at end of file | |
304 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
306 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
305 | record change 1/2 to 'plain'? [Ynsfdaq?] |
|
307 | record change 1/2 to 'plain'? [Ynsfdaq?] | |
306 | diff --git a/plain2 b/plain2 |
|
308 | diff --git a/plain2 b/plain2 | |
307 | new file mode 100644 |
|
309 | new file mode 100644 | |
308 | examine changes to 'plain2'? [Ynsfdaq?] |
|
310 | examine changes to 'plain2'? [Ynsfdaq?] | |
309 |
|
311 | |||
310 | Modify beginning, trim end, record both, add another file to test |
|
312 | Modify beginning, trim end, record both, add another file to test | |
311 | changes numbering |
|
313 | changes numbering | |
312 |
|
314 | |||
313 | $ rm plain |
|
315 | $ rm plain | |
314 | $ for i in 2 2 3 4 5 6 7 8 9 10; do |
|
316 | $ for i in 2 2 3 4 5 6 7 8 9 10; do | |
315 | > echo $i >> plain |
|
317 | > echo $i >> plain | |
316 | > done |
|
318 | > done | |
317 | $ echo 2 >> plain2 |
|
319 | $ echo 2 >> plain2 | |
318 |
|
320 | |||
319 | $ hg record -d '10 0' -m begin-and-end plain plain2 <<EOF |
|
321 | $ hg record -d '10 0' -m begin-and-end plain plain2 <<EOF | |
320 | > y |
|
322 | > y | |
321 | > y |
|
323 | > y | |
322 | > y |
|
324 | > y | |
323 | > y |
|
325 | > y | |
324 | > y |
|
326 | > y | |
325 | > EOF |
|
327 | > EOF | |
326 | diff --git a/plain b/plain |
|
328 | diff --git a/plain b/plain | |
327 | 2 hunks, 3 lines changed |
|
329 | 2 hunks, 3 lines changed | |
328 | examine changes to 'plain'? [Ynsfdaq?] |
|
330 | examine changes to 'plain'? [Ynsfdaq?] | |
329 | @@ -1,4 +1,4 @@ |
|
331 | @@ -1,4 +1,4 @@ | |
330 | -1 |
|
332 | -1 | |
331 | +2 |
|
333 | +2 | |
332 | 2 |
|
334 | 2 | |
333 | 3 |
|
335 | 3 | |
334 | 4 |
|
336 | 4 | |
335 | record change 1/3 to 'plain'? [Ynsfdaq?] |
|
337 | record change 1/3 to 'plain'? [Ynsfdaq?] | |
336 | @@ -8,5 +8,3 @@ |
|
338 | @@ -8,5 +8,3 @@ | |
337 | 8 |
|
339 | 8 | |
338 | 9 |
|
340 | 9 | |
339 | 10 |
|
341 | 10 | |
340 | -11 |
|
342 | -11 | |
341 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
343 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
342 | record change 2/3 to 'plain'? [Ynsfdaq?] |
|
344 | record change 2/3 to 'plain'? [Ynsfdaq?] | |
343 | diff --git a/plain2 b/plain2 |
|
345 | diff --git a/plain2 b/plain2 | |
344 | 1 hunks, 1 lines changed |
|
346 | 1 hunks, 1 lines changed | |
345 | examine changes to 'plain2'? [Ynsfdaq?] |
|
347 | examine changes to 'plain2'? [Ynsfdaq?] | |
346 | @@ -1,1 +1,2 @@ |
|
348 | @@ -1,1 +1,2 @@ | |
347 | 1 |
|
349 | 1 | |
348 | +2 |
|
350 | +2 | |
349 | record change 3/3 to 'plain2'? [Ynsfdaq?] |
|
351 | record change 3/3 to 'plain2'? [Ynsfdaq?] | |
350 |
|
352 | |||
351 | $ hg tip -p |
|
353 | $ hg tip -p | |
352 | changeset: 11:21df83db12b8 |
|
354 | changeset: 11:21df83db12b8 | |
353 | tag: tip |
|
355 | tag: tip | |
354 | user: test |
|
356 | user: test | |
355 | date: Thu Jan 01 00:00:10 1970 +0000 |
|
357 | date: Thu Jan 01 00:00:10 1970 +0000 | |
356 | summary: begin-and-end |
|
358 | summary: begin-and-end | |
357 |
|
359 | |||
358 | diff -r ddb8b281c3ff -r 21df83db12b8 plain |
|
360 | diff -r ddb8b281c3ff -r 21df83db12b8 plain | |
359 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 |
|
361 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 | |
360 | +++ b/plain Thu Jan 01 00:00:10 1970 +0000 |
|
362 | +++ b/plain Thu Jan 01 00:00:10 1970 +0000 | |
361 | @@ -1,4 +1,4 @@ |
|
363 | @@ -1,4 +1,4 @@ | |
362 | -1 |
|
364 | -1 | |
363 | +2 |
|
365 | +2 | |
364 | 2 |
|
366 | 2 | |
365 | 3 |
|
367 | 3 | |
366 | 4 |
|
368 | 4 | |
367 | @@ -8,5 +8,3 @@ |
|
369 | @@ -8,5 +8,3 @@ | |
368 | 8 |
|
370 | 8 | |
369 | 9 |
|
371 | 9 | |
370 | 10 |
|
372 | 10 | |
371 | -11 |
|
373 | -11 | |
372 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
374 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
373 | diff -r ddb8b281c3ff -r 21df83db12b8 plain2 |
|
375 | diff -r ddb8b281c3ff -r 21df83db12b8 plain2 | |
374 | --- a/plain2 Thu Jan 01 00:00:10 1970 +0000 |
|
376 | --- a/plain2 Thu Jan 01 00:00:10 1970 +0000 | |
375 | +++ b/plain2 Thu Jan 01 00:00:10 1970 +0000 |
|
377 | +++ b/plain2 Thu Jan 01 00:00:10 1970 +0000 | |
376 | @@ -1,1 +1,2 @@ |
|
378 | @@ -1,1 +1,2 @@ | |
377 | 1 |
|
379 | 1 | |
378 | +2 |
|
380 | +2 | |
379 |
|
381 | |||
380 |
|
382 | |||
381 | Trim beginning, modify end |
|
383 | Trim beginning, modify end | |
382 |
|
384 | |||
383 | $ rm plain |
|
385 | $ rm plain | |
384 | > for i in 4 5 6 7 8 9 10.new; do |
|
386 | > for i in 4 5 6 7 8 9 10.new; do | |
385 | > echo $i >> plain |
|
387 | > echo $i >> plain | |
386 | > done |
|
388 | > done | |
387 |
|
389 | |||
388 | Record end |
|
390 | Record end | |
389 |
|
391 | |||
390 | $ hg record -d '11 0' -m end-only plain <<EOF |
|
392 | $ hg record -d '11 0' -m end-only plain <<EOF | |
391 | > y |
|
393 | > y | |
392 | > n |
|
394 | > n | |
393 | > y |
|
395 | > y | |
394 | > EOF |
|
396 | > EOF | |
395 | diff --git a/plain b/plain |
|
397 | diff --git a/plain b/plain | |
396 | 2 hunks, 4 lines changed |
|
398 | 2 hunks, 4 lines changed | |
397 | examine changes to 'plain'? [Ynsfdaq?] |
|
399 | examine changes to 'plain'? [Ynsfdaq?] | |
398 | @@ -1,9 +1,6 @@ |
|
400 | @@ -1,9 +1,6 @@ | |
399 | -2 |
|
401 | -2 | |
400 | -2 |
|
402 | -2 | |
401 | -3 |
|
403 | -3 | |
402 | 4 |
|
404 | 4 | |
403 | 5 |
|
405 | 5 | |
404 | 6 |
|
406 | 6 | |
405 | 7 |
|
407 | 7 | |
406 | 8 |
|
408 | 8 | |
407 | 9 |
|
409 | 9 | |
408 | record change 1/2 to 'plain'? [Ynsfdaq?] |
|
410 | record change 1/2 to 'plain'? [Ynsfdaq?] | |
409 | @@ -4,7 +1,7 @@ |
|
411 | @@ -4,7 +1,7 @@ | |
410 | 4 |
|
412 | 4 | |
411 | 5 |
|
413 | 5 | |
412 | 6 |
|
414 | 6 | |
413 | 7 |
|
415 | 7 | |
414 | 8 |
|
416 | 8 | |
415 | 9 |
|
417 | 9 | |
416 | -10 |
|
418 | -10 | |
417 | +10.new |
|
419 | +10.new | |
418 | record change 2/2 to 'plain'? [Ynsfdaq?] |
|
420 | record change 2/2 to 'plain'? [Ynsfdaq?] | |
419 |
|
421 | |||
420 | $ hg tip -p |
|
422 | $ hg tip -p | |
421 | changeset: 12:99337501826f |
|
423 | changeset: 12:99337501826f | |
422 | tag: tip |
|
424 | tag: tip | |
423 | user: test |
|
425 | user: test | |
424 | date: Thu Jan 01 00:00:11 1970 +0000 |
|
426 | date: Thu Jan 01 00:00:11 1970 +0000 | |
425 | summary: end-only |
|
427 | summary: end-only | |
426 |
|
428 | |||
427 | diff -r 21df83db12b8 -r 99337501826f plain |
|
429 | diff -r 21df83db12b8 -r 99337501826f plain | |
428 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 |
|
430 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 | |
429 | +++ b/plain Thu Jan 01 00:00:11 1970 +0000 |
|
431 | +++ b/plain Thu Jan 01 00:00:11 1970 +0000 | |
430 | @@ -7,4 +7,4 @@ |
|
432 | @@ -7,4 +7,4 @@ | |
431 | 7 |
|
433 | 7 | |
432 | 8 |
|
434 | 8 | |
433 | 9 |
|
435 | 9 | |
434 | -10 |
|
436 | -10 | |
435 | +10.new |
|
437 | +10.new | |
436 |
|
438 | |||
437 |
|
439 | |||
438 | Record beginning |
|
440 | Record beginning | |
439 |
|
441 | |||
440 | $ hg record -d '12 0' -m begin-only plain <<EOF |
|
442 | $ hg record -d '12 0' -m begin-only plain <<EOF | |
441 | > y |
|
443 | > y | |
442 | > y |
|
444 | > y | |
443 | > EOF |
|
445 | > EOF | |
444 | diff --git a/plain b/plain |
|
446 | diff --git a/plain b/plain | |
445 | 1 hunks, 3 lines changed |
|
447 | 1 hunks, 3 lines changed | |
446 | examine changes to 'plain'? [Ynsfdaq?] |
|
448 | examine changes to 'plain'? [Ynsfdaq?] | |
447 | @@ -1,6 +1,3 @@ |
|
449 | @@ -1,6 +1,3 @@ | |
448 | -2 |
|
450 | -2 | |
449 | -2 |
|
451 | -2 | |
450 | -3 |
|
452 | -3 | |
451 | 4 |
|
453 | 4 | |
452 | 5 |
|
454 | 5 | |
453 | 6 |
|
455 | 6 | |
454 | record this change to 'plain'? [Ynsfdaq?] |
|
456 | record this change to 'plain'? [Ynsfdaq?] | |
455 |
|
457 | |||
456 | $ hg tip -p |
|
458 | $ hg tip -p | |
457 | changeset: 13:bbd45465d540 |
|
459 | changeset: 13:bbd45465d540 | |
458 | tag: tip |
|
460 | tag: tip | |
459 | user: test |
|
461 | user: test | |
460 | date: Thu Jan 01 00:00:12 1970 +0000 |
|
462 | date: Thu Jan 01 00:00:12 1970 +0000 | |
461 | summary: begin-only |
|
463 | summary: begin-only | |
462 |
|
464 | |||
463 | diff -r 99337501826f -r bbd45465d540 plain |
|
465 | diff -r 99337501826f -r bbd45465d540 plain | |
464 | --- a/plain Thu Jan 01 00:00:11 1970 +0000 |
|
466 | --- a/plain Thu Jan 01 00:00:11 1970 +0000 | |
465 | +++ b/plain Thu Jan 01 00:00:12 1970 +0000 |
|
467 | +++ b/plain Thu Jan 01 00:00:12 1970 +0000 | |
466 | @@ -1,6 +1,3 @@ |
|
468 | @@ -1,6 +1,3 @@ | |
467 | -2 |
|
469 | -2 | |
468 | -2 |
|
470 | -2 | |
469 | -3 |
|
471 | -3 | |
470 | 4 |
|
472 | 4 | |
471 | 5 |
|
473 | 5 | |
472 | 6 |
|
474 | 6 | |
473 |
|
475 | |||
474 |
|
476 | |||
475 | Add to beginning, trim from end |
|
477 | Add to beginning, trim from end | |
476 |
|
478 | |||
477 | $ rm plain |
|
479 | $ rm plain | |
478 | $ for i in 1 2 3 4 5 6 7 8 9; do |
|
480 | $ for i in 1 2 3 4 5 6 7 8 9; do | |
479 | > echo $i >> plain |
|
481 | > echo $i >> plain | |
480 | > done |
|
482 | > done | |
481 |
|
483 | |||
482 | Record end |
|
484 | Record end | |
483 |
|
485 | |||
484 | $ hg record --traceback -d '13 0' -m end-again plain<<EOF |
|
486 | $ hg record --traceback -d '13 0' -m end-again plain<<EOF | |
485 | > y |
|
487 | > y | |
486 | > n |
|
488 | > n | |
487 | > y |
|
489 | > y | |
488 | > EOF |
|
490 | > EOF | |
489 | diff --git a/plain b/plain |
|
491 | diff --git a/plain b/plain | |
490 | 2 hunks, 4 lines changed |
|
492 | 2 hunks, 4 lines changed | |
491 | examine changes to 'plain'? [Ynsfdaq?] |
|
493 | examine changes to 'plain'? [Ynsfdaq?] | |
492 | @@ -1,6 +1,9 @@ |
|
494 | @@ -1,6 +1,9 @@ | |
493 | +1 |
|
495 | +1 | |
494 | +2 |
|
496 | +2 | |
495 | +3 |
|
497 | +3 | |
496 | 4 |
|
498 | 4 | |
497 | 5 |
|
499 | 5 | |
498 | 6 |
|
500 | 6 | |
499 | 7 |
|
501 | 7 | |
500 | 8 |
|
502 | 8 | |
501 | 9 |
|
503 | 9 | |
502 | record change 1/2 to 'plain'? [Ynsfdaq?] |
|
504 | record change 1/2 to 'plain'? [Ynsfdaq?] | |
503 | @@ -1,7 +4,6 @@ |
|
505 | @@ -1,7 +4,6 @@ | |
504 | 4 |
|
506 | 4 | |
505 | 5 |
|
507 | 5 | |
506 | 6 |
|
508 | 6 | |
507 | 7 |
|
509 | 7 | |
508 | 8 |
|
510 | 8 | |
509 | 9 |
|
511 | 9 | |
510 | -10.new |
|
512 | -10.new | |
511 | record change 2/2 to 'plain'? [Ynsfdaq?] |
|
513 | record change 2/2 to 'plain'? [Ynsfdaq?] | |
512 |
|
514 | |||
513 | Add to beginning, middle, end |
|
515 | Add to beginning, middle, end | |
514 |
|
516 | |||
515 | $ rm plain |
|
517 | $ rm plain | |
516 | $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do |
|
518 | $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do | |
517 | > echo $i >> plain |
|
519 | > echo $i >> plain | |
518 | > done |
|
520 | > done | |
519 |
|
521 | |||
520 | Record beginning, middle |
|
522 | Record beginning, middle | |
521 |
|
523 | |||
522 | $ hg record -d '14 0' -m middle-only plain <<EOF |
|
524 | $ hg record -d '14 0' -m middle-only plain <<EOF | |
523 | > y |
|
525 | > y | |
524 | > y |
|
526 | > y | |
525 | > y |
|
527 | > y | |
526 | > n |
|
528 | > n | |
527 | > EOF |
|
529 | > EOF | |
528 | diff --git a/plain b/plain |
|
530 | diff --git a/plain b/plain | |
529 | 3 hunks, 7 lines changed |
|
531 | 3 hunks, 7 lines changed | |
530 | examine changes to 'plain'? [Ynsfdaq?] |
|
532 | examine changes to 'plain'? [Ynsfdaq?] | |
531 | @@ -1,2 +1,5 @@ |
|
533 | @@ -1,2 +1,5 @@ | |
532 | +1 |
|
534 | +1 | |
533 | +2 |
|
535 | +2 | |
534 | +3 |
|
536 | +3 | |
535 | 4 |
|
537 | 4 | |
536 | 5 |
|
538 | 5 | |
537 | record change 1/3 to 'plain'? [Ynsfdaq?] |
|
539 | record change 1/3 to 'plain'? [Ynsfdaq?] | |
538 | @@ -1,6 +4,8 @@ |
|
540 | @@ -1,6 +4,8 @@ | |
539 | 4 |
|
541 | 4 | |
540 | 5 |
|
542 | 5 | |
541 | +5.new |
|
543 | +5.new | |
542 | +5.reallynew |
|
544 | +5.reallynew | |
543 | 6 |
|
545 | 6 | |
544 | 7 |
|
546 | 7 | |
545 | 8 |
|
547 | 8 | |
546 | 9 |
|
548 | 9 | |
547 | record change 2/3 to 'plain'? [Ynsfdaq?] |
|
549 | record change 2/3 to 'plain'? [Ynsfdaq?] | |
548 | @@ -3,4 +8,6 @@ |
|
550 | @@ -3,4 +8,6 @@ | |
549 | 6 |
|
551 | 6 | |
550 | 7 |
|
552 | 7 | |
551 | 8 |
|
553 | 8 | |
552 | 9 |
|
554 | 9 | |
553 | +10 |
|
555 | +10 | |
554 | +11 |
|
556 | +11 | |
555 | record change 3/3 to 'plain'? [Ynsfdaq?] |
|
557 | record change 3/3 to 'plain'? [Ynsfdaq?] | |
556 |
|
558 | |||
557 | $ hg tip -p |
|
559 | $ hg tip -p | |
558 | changeset: 15:f34a7937ec33 |
|
560 | changeset: 15:f34a7937ec33 | |
559 | tag: tip |
|
561 | tag: tip | |
560 | user: test |
|
562 | user: test | |
561 | date: Thu Jan 01 00:00:14 1970 +0000 |
|
563 | date: Thu Jan 01 00:00:14 1970 +0000 | |
562 | summary: middle-only |
|
564 | summary: middle-only | |
563 |
|
565 | |||
564 | diff -r 82c065d0b850 -r f34a7937ec33 plain |
|
566 | diff -r 82c065d0b850 -r f34a7937ec33 plain | |
565 | --- a/plain Thu Jan 01 00:00:13 1970 +0000 |
|
567 | --- a/plain Thu Jan 01 00:00:13 1970 +0000 | |
566 | +++ b/plain Thu Jan 01 00:00:14 1970 +0000 |
|
568 | +++ b/plain Thu Jan 01 00:00:14 1970 +0000 | |
567 | @@ -1,5 +1,10 @@ |
|
569 | @@ -1,5 +1,10 @@ | |
568 | +1 |
|
570 | +1 | |
569 | +2 |
|
571 | +2 | |
570 | +3 |
|
572 | +3 | |
571 | 4 |
|
573 | 4 | |
572 | 5 |
|
574 | 5 | |
573 | +5.new |
|
575 | +5.new | |
574 | +5.reallynew |
|
576 | +5.reallynew | |
575 | 6 |
|
577 | 6 | |
576 | 7 |
|
578 | 7 | |
577 | 8 |
|
579 | 8 | |
578 |
|
580 | |||
579 |
|
581 | |||
580 | Record end |
|
582 | Record end | |
581 |
|
583 | |||
582 | $ hg record -d '15 0' -m end-only plain <<EOF |
|
584 | $ hg record -d '15 0' -m end-only plain <<EOF | |
583 | > y |
|
585 | > y | |
584 | > y |
|
586 | > y | |
585 | > EOF |
|
587 | > EOF | |
586 | diff --git a/plain b/plain |
|
588 | diff --git a/plain b/plain | |
587 | 1 hunks, 2 lines changed |
|
589 | 1 hunks, 2 lines changed | |
588 | examine changes to 'plain'? [Ynsfdaq?] |
|
590 | examine changes to 'plain'? [Ynsfdaq?] | |
589 | @@ -9,3 +9,5 @@ |
|
591 | @@ -9,3 +9,5 @@ | |
590 | 7 |
|
592 | 7 | |
591 | 8 |
|
593 | 8 | |
592 | 9 |
|
594 | 9 | |
593 | +10 |
|
595 | +10 | |
594 | +11 |
|
596 | +11 | |
595 | record this change to 'plain'? [Ynsfdaq?] |
|
597 | record this change to 'plain'? [Ynsfdaq?] | |
596 |
|
598 | |||
597 | $ hg tip -p |
|
599 | $ hg tip -p | |
598 | changeset: 16:f9900b71a04c |
|
600 | changeset: 16:f9900b71a04c | |
599 | tag: tip |
|
601 | tag: tip | |
600 | user: test |
|
602 | user: test | |
601 | date: Thu Jan 01 00:00:15 1970 +0000 |
|
603 | date: Thu Jan 01 00:00:15 1970 +0000 | |
602 | summary: end-only |
|
604 | summary: end-only | |
603 |
|
605 | |||
604 | diff -r f34a7937ec33 -r f9900b71a04c plain |
|
606 | diff -r f34a7937ec33 -r f9900b71a04c plain | |
605 | --- a/plain Thu Jan 01 00:00:14 1970 +0000 |
|
607 | --- a/plain Thu Jan 01 00:00:14 1970 +0000 | |
606 | +++ b/plain Thu Jan 01 00:00:15 1970 +0000 |
|
608 | +++ b/plain Thu Jan 01 00:00:15 1970 +0000 | |
607 | @@ -9,3 +9,5 @@ |
|
609 | @@ -9,3 +9,5 @@ | |
608 | 7 |
|
610 | 7 | |
609 | 8 |
|
611 | 8 | |
610 | 9 |
|
612 | 9 | |
611 | +10 |
|
613 | +10 | |
612 | +11 |
|
614 | +11 | |
613 |
|
615 | |||
614 |
|
616 | |||
615 | $ mkdir subdir |
|
617 | $ mkdir subdir | |
616 | $ cd subdir |
|
618 | $ cd subdir | |
617 | $ echo a > a |
|
619 | $ echo a > a | |
618 | $ hg ci -d '16 0' -Amsubdir |
|
620 | $ hg ci -d '16 0' -Amsubdir | |
619 | adding subdir/a |
|
621 | adding subdir/a | |
620 |
|
622 | |||
621 | $ echo a >> a |
|
623 | $ echo a >> a | |
622 | $ hg record -d '16 0' -m subdir-change a <<EOF |
|
624 | $ hg record -d '16 0' -m subdir-change a <<EOF | |
623 | > y |
|
625 | > y | |
624 | > y |
|
626 | > y | |
625 | > EOF |
|
627 | > EOF | |
626 | diff --git a/subdir/a b/subdir/a |
|
628 | diff --git a/subdir/a b/subdir/a | |
627 | 1 hunks, 1 lines changed |
|
629 | 1 hunks, 1 lines changed | |
628 | examine changes to 'subdir/a'? [Ynsfdaq?] |
|
630 | examine changes to 'subdir/a'? [Ynsfdaq?] | |
629 | @@ -1,1 +1,2 @@ |
|
631 | @@ -1,1 +1,2 @@ | |
630 | a |
|
632 | a | |
631 | +a |
|
633 | +a | |
632 | record this change to 'subdir/a'? [Ynsfdaq?] |
|
634 | record this change to 'subdir/a'? [Ynsfdaq?] | |
633 |
|
635 | |||
634 | $ hg tip -p |
|
636 | $ hg tip -p | |
635 | changeset: 18:61be427a9deb |
|
637 | changeset: 18:61be427a9deb | |
636 | tag: tip |
|
638 | tag: tip | |
637 | user: test |
|
639 | user: test | |
638 | date: Thu Jan 01 00:00:16 1970 +0000 |
|
640 | date: Thu Jan 01 00:00:16 1970 +0000 | |
639 | summary: subdir-change |
|
641 | summary: subdir-change | |
640 |
|
642 | |||
641 | diff -r a7ffae4d61cb -r 61be427a9deb subdir/a |
|
643 | diff -r a7ffae4d61cb -r 61be427a9deb subdir/a | |
642 | --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000 |
|
644 | --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000 | |
643 | +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000 |
|
645 | +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000 | |
644 | @@ -1,1 +1,2 @@ |
|
646 | @@ -1,1 +1,2 @@ | |
645 | a |
|
647 | a | |
646 | +a |
|
648 | +a | |
647 |
|
649 | |||
648 |
|
650 | |||
649 | $ echo a > f1 |
|
651 | $ echo a > f1 | |
650 | $ echo b > f2 |
|
652 | $ echo b > f2 | |
651 | $ hg add f1 f2 |
|
653 | $ hg add f1 f2 | |
652 |
|
654 | |||
653 | $ hg ci -mz -d '17 0' |
|
655 | $ hg ci -mz -d '17 0' | |
654 |
|
656 | |||
655 | $ echo a >> f1 |
|
657 | $ echo a >> f1 | |
656 | $ echo b >> f2 |
|
658 | $ echo b >> f2 | |
657 |
|
659 | |||
658 | Help, quit |
|
660 | Help, quit | |
659 |
|
661 | |||
660 | $ hg record <<EOF |
|
662 | $ hg record <<EOF | |
661 | > ? |
|
663 | > ? | |
662 | > q |
|
664 | > q | |
663 | > EOF |
|
665 | > EOF | |
664 | diff --git a/subdir/f1 b/subdir/f1 |
|
666 | diff --git a/subdir/f1 b/subdir/f1 | |
665 | 1 hunks, 1 lines changed |
|
667 | 1 hunks, 1 lines changed | |
666 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
668 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
667 | y - record this change |
|
669 | y - record this change | |
668 | n - skip this change |
|
670 | n - skip this change | |
669 | s - skip remaining changes to this file |
|
671 | s - skip remaining changes to this file | |
670 | f - record remaining changes to this file |
|
672 | f - record remaining changes to this file | |
671 | d - done, skip remaining changes and files |
|
673 | d - done, skip remaining changes and files | |
672 | a - record all changes to all remaining files |
|
674 | a - record all changes to all remaining files | |
673 | q - quit, recording no changes |
|
675 | q - quit, recording no changes | |
674 | ? - display help |
|
676 | ? - display help | |
675 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
677 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
676 | abort: user quit |
|
678 | abort: user quit | |
677 | [255] |
|
679 | [255] | |
678 |
|
680 | |||
679 | Skip |
|
681 | Skip | |
680 |
|
682 | |||
681 | $ hg record <<EOF |
|
683 | $ hg record <<EOF | |
682 | > s |
|
684 | > s | |
683 | > EOF |
|
685 | > EOF | |
684 | diff --git a/subdir/f1 b/subdir/f1 |
|
686 | diff --git a/subdir/f1 b/subdir/f1 | |
685 | 1 hunks, 1 lines changed |
|
687 | 1 hunks, 1 lines changed | |
686 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
688 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
687 | diff --git a/subdir/f2 b/subdir/f2 |
|
689 | diff --git a/subdir/f2 b/subdir/f2 | |
688 | 1 hunks, 1 lines changed |
|
690 | 1 hunks, 1 lines changed | |
689 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected |
|
691 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected | |
690 | [255] |
|
692 | [255] | |
691 |
|
693 | |||
692 | No |
|
694 | No | |
693 |
|
695 | |||
694 | $ hg record <<EOF |
|
696 | $ hg record <<EOF | |
695 | > n |
|
697 | > n | |
696 | > EOF |
|
698 | > EOF | |
697 | diff --git a/subdir/f1 b/subdir/f1 |
|
699 | diff --git a/subdir/f1 b/subdir/f1 | |
698 | 1 hunks, 1 lines changed |
|
700 | 1 hunks, 1 lines changed | |
699 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
701 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
700 | diff --git a/subdir/f2 b/subdir/f2 |
|
702 | diff --git a/subdir/f2 b/subdir/f2 | |
701 | 1 hunks, 1 lines changed |
|
703 | 1 hunks, 1 lines changed | |
702 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected |
|
704 | examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected | |
703 | [255] |
|
705 | [255] | |
704 |
|
706 | |||
705 | f, quit |
|
707 | f, quit | |
706 |
|
708 | |||
707 | $ hg record <<EOF |
|
709 | $ hg record <<EOF | |
708 | > f |
|
710 | > f | |
709 | > q |
|
711 | > q | |
710 | > EOF |
|
712 | > EOF | |
711 | diff --git a/subdir/f1 b/subdir/f1 |
|
713 | diff --git a/subdir/f1 b/subdir/f1 | |
712 | 1 hunks, 1 lines changed |
|
714 | 1 hunks, 1 lines changed | |
713 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
715 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
714 | diff --git a/subdir/f2 b/subdir/f2 |
|
716 | diff --git a/subdir/f2 b/subdir/f2 | |
715 | 1 hunks, 1 lines changed |
|
717 | 1 hunks, 1 lines changed | |
716 | examine changes to 'subdir/f2'? [Ynsfdaq?] |
|
718 | examine changes to 'subdir/f2'? [Ynsfdaq?] | |
717 | abort: user quit |
|
719 | abort: user quit | |
718 | [255] |
|
720 | [255] | |
719 |
|
721 | |||
720 | s, all |
|
722 | s, all | |
721 |
|
723 | |||
722 | $ hg record -d '18 0' -mx <<EOF |
|
724 | $ hg record -d '18 0' -mx <<EOF | |
723 | > s |
|
725 | > s | |
724 | > a |
|
726 | > a | |
725 | > EOF |
|
727 | > EOF | |
726 | diff --git a/subdir/f1 b/subdir/f1 |
|
728 | diff --git a/subdir/f1 b/subdir/f1 | |
727 | 1 hunks, 1 lines changed |
|
729 | 1 hunks, 1 lines changed | |
728 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
730 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
729 | diff --git a/subdir/f2 b/subdir/f2 |
|
731 | diff --git a/subdir/f2 b/subdir/f2 | |
730 | 1 hunks, 1 lines changed |
|
732 | 1 hunks, 1 lines changed | |
731 | examine changes to 'subdir/f2'? [Ynsfdaq?] |
|
733 | examine changes to 'subdir/f2'? [Ynsfdaq?] | |
732 |
|
734 | |||
733 | $ hg tip -p |
|
735 | $ hg tip -p | |
734 | changeset: 20:b3df3dda369a |
|
736 | changeset: 20:b3df3dda369a | |
735 | tag: tip |
|
737 | tag: tip | |
736 | user: test |
|
738 | user: test | |
737 | date: Thu Jan 01 00:00:18 1970 +0000 |
|
739 | date: Thu Jan 01 00:00:18 1970 +0000 | |
738 | summary: x |
|
740 | summary: x | |
739 |
|
741 | |||
740 | diff -r 6e02d6c9906d -r b3df3dda369a subdir/f2 |
|
742 | diff -r 6e02d6c9906d -r b3df3dda369a subdir/f2 | |
741 | --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000 |
|
743 | --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000 | |
742 | +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000 |
|
744 | +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000 | |
743 | @@ -1,1 +1,2 @@ |
|
745 | @@ -1,1 +1,2 @@ | |
744 | b |
|
746 | b | |
745 | +b |
|
747 | +b | |
746 |
|
748 | |||
747 |
|
749 | |||
748 | f |
|
750 | f | |
749 |
|
751 | |||
750 | $ hg record -d '19 0' -my <<EOF |
|
752 | $ hg record -d '19 0' -my <<EOF | |
751 | > f |
|
753 | > f | |
752 | > EOF |
|
754 | > EOF | |
753 | diff --git a/subdir/f1 b/subdir/f1 |
|
755 | diff --git a/subdir/f1 b/subdir/f1 | |
754 | 1 hunks, 1 lines changed |
|
756 | 1 hunks, 1 lines changed | |
755 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
757 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
756 |
|
758 | |||
757 | $ hg tip -p |
|
759 | $ hg tip -p | |
758 | changeset: 21:38ec577f126b |
|
760 | changeset: 21:38ec577f126b | |
759 | tag: tip |
|
761 | tag: tip | |
760 | user: test |
|
762 | user: test | |
761 | date: Thu Jan 01 00:00:19 1970 +0000 |
|
763 | date: Thu Jan 01 00:00:19 1970 +0000 | |
762 | summary: y |
|
764 | summary: y | |
763 |
|
765 | |||
764 | diff -r b3df3dda369a -r 38ec577f126b subdir/f1 |
|
766 | diff -r b3df3dda369a -r 38ec577f126b subdir/f1 | |
765 | --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000 |
|
767 | --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000 | |
766 | +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000 |
|
768 | +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000 | |
767 | @@ -1,1 +1,2 @@ |
|
769 | @@ -1,1 +1,2 @@ | |
768 | a |
|
770 | a | |
769 | +a |
|
771 | +a | |
770 |
|
772 | |||
771 |
|
773 | |||
772 | Preserve chmod +x |
|
774 | Preserve chmod +x | |
773 |
|
775 | |||
774 | $ chmod +x f1 |
|
776 | $ chmod +x f1 | |
775 | $ echo a >> f1 |
|
777 | $ echo a >> f1 | |
776 | $ hg record -d '20 0' -mz <<EOF |
|
778 | $ hg record -d '20 0' -mz <<EOF | |
777 | > y |
|
779 | > y | |
778 | > y |
|
780 | > y | |
779 | > y |
|
781 | > y | |
780 | > EOF |
|
782 | > EOF | |
781 | diff --git a/subdir/f1 b/subdir/f1 |
|
783 | diff --git a/subdir/f1 b/subdir/f1 | |
782 | old mode 100644 |
|
784 | old mode 100644 | |
783 | new mode 100755 |
|
785 | new mode 100755 | |
784 | 1 hunks, 1 lines changed |
|
786 | 1 hunks, 1 lines changed | |
785 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
787 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
786 | @@ -1,2 +1,3 @@ |
|
788 | @@ -1,2 +1,3 @@ | |
787 | a |
|
789 | a | |
788 | a |
|
790 | a | |
789 | +a |
|
791 | +a | |
790 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
792 | record this change to 'subdir/f1'? [Ynsfdaq?] | |
791 |
|
793 | |||
792 | $ hg tip --config diff.git=True -p |
|
794 | $ hg tip --config diff.git=True -p | |
793 | changeset: 22:3261adceb075 |
|
795 | changeset: 22:3261adceb075 | |
794 | tag: tip |
|
796 | tag: tip | |
795 | user: test |
|
797 | user: test | |
796 | date: Thu Jan 01 00:00:20 1970 +0000 |
|
798 | date: Thu Jan 01 00:00:20 1970 +0000 | |
797 | summary: z |
|
799 | summary: z | |
798 |
|
800 | |||
799 | diff --git a/subdir/f1 b/subdir/f1 |
|
801 | diff --git a/subdir/f1 b/subdir/f1 | |
800 | old mode 100644 |
|
802 | old mode 100644 | |
801 | new mode 100755 |
|
803 | new mode 100755 | |
802 | --- a/subdir/f1 |
|
804 | --- a/subdir/f1 | |
803 | +++ b/subdir/f1 |
|
805 | +++ b/subdir/f1 | |
804 | @@ -1,2 +1,3 @@ |
|
806 | @@ -1,2 +1,3 @@ | |
805 | a |
|
807 | a | |
806 | a |
|
808 | a | |
807 | +a |
|
809 | +a | |
808 |
|
810 | |||
809 |
|
811 | |||
810 | Preserve execute permission on original |
|
812 | Preserve execute permission on original | |
811 |
|
813 | |||
812 | $ echo b >> f1 |
|
814 | $ echo b >> f1 | |
813 | $ hg record -d '21 0' -maa <<EOF |
|
815 | $ hg record -d '21 0' -maa <<EOF | |
814 | > y |
|
816 | > y | |
815 | > y |
|
817 | > y | |
816 | > y |
|
818 | > y | |
817 | > EOF |
|
819 | > EOF | |
818 | diff --git a/subdir/f1 b/subdir/f1 |
|
820 | diff --git a/subdir/f1 b/subdir/f1 | |
819 | 1 hunks, 1 lines changed |
|
821 | 1 hunks, 1 lines changed | |
820 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
822 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
821 | @@ -1,3 +1,4 @@ |
|
823 | @@ -1,3 +1,4 @@ | |
822 | a |
|
824 | a | |
823 | a |
|
825 | a | |
824 | a |
|
826 | a | |
825 | +b |
|
827 | +b | |
826 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
828 | record this change to 'subdir/f1'? [Ynsfdaq?] | |
827 |
|
829 | |||
828 | $ hg tip --config diff.git=True -p |
|
830 | $ hg tip --config diff.git=True -p | |
829 | changeset: 23:b429867550db |
|
831 | changeset: 23:b429867550db | |
830 | tag: tip |
|
832 | tag: tip | |
831 | user: test |
|
833 | user: test | |
832 | date: Thu Jan 01 00:00:21 1970 +0000 |
|
834 | date: Thu Jan 01 00:00:21 1970 +0000 | |
833 | summary: aa |
|
835 | summary: aa | |
834 |
|
836 | |||
835 | diff --git a/subdir/f1 b/subdir/f1 |
|
837 | diff --git a/subdir/f1 b/subdir/f1 | |
836 | --- a/subdir/f1 |
|
838 | --- a/subdir/f1 | |
837 | +++ b/subdir/f1 |
|
839 | +++ b/subdir/f1 | |
838 | @@ -1,3 +1,4 @@ |
|
840 | @@ -1,3 +1,4 @@ | |
839 | a |
|
841 | a | |
840 | a |
|
842 | a | |
841 | a |
|
843 | a | |
842 | +b |
|
844 | +b | |
843 |
|
845 | |||
844 |
|
846 | |||
845 | Preserve chmod -x |
|
847 | Preserve chmod -x | |
846 |
|
848 | |||
847 | $ chmod -x f1 |
|
849 | $ chmod -x f1 | |
848 | $ echo c >> f1 |
|
850 | $ echo c >> f1 | |
849 | $ hg record -d '22 0' -mab <<EOF |
|
851 | $ hg record -d '22 0' -mab <<EOF | |
850 | > y |
|
852 | > y | |
851 | > y |
|
853 | > y | |
852 | > y |
|
854 | > y | |
853 | > EOF |
|
855 | > EOF | |
854 | diff --git a/subdir/f1 b/subdir/f1 |
|
856 | diff --git a/subdir/f1 b/subdir/f1 | |
855 | old mode 100755 |
|
857 | old mode 100755 | |
856 | new mode 100644 |
|
858 | new mode 100644 | |
857 | 1 hunks, 1 lines changed |
|
859 | 1 hunks, 1 lines changed | |
858 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
860 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
859 | @@ -2,3 +2,4 @@ |
|
861 | @@ -2,3 +2,4 @@ | |
860 | a |
|
862 | a | |
861 | a |
|
863 | a | |
862 | b |
|
864 | b | |
863 | +c |
|
865 | +c | |
864 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
866 | record this change to 'subdir/f1'? [Ynsfdaq?] | |
865 |
|
867 | |||
866 | $ hg tip --config diff.git=True -p |
|
868 | $ hg tip --config diff.git=True -p | |
867 | changeset: 24:0b082130c20a |
|
869 | changeset: 24:0b082130c20a | |
868 | tag: tip |
|
870 | tag: tip | |
869 | user: test |
|
871 | user: test | |
870 | date: Thu Jan 01 00:00:22 1970 +0000 |
|
872 | date: Thu Jan 01 00:00:22 1970 +0000 | |
871 | summary: ab |
|
873 | summary: ab | |
872 |
|
874 | |||
873 | diff --git a/subdir/f1 b/subdir/f1 |
|
875 | diff --git a/subdir/f1 b/subdir/f1 | |
874 | old mode 100755 |
|
876 | old mode 100755 | |
875 | new mode 100644 |
|
877 | new mode 100644 | |
876 | --- a/subdir/f1 |
|
878 | --- a/subdir/f1 | |
877 | +++ b/subdir/f1 |
|
879 | +++ b/subdir/f1 | |
878 | @@ -2,3 +2,4 @@ |
|
880 | @@ -2,3 +2,4 @@ | |
879 | a |
|
881 | a | |
880 | a |
|
882 | a | |
881 | b |
|
883 | b | |
882 | +c |
|
884 | +c | |
883 |
|
885 | |||
884 |
|
886 | |||
885 | $ cd .. |
|
887 | $ cd .. | |
886 |
|
888 | |||
887 | Abort early when a merge is in progress |
|
889 | Abort early when a merge is in progress | |
888 |
|
890 | |||
889 | $ hg up 4 |
|
891 | $ hg up 4 | |
890 | 1 files updated, 0 files merged, 6 files removed, 0 files unresolved |
|
892 | 1 files updated, 0 files merged, 6 files removed, 0 files unresolved | |
891 |
|
893 | |||
892 | $ touch iwillmergethat |
|
894 | $ touch iwillmergethat | |
893 | $ hg add iwillmergethat |
|
895 | $ hg add iwillmergethat | |
894 |
|
896 | |||
895 | $ hg branch thatbranch |
|
897 | $ hg branch thatbranch | |
896 | marked working directory as branch thatbranch |
|
898 | marked working directory as branch thatbranch | |
897 |
|
899 | |||
898 | $ hg ci -m'new head' |
|
900 | $ hg ci -m'new head' | |
899 |
|
901 | |||
900 | $ hg up default |
|
902 | $ hg up default | |
901 | 6 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
903 | 6 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
902 |
|
904 | |||
903 | $ hg merge thatbranch |
|
905 | $ hg merge thatbranch | |
904 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
906 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
905 | (branch merge, don't forget to commit) |
|
907 | (branch merge, don't forget to commit) | |
906 |
|
908 | |||
907 | $ hg record -m'will abort' |
|
909 | $ hg record -m'will abort' | |
908 | abort: cannot partially commit a merge (use "hg commit" instead) |
|
910 | abort: cannot partially commit a merge (use "hg commit" instead) | |
909 | [255] |
|
911 | [255] | |
910 |
|
912 | |||
911 | $ hg up -C |
|
913 | $ hg up -C | |
912 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
914 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
913 |
|
915 | |||
914 | With win32text |
|
916 | With win32text | |
915 |
|
917 | |||
916 | $ echo '[extensions]' >> .hg/hgrc |
|
918 | $ echo '[extensions]' >> .hg/hgrc | |
917 | $ echo 'win32text = ' >> .hg/hgrc |
|
919 | $ echo 'win32text = ' >> .hg/hgrc | |
918 | $ echo '[decode]' >> .hg/hgrc |
|
920 | $ echo '[decode]' >> .hg/hgrc | |
919 | $ echo '** = cleverdecode:' >> .hg/hgrc |
|
921 | $ echo '** = cleverdecode:' >> .hg/hgrc | |
920 | $ echo '[encode]' >> .hg/hgrc |
|
922 | $ echo '[encode]' >> .hg/hgrc | |
921 | $ echo '** = cleverencode:' >> .hg/hgrc |
|
923 | $ echo '** = cleverencode:' >> .hg/hgrc | |
922 | $ echo '[patch]' >> .hg/hgrc |
|
924 | $ echo '[patch]' >> .hg/hgrc | |
923 | $ echo 'eol = crlf' >> .hg/hgrc |
|
925 | $ echo 'eol = crlf' >> .hg/hgrc | |
924 |
|
926 | |||
925 | Ignore win32text deprecation warning for now: |
|
927 | Ignore win32text deprecation warning for now: | |
926 |
|
928 | |||
927 | $ echo '[win32text]' >> .hg/hgrc |
|
929 | $ echo '[win32text]' >> .hg/hgrc | |
928 | $ echo 'warn = no' >> .hg/hgrc |
|
930 | $ echo 'warn = no' >> .hg/hgrc | |
929 |
|
931 | |||
930 | $ echo d >> subdir/f1 |
|
932 | $ echo d >> subdir/f1 | |
931 | $ hg record -d '23 0' -mw1 <<EOF |
|
933 | $ hg record -d '23 0' -mw1 <<EOF | |
932 | > y |
|
934 | > y | |
933 | > y |
|
935 | > y | |
934 | > EOF |
|
936 | > EOF | |
935 | diff --git a/subdir/f1 b/subdir/f1 |
|
937 | diff --git a/subdir/f1 b/subdir/f1 | |
936 | 1 hunks, 1 lines changed |
|
938 | 1 hunks, 1 lines changed | |
937 | examine changes to 'subdir/f1'? [Ynsfdaq?] |
|
939 | examine changes to 'subdir/f1'? [Ynsfdaq?] | |
938 | @@ -3,3 +3,4 @@ |
|
940 | @@ -3,3 +3,4 @@ | |
939 | a |
|
941 | a | |
940 | b |
|
942 | b | |
941 | c |
|
943 | c | |
942 | +d |
|
944 | +d | |
943 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
945 | record this change to 'subdir/f1'? [Ynsfdaq?] | |
944 |
|
946 | |||
945 | $ hg tip -p |
|
947 | $ hg tip -p | |
946 | changeset: 26:b8306e70edc4 |
|
948 | changeset: 26:b8306e70edc4 | |
947 | tag: tip |
|
949 | tag: tip | |
948 | parent: 24:0b082130c20a |
|
950 | parent: 24:0b082130c20a | |
949 | user: test |
|
951 | user: test | |
950 | date: Thu Jan 01 00:00:23 1970 +0000 |
|
952 | date: Thu Jan 01 00:00:23 1970 +0000 | |
951 | summary: w1 |
|
953 | summary: w1 | |
952 |
|
954 | |||
953 | diff -r 0b082130c20a -r b8306e70edc4 subdir/f1 |
|
955 | diff -r 0b082130c20a -r b8306e70edc4 subdir/f1 | |
954 | --- a/subdir/f1 Thu Jan 01 00:00:22 1970 +0000 |
|
956 | --- a/subdir/f1 Thu Jan 01 00:00:22 1970 +0000 | |
955 | +++ b/subdir/f1 Thu Jan 01 00:00:23 1970 +0000 |
|
957 | +++ b/subdir/f1 Thu Jan 01 00:00:23 1970 +0000 | |
956 | @@ -3,3 +3,4 @@ |
|
958 | @@ -3,3 +3,4 @@ | |
957 | a |
|
959 | a | |
958 | b |
|
960 | b | |
959 | c |
|
961 | c | |
960 | +d |
|
962 | +d | |
961 |
|
963 |
@@ -1,274 +1,276 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | $ hg init repo |
|
3 | $ hg init repo | |
2 | $ cd repo |
|
4 | $ cd repo | |
3 | $ echo 123 > a |
|
5 | $ echo 123 > a | |
4 | $ echo 123 > c |
|
6 | $ echo 123 > c | |
5 | $ echo 123 > e |
|
7 | $ echo 123 > e | |
6 | $ hg add a c e |
|
8 | $ hg add a c e | |
7 | $ hg commit -m "first" a c e |
|
9 | $ hg commit -m "first" a c e | |
8 |
|
10 | |||
9 | nothing changed |
|
11 | nothing changed | |
10 |
|
12 | |||
11 | $ hg revert |
|
13 | $ hg revert | |
12 | abort: no files or directories specified |
|
14 | abort: no files or directories specified | |
13 | (use --all to revert all files) |
|
15 | (use --all to revert all files) | |
14 | [255] |
|
16 | [255] | |
15 | $ hg revert --all |
|
17 | $ hg revert --all | |
16 |
|
18 | |||
17 | $ echo 123 > b |
|
19 | $ echo 123 > b | |
18 |
|
20 | |||
19 | should show b unknown |
|
21 | should show b unknown | |
20 |
|
22 | |||
21 | $ hg status |
|
23 | $ hg status | |
22 | ? b |
|
24 | ? b | |
23 | $ echo 12 > c |
|
25 | $ echo 12 > c | |
24 |
|
26 | |||
25 | should show b unknown and c modified |
|
27 | should show b unknown and c modified | |
26 |
|
28 | |||
27 | $ hg status |
|
29 | $ hg status | |
28 | M c |
|
30 | M c | |
29 | ? b |
|
31 | ? b | |
30 | $ hg add b |
|
32 | $ hg add b | |
31 |
|
33 | |||
32 | should show b added and c modified |
|
34 | should show b added and c modified | |
33 |
|
35 | |||
34 | $ hg status |
|
36 | $ hg status | |
35 | M c |
|
37 | M c | |
36 | A b |
|
38 | A b | |
37 | $ hg rm a |
|
39 | $ hg rm a | |
38 |
|
40 | |||
39 | should show a removed, b added and c modified |
|
41 | should show a removed, b added and c modified | |
40 |
|
42 | |||
41 | $ hg status |
|
43 | $ hg status | |
42 | M c |
|
44 | M c | |
43 | A b |
|
45 | A b | |
44 | R a |
|
46 | R a | |
45 | $ hg revert a |
|
47 | $ hg revert a | |
46 |
|
48 | |||
47 | should show b added, copy saved, and c modified |
|
49 | should show b added, copy saved, and c modified | |
48 |
|
50 | |||
49 | $ hg status |
|
51 | $ hg status | |
50 | M c |
|
52 | M c | |
51 | A b |
|
53 | A b | |
52 | $ hg revert b |
|
54 | $ hg revert b | |
53 |
|
55 | |||
54 | should show b unknown, and c modified |
|
56 | should show b unknown, and c modified | |
55 |
|
57 | |||
56 | $ hg status |
|
58 | $ hg status | |
57 | M c |
|
59 | M c | |
58 | ? b |
|
60 | ? b | |
59 | $ hg revert --no-backup c |
|
61 | $ hg revert --no-backup c | |
60 |
|
62 | |||
61 | should show unknown: b |
|
63 | should show unknown: b | |
62 |
|
64 | |||
63 | $ hg status |
|
65 | $ hg status | |
64 | ? b |
|
66 | ? b | |
65 | $ hg add b |
|
67 | $ hg add b | |
66 |
|
68 | |||
67 | should show b added |
|
69 | should show b added | |
68 |
|
70 | |||
69 | $ hg status b |
|
71 | $ hg status b | |
70 | A b |
|
72 | A b | |
71 | $ rm b |
|
73 | $ rm b | |
72 |
|
74 | |||
73 | should show b deleted |
|
75 | should show b deleted | |
74 |
|
76 | |||
75 | $ hg status b |
|
77 | $ hg status b | |
76 | ! b |
|
78 | ! b | |
77 | $ hg revert -v b |
|
79 | $ hg revert -v b | |
78 | forgetting b |
|
80 | forgetting b | |
79 |
|
81 | |||
80 | should not find b |
|
82 | should not find b | |
81 |
|
83 | |||
82 | $ hg status b |
|
84 | $ hg status b | |
83 | b: No such file or directory |
|
85 | b: No such file or directory | |
84 |
|
86 | |||
85 | should show a c e |
|
87 | should show a c e | |
86 |
|
88 | |||
87 | $ ls |
|
89 | $ ls | |
88 | a |
|
90 | a | |
89 | c |
|
91 | c | |
90 | e |
|
92 | e | |
91 |
|
93 | |||
92 | should verbosely save backup to e.orig |
|
94 | should verbosely save backup to e.orig | |
93 |
|
95 | |||
94 | $ echo z > e |
|
96 | $ echo z > e | |
95 | $ hg revert --all -v |
|
97 | $ hg revert --all -v | |
96 | saving current version of e as e.orig |
|
98 | saving current version of e as e.orig | |
97 | reverting e |
|
99 | reverting e | |
98 |
|
100 | |||
99 | should say no changes needed |
|
101 | should say no changes needed | |
100 |
|
102 | |||
101 | $ hg revert a |
|
103 | $ hg revert a | |
102 | no changes needed to a |
|
104 | no changes needed to a | |
103 |
|
105 | |||
104 | should say file not managed |
|
106 | should say file not managed | |
105 |
|
107 | |||
106 | $ echo q > q |
|
108 | $ echo q > q | |
107 | $ hg revert q |
|
109 | $ hg revert q | |
108 | file not managed: q |
|
110 | file not managed: q | |
109 | $ rm q |
|
111 | $ rm q | |
110 |
|
112 | |||
111 | should say file not found |
|
113 | should say file not found | |
112 |
|
114 | |||
113 | $ hg revert notfound |
|
115 | $ hg revert notfound | |
114 | notfound: no such file in rev 334a9e57682c |
|
116 | notfound: no such file in rev 334a9e57682c | |
115 | $ touch d |
|
117 | $ touch d | |
116 | $ hg add d |
|
118 | $ hg add d | |
117 | $ hg rm a |
|
119 | $ hg rm a | |
118 | $ hg commit -m "second" |
|
120 | $ hg commit -m "second" | |
119 | $ echo z > z |
|
121 | $ echo z > z | |
120 | $ hg add z |
|
122 | $ hg add z | |
121 | $ hg st |
|
123 | $ hg st | |
122 | A z |
|
124 | A z | |
123 | ? e.orig |
|
125 | ? e.orig | |
124 |
|
126 | |||
125 | should add a, remove d, forget z |
|
127 | should add a, remove d, forget z | |
126 |
|
128 | |||
127 | $ hg revert --all -r0 |
|
129 | $ hg revert --all -r0 | |
128 | adding a |
|
130 | adding a | |
129 | removing d |
|
131 | removing d | |
130 | forgetting z |
|
132 | forgetting z | |
131 |
|
133 | |||
132 | should forget a, undelete d |
|
134 | should forget a, undelete d | |
133 |
|
135 | |||
134 | $ hg revert --all -rtip |
|
136 | $ hg revert --all -rtip | |
135 | forgetting a |
|
137 | forgetting a | |
136 | undeleting d |
|
138 | undeleting d | |
137 | $ rm a *.orig |
|
139 | $ rm a *.orig | |
138 |
|
140 | |||
139 | should silently add a |
|
141 | should silently add a | |
140 |
|
142 | |||
141 | $ hg revert -r0 a |
|
143 | $ hg revert -r0 a | |
142 | $ hg st a |
|
144 | $ hg st a | |
143 | A a |
|
145 | A a | |
144 | $ hg rm d |
|
146 | $ hg rm d | |
145 | $ hg st d |
|
147 | $ hg st d | |
146 | R d |
|
148 | R d | |
147 |
|
149 | |||
148 | should silently keep d removed |
|
150 | should silently keep d removed | |
149 |
|
151 | |||
150 | $ hg revert -r0 d |
|
152 | $ hg revert -r0 d | |
151 | $ hg st d |
|
153 | $ hg st d | |
152 | R d |
|
154 | R d | |
153 |
|
155 | |||
154 | $ hg update -C |
|
156 | $ hg update -C | |
155 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
157 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
156 | $ chmod +x c |
|
158 | $ chmod +x c | |
157 | $ hg revert --all |
|
159 | $ hg revert --all | |
158 | reverting c |
|
160 | reverting c | |
159 |
|
161 | |||
160 | should print non-executable |
|
162 | should print non-executable | |
161 |
|
163 | |||
162 | $ test -x c || echo non-executable |
|
164 | $ test -x c || echo non-executable | |
163 | non-executable |
|
165 | non-executable | |
164 |
|
166 | |||
165 | $ chmod +x c |
|
167 | $ chmod +x c | |
166 | $ hg commit -m exe |
|
168 | $ hg commit -m exe | |
167 |
|
169 | |||
168 | $ chmod -x c |
|
170 | $ chmod -x c | |
169 | $ hg revert --all |
|
171 | $ hg revert --all | |
170 | reverting c |
|
172 | reverting c | |
171 |
|
173 | |||
172 | should print executable |
|
174 | should print executable | |
173 |
|
175 | |||
174 | $ test -x c && echo executable |
|
176 | $ test -x c && echo executable | |
175 | executable |
|
177 | executable | |
176 |
|
178 | |||
177 | $ cd .. |
|
179 | $ cd .. | |
178 |
|
180 | |||
179 |
|
181 | |||
180 | Issue241: update and revert produces inconsistent repositories |
|
182 | Issue241: update and revert produces inconsistent repositories | |
181 |
|
183 | |||
182 | $ hg init a |
|
184 | $ hg init a | |
183 | $ cd a |
|
185 | $ cd a | |
184 | $ echo a >> a |
|
186 | $ echo a >> a | |
185 | $ hg commit -A -d '1 0' -m a |
|
187 | $ hg commit -A -d '1 0' -m a | |
186 | adding a |
|
188 | adding a | |
187 | $ echo a >> a |
|
189 | $ echo a >> a | |
188 | $ hg commit -d '2 0' -m a |
|
190 | $ hg commit -d '2 0' -m a | |
189 | $ hg update 0 |
|
191 | $ hg update 0 | |
190 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
191 | $ mkdir b |
|
193 | $ mkdir b | |
192 | $ echo b > b/b |
|
194 | $ echo b > b/b | |
193 |
|
195 | |||
194 | should fail - no arguments |
|
196 | should fail - no arguments | |
195 |
|
197 | |||
196 | $ hg revert -rtip |
|
198 | $ hg revert -rtip | |
197 | abort: no files or directories specified |
|
199 | abort: no files or directories specified | |
198 | (use --all to revert all files, or 'hg update 1' to update) |
|
200 | (use --all to revert all files, or 'hg update 1' to update) | |
199 | [255] |
|
201 | [255] | |
200 |
|
202 | |||
201 | should succeed |
|
203 | should succeed | |
202 |
|
204 | |||
203 | $ hg revert --all -rtip |
|
205 | $ hg revert --all -rtip | |
204 | reverting a |
|
206 | reverting a | |
205 |
|
207 | |||
206 |
|
208 | |||
207 | Issue332: confusing message when reverting directory |
|
209 | Issue332: confusing message when reverting directory | |
208 |
|
210 | |||
209 | $ hg ci -A -m b |
|
211 | $ hg ci -A -m b | |
210 | adding b/b |
|
212 | adding b/b | |
211 | created new head |
|
213 | created new head | |
212 | $ echo foobar > b/b |
|
214 | $ echo foobar > b/b | |
213 | $ mkdir newdir |
|
215 | $ mkdir newdir | |
214 | $ echo foo > newdir/newfile |
|
216 | $ echo foo > newdir/newfile | |
215 | $ hg add newdir/newfile |
|
217 | $ hg add newdir/newfile | |
216 | $ hg revert b newdir |
|
218 | $ hg revert b newdir | |
217 | reverting b/b |
|
219 | reverting b/b | |
218 | forgetting newdir/newfile |
|
220 | forgetting newdir/newfile | |
219 | $ echo foobar > b/b |
|
221 | $ echo foobar > b/b | |
220 | $ hg revert . |
|
222 | $ hg revert . | |
221 | reverting b/b |
|
223 | reverting b/b | |
222 |
|
224 | |||
223 |
|
225 | |||
224 | reverting a rename target should revert the source |
|
226 | reverting a rename target should revert the source | |
225 |
|
227 | |||
226 | $ hg mv a newa |
|
228 | $ hg mv a newa | |
227 | $ hg revert newa |
|
229 | $ hg revert newa | |
228 | $ hg st a newa |
|
230 | $ hg st a newa | |
229 | ? newa |
|
231 | ? newa | |
230 |
|
232 | |||
231 | $ cd .. |
|
233 | $ cd .. | |
232 |
|
234 | |||
233 | $ hg init ignored |
|
235 | $ hg init ignored | |
234 | $ cd ignored |
|
236 | $ cd ignored | |
235 | $ echo '^ignored$' > .hgignore |
|
237 | $ echo '^ignored$' > .hgignore | |
236 | $ echo '^ignoreddir$' >> .hgignore |
|
238 | $ echo '^ignoreddir$' >> .hgignore | |
237 | $ echo '^removed$' >> .hgignore |
|
239 | $ echo '^removed$' >> .hgignore | |
238 |
|
240 | |||
239 | $ mkdir ignoreddir |
|
241 | $ mkdir ignoreddir | |
240 | $ touch ignoreddir/file |
|
242 | $ touch ignoreddir/file | |
241 | $ touch ignoreddir/removed |
|
243 | $ touch ignoreddir/removed | |
242 | $ touch ignored |
|
244 | $ touch ignored | |
243 | $ touch removed |
|
245 | $ touch removed | |
244 |
|
246 | |||
245 | 4 ignored files (we will add/commit everything) |
|
247 | 4 ignored files (we will add/commit everything) | |
246 |
|
248 | |||
247 | $ hg st -A -X .hgignore |
|
249 | $ hg st -A -X .hgignore | |
248 | I ignored |
|
250 | I ignored | |
249 | I ignoreddir/file |
|
251 | I ignoreddir/file | |
250 | I ignoreddir/removed |
|
252 | I ignoreddir/removed | |
251 | I removed |
|
253 | I removed | |
252 | $ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed |
|
254 | $ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed | |
253 |
|
255 | |||
254 | $ echo >> ignored |
|
256 | $ echo >> ignored | |
255 | $ echo >> ignoreddir/file |
|
257 | $ echo >> ignoreddir/file | |
256 | $ hg rm removed ignoreddir/removed |
|
258 | $ hg rm removed ignoreddir/removed | |
257 |
|
259 | |||
258 | should revert ignored* and undelete *removed |
|
260 | should revert ignored* and undelete *removed | |
259 |
|
261 | |||
260 | $ hg revert -a --no-backup |
|
262 | $ hg revert -a --no-backup | |
261 | reverting ignored |
|
263 | reverting ignored | |
262 | reverting ignoreddir/file |
|
264 | reverting ignoreddir/file | |
263 | undeleting ignoreddir/removed |
|
265 | undeleting ignoreddir/removed | |
264 | undeleting removed |
|
266 | undeleting removed | |
265 | $ hg st -mardi |
|
267 | $ hg st -mardi | |
266 |
|
268 | |||
267 | $ hg up -qC |
|
269 | $ hg up -qC | |
268 | $ echo >> ignored |
|
270 | $ echo >> ignored | |
269 | $ hg rm removed |
|
271 | $ hg rm removed | |
270 |
|
272 | |||
271 | should silently revert the named files |
|
273 | should silently revert the named files | |
272 |
|
274 | |||
273 | $ hg revert --no-backup ignored removed |
|
275 | $ hg revert --no-backup ignored removed | |
274 | $ hg st -mardi |
|
276 | $ hg st -mardi |
@@ -1,33 +1,35 b'' | |||||
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |||
|
2 | ||||
1 | $ rm -rf a |
|
3 | $ rm -rf a | |
2 | $ hg init a |
|
4 | $ hg init a | |
3 | $ cd a |
|
5 | $ cd a | |
4 |
|
6 | |||
5 | $ echo foo > foo |
|
7 | $ echo foo > foo | |
6 | $ hg ci -qAm0 |
|
8 | $ hg ci -qAm0 | |
7 | $ chmod +x foo |
|
9 | $ chmod +x foo | |
8 | $ hg ci -m1 |
|
10 | $ hg ci -m1 | |
9 | $ hg co -q 0 |
|
11 | $ hg co -q 0 | |
10 | $ echo dirty > foo |
|
12 | $ echo dirty > foo | |
11 | $ hg up -c |
|
13 | $ hg up -c | |
12 | abort: uncommitted local changes |
|
14 | abort: uncommitted local changes | |
13 | [255] |
|
15 | [255] | |
14 | $ hg up -q |
|
16 | $ hg up -q | |
15 | $ cat foo |
|
17 | $ cat foo | |
16 | dirty |
|
18 | dirty | |
17 | $ hg st -A |
|
19 | $ hg st -A | |
18 | M foo |
|
20 | M foo | |
19 |
|
21 | |||
20 | Validate update of standalone execute bit change: |
|
22 | Validate update of standalone execute bit change: | |
21 |
|
23 | |||
22 | $ hg up -C 0 |
|
24 | $ hg up -C 0 | |
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
24 | $ chmod -x foo |
|
26 | $ chmod -x foo | |
25 | $ hg ci -m removeexec |
|
27 | $ hg ci -m removeexec | |
26 | nothing changed |
|
28 | nothing changed | |
27 | [1] |
|
29 | [1] | |
28 | $ hg up -C 0 |
|
30 | $ hg up -C 0 | |
29 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
31 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 | $ hg up |
|
32 | $ hg up | |
31 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
32 | $ hg st |
|
34 | $ hg st | |
33 |
|
35 |
General Comments 0
You need to be logged in to leave comments.
Login now