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