Show More
@@ -590,12 +590,17 b' def commit(ui, repo, *pats, **opts):' | |||
|
590 | 590 | parents = cl.parentrevs(rev) |
|
591 | 591 | if rev - 1 in parents: |
|
592 | 592 | # one of the parents was the old tip |
|
593 |
|
|
|
594 | if (parents == (nullrev, nullrev) or | |
|
593 | pass | |
|
594 | elif (parents == (nullrev, nullrev) or | |
|
595 | 595 | len(cl.heads(cl.node(parents[0]))) > 1 and |
|
596 | 596 | (parents[1] == nullrev or len(cl.heads(cl.node(parents[1]))) > 1)): |
|
597 | 597 | ui.status(_('created new head\n')) |
|
598 | 598 | |
|
599 | if ui.debugflag: | |
|
600 | ui.write(_('committed changeset %d:%s\n') % (rev,hex(node))) | |
|
601 | elif ui.verbose: | |
|
602 | ui.write(_('committed changeset %d:%s\n') % (rev,short(node))) | |
|
603 | ||
|
599 | 604 | def copy(ui, repo, *pats, **opts): |
|
600 | 605 | """mark files as copied for the next commit |
|
601 | 606 |
@@ -2,10 +2,12 b' adding dir/bar' | |||
|
2 | 2 | adding foo |
|
3 | 3 | dir/bar |
|
4 | 4 | foo |
|
5 | committed changeset 0:d44511117907 | |
|
5 | 6 | adding dir/bar_2 |
|
6 | 7 | adding foo_2 |
|
7 | 8 | dir/bar_2 |
|
8 | 9 | foo_2 |
|
10 | committed changeset 1:a85812e0561a | |
|
9 | 11 | adding a |
|
10 | 12 | adding c |
|
11 | 13 | removing a |
@@ -5,6 +5,7 b' a' | |||
|
5 | 5 | % test case collision on rename (issue 750) |
|
6 | 6 | adding a |
|
7 | 7 | a |
|
8 | committed changeset 0:07f4944404050f47db2e5c5071e0e84e7a27bba9 | |
|
8 | 9 | A: not overwriting - file exists |
|
9 | 10 | % test case collision between revisions (issue 912) |
|
10 | 11 | adding a |
@@ -7,10 +7,6 b' echo foo > foo' | |||
|
7 | 7 | hg add foo |
|
8 | 8 | HGEDITOR=true hg commit -m "" |
|
9 | 9 | hg commit -d '0 0' -m commit-1 |
|
10 | # An empty date was interpreted as epoch origin | |
|
11 | echo foo >> foo | |
|
12 | hg commit -d '' -m commit-no-date | |
|
13 | hg tip --template '{date|isodate}\n' | grep '1970' | |
|
14 | 10 | echo foo >> foo |
|
15 | 11 | hg commit -d '1 4444444' -m commit-3 |
|
16 | 12 | hg commit -d '1 15.1' -m commit-4 |
@@ -52,6 +48,10 b' touch quux' | |||
|
52 | 48 | hg commit -d '0 0' -m commit-16 quux |
|
53 | 49 | echo >> dir/file |
|
54 | 50 | hg -v commit -d '0 0' -m commit-17 dir/file |
|
51 | # An empty date was interpreted as epoch origin | |
|
52 | echo foo >> foo | |
|
53 | hg commit -d '' -m commit-no-date | |
|
54 | hg tip --template '{date|isodate}\n' | grep '1970' | |
|
55 | 55 | cd .. |
|
56 | 56 | |
|
57 | 57 | echo % partial subdir commit test |
@@ -11,16 +11,19 b' nothing changed' | |||
|
11 | 11 | abort: file bar not found! |
|
12 | 12 | adding dir/file |
|
13 | 13 | dir/file |
|
14 | committed changeset 2:d2a76177cb42 | |
|
14 | 15 | adding dir.file |
|
15 | 16 | abort: no match under directory dir! |
|
16 | 17 | abort: no match under directory .! |
|
17 | 18 | abort: no match under directory ../dir2! |
|
18 | 19 | dir/file |
|
20 | committed changeset 3:1cd62a2d8db5 | |
|
19 | 21 | does-not-exist: No such file or directory |
|
20 | 22 | abort: file does-not-exist not found! |
|
21 | 23 | abort: file baz not tracked! |
|
22 | 24 | abort: file quux not tracked! |
|
23 | 25 | dir/file |
|
26 | committed changeset 4:49176991390e | |
|
24 | 27 | % partial subdir commit test |
|
25 | 28 | adding bar/bar |
|
26 | 29 | adding foo/foo |
@@ -1,6 +1,7 b'' | |||
|
1 | 1 | A b |
|
2 | 2 | b |
|
3 | 3 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
4 | committed changeset 1:386a3cc01532710ca78aed9a54fa2f459c04f29c | |
|
4 | 5 | we should see two history entries |
|
5 | 6 | changeset: 1:386a3cc01532 |
|
6 | 7 | tag: tip |
@@ -150,4 +150,5 b' Automatically installed hook' | |||
|
150 | 150 | foo |
|
151 | 151 | calling hook commit.auto: <function autohook> |
|
152 | 152 | Automatically installed hook |
|
153 | committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 | |
|
153 | 154 | hooks.commit.auto=<function autohook> |
@@ -8,6 +8,7 b' adding a' | |||
|
8 | 8 | b |
|
9 | 9 | b: searching for copy revision for a |
|
10 | 10 | b: copy a:b80de5d138758541c5f05265ad144ab9fa86d1db |
|
11 | committed changeset 5:755e75751bf67eb4378bca61987df035d90a7a06 | |
|
11 | 12 | checking changesets |
|
12 | 13 | checking manifests |
|
13 | 14 | crosschecking files in changesets and manifests |
@@ -117,6 +117,7 b' a' | |||
|
117 | 117 | b |
|
118 | 118 | overwriting a expanding keywords |
|
119 | 119 | running hook commit.test: cp a hooktest |
|
120 | committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9 | |
|
120 | 121 | % status |
|
121 | 122 | ? hooktest |
|
122 | 123 | % identify |
@@ -223,6 +224,7 b' c' | |||
|
223 | 224 | c |
|
224 | 225 | c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 |
|
225 | 226 | overwriting c expanding keywords |
|
227 | committed changeset 2:e22d299ac0c2bd8897b3df5114374b9e4d4ca62f | |
|
226 | 228 | % cat a c |
|
227 | 229 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
228 | 230 | do not process $Id: |
@@ -280,6 +282,7 b' M a' | |||
|
280 | 282 | % commit |
|
281 | 283 | a |
|
282 | 284 | overwriting a expanding keywords |
|
285 | committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83 | |
|
283 | 286 | % status |
|
284 | 287 | % verify |
|
285 | 288 | checking changesets |
@@ -306,6 +309,7 b' 1: do not process $Id:' | |||
|
306 | 309 | 1: xxx $ |
|
307 | 310 | 2: $Xinfo$ |
|
308 | 311 | % remove |
|
312 | committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 | |
|
309 | 313 | % status |
|
310 | 314 | % rollback |
|
311 | 315 | rolling back last transaction |
@@ -337,6 +341,7 b' summary: firstline' | |||
|
337 | 341 | % commit rejecttest |
|
338 | 342 | a |
|
339 | 343 | overwriting a expanding keywords |
|
344 | committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 | |
|
340 | 345 | % export |
|
341 | 346 | % import |
|
342 | 347 | applying ../rejecttest.diff |
@@ -360,6 +365,7 b' abort: outstanding uncommitted changes' | |||
|
360 | 365 | x/a |
|
361 | 366 | x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e |
|
362 | 367 | overwriting x/a expanding keywords |
|
368 | committed changeset 3:cfa68229c1167443337266ebac453c73b1d5d16e | |
|
363 | 369 | % cat a |
|
364 | 370 | expand $Id: x/a cfa68229c116 Thu, 01 Jan 1970 00:00:03 +0000 user $ |
|
365 | 371 | do not process $Id: |
General Comments 0
You need to be logged in to leave comments.
Login now