localrepo: show headline notes in commitctx before showing filenames
authorMads Kiilerich <madski@unity3d.com>
Fri, 18 Apr 2014 13:33:20 +0200
changeset 23749 a387b0390082
parent 23748 4ab66de46a96
child 23750 e864353f8c6b
localrepo: show headline notes in commitctx before showing filenames commitctx already showed notes with filenames but didn't provide any context. It is just as relevant to know when manifest or changelog is committed. So, in addition to filenames, also show headlines 'committing files:', 'committing manifest' and 'committing changelog'.
mercurial/localrepo.py
tests/test-addremove.t
tests/test-commit-amend.t
tests/test-commit.t
tests/test-convert-svn-encoding.t
tests/test-copy.t
tests/test-graft.t
tests/test-hook.t
tests/test-import.t
tests/test-issue1175.t
tests/test-keyword.t
tests/test-mq-guards.t
tests/test-mq-qpush-fail.t
tests/test-mq-symlinks.t
tests/test-mq.t
tests/test-patch-offset.t
tests/test-rebase-conflicts.t
tests/test-rebase-mq-skip.t
tests/test-rebase-newancestor.t
--- a/mercurial/localrepo.py	Fri Aug 15 19:43:32 2014 +0200
+++ b/mercurial/localrepo.py	Fri Apr 18 13:33:20 2014 +0200
@@ -1432,6 +1432,7 @@
                 changed = []
                 removed = list(ctx.removed())
                 linkrev = len(self)
+                self.ui.note(_("committing files:\n"))
                 for f in sorted(ctx.modified() + ctx.added()):
                     self.ui.note(f + "\n")
                     try:
@@ -1453,6 +1454,7 @@
                         raise
 
                 # update manifest
+                self.ui.note(_("committing manifest\n"))
                 removed = [f for f in sorted(removed) if f in m1 or f in m2]
                 drop = [f for f in removed if f in m]
                 for f in drop:
@@ -1466,6 +1468,7 @@
                 files = []
 
             # update changelog
+            self.ui.note(_("committing changelog\n"))
             self.changelog.delayupdate(tr)
             n = self.changelog.add(mn, files, ctx.description(),
                                    trp, p1.node(), p2.node(),
--- a/tests/test-addremove.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-addremove.t	Fri Apr 18 13:33:20 2014 +0200
@@ -6,8 +6,11 @@
   adding dir/bar
   adding foo
   $ hg -v commit -m "add 1"
+  committing files:
   dir/bar
   foo
+  committing manifest
+  committing changelog
   committed changeset 0:6f7f953567a2
   $ cd dir/
   $ touch ../foo_2 bar_2
@@ -15,8 +18,11 @@
   adding dir/bar_2
   adding foo_2
   $ hg -v commit -m "add 2"
+  committing files:
   dir/bar_2
   foo_2
+  committing manifest
+  committing changelog
   committed changeset 1:e65414bf35c5
   $ cd ..
   $ hg forget foo
--- a/tests/test-commit-amend.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-commit-amend.t	Fri Apr 18 13:33:20 2014 +0200
@@ -106,7 +106,10 @@
   $ hg ci -v --amend -m 'no changes, new message'
   amending changeset 74609c7f506e
   copying changeset 74609c7f506e to ad120869acf0
+  committing files:
   a
+  committing manifest
+  committing changelog
   stripping amended changeset 74609c7f506e
   1 changesets found
   uncompressed size of bundle content:
@@ -190,7 +193,10 @@
   $ hg commit --amend -v -m "message given from command line"
   amending changeset 5f357c7560ab
   copying changeset 5f357c7560ab to ad120869acf0
+  committing files:
   a
+  committing manifest
+  committing changelog
   running hook pretxncommit.test-saving-last-message: false
   transaction abort!
   rollback completed
@@ -212,7 +218,10 @@
   HG: user: foo
   HG: branch 'default'
   HG: changed a
+  committing files:
   a
+  committing manifest
+  committing changelog
   running hook pretxncommit.test-saving-last-message: false
   transaction abort!
   rollback completed
@@ -241,7 +250,10 @@
   HG: user: foo
   HG: branch 'default'
   HG: changed a
+  committing files:
   a
+  committing manifest
+  committing changelog
   stripping amended changeset 5f357c7560ab
   1 changesets found
   uncompressed size of bundle content:
@@ -266,7 +278,10 @@
   $ echo a >> a
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v
   amending changeset 7ab3bf440b54
+  committing files:
   a
+  committing manifest
+  committing changelog
   copying changeset a0ea9b1a4c8c to ad120869acf0
   another precious commit message
   
@@ -277,7 +292,10 @@
   HG: user: foo
   HG: branch 'default'
   HG: changed a
+  committing files:
   a
+  committing manifest
+  committing changelog
   stripping intermediate changeset a0ea9b1a4c8c
   stripping amended changeset 7ab3bf440b54
   2 changesets found
--- a/tests/test-commit.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-commit.t	Fri Apr 18 13:33:20 2014 +0200
@@ -50,7 +50,10 @@
   $ hg add
   adding dir/file (glob)
   $ hg -v commit -m commit-9 dir
+  committing files:
   dir/file
+  committing manifest
+  committing changelog
   committed changeset 2:d2a76177cb42
 
   $ echo > dir.file
@@ -71,7 +74,10 @@
   abort: dir2: no match under directory!
   [255]
   $ hg -v commit -m commit-13 ../dir
+  committing files:
   dir/file
+  committing manifest
+  committing changelog
   committed changeset 3:1cd62a2d8db5
   $ cd ..
 
@@ -92,7 +98,10 @@
   [255]
   $ echo >> dir/file
   $ hg -v commit -m commit-17 dir/file
+  committing files:
   dir/file
+  committing manifest
+  committing changelog
   committed changeset 4:49176991390e
 
 An empty date was interpreted as epoch origin
--- a/tests/test-convert-svn-encoding.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-convert-svn-encoding.t	Fri Apr 18 13:33:20 2014 +0200
@@ -52,6 +52,7 @@
   5 init projA
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@1
   converting: 0/6 revisions (0.00%)
+  committing changelog
   4 hello
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@2
   converting: 1/6 revisions (16.67%)
@@ -59,10 +60,13 @@
   scanning paths: /trunk/\xc3\xa0 0/3 (0.00%) (esc)
   scanning paths: /trunk/\xc3\xa0/e\xcc\x81 1/3 (33.33%) (esc)
   scanning paths: /trunk/\xc3\xa9 2/3 (66.67%) (esc)
+  committing files:
   \xc3\xa0/e\xcc\x81 (esc)
   getting files: \xc3\xa0/e\xcc\x81 1/2 (50.00%) (esc)
   \xc3\xa9 (esc)
   getting files: \xc3\xa9 2/2 (100.00%) (esc)
+  committing manifest
+  committing changelog
   3 copy files
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@3
   converting: 2/6 revisions (33.33%)
@@ -80,12 +84,15 @@
   mark /trunk/\xc3\xb9 came from \xc3\xa0:2 (esc)
   getting files: \xc3\xa0/e\xcc\x81 1/4 (25.00%) (esc)
   getting files: \xc3\xa9 2/4 (50.00%) (esc)
+  committing files:
   \xc3\xa8 (esc)
   getting files: \xc3\xa8 3/4 (75.00%) (esc)
    \xc3\xa8: copy \xc3\xa9:6b67ccefd5ce6de77e7ead4f5292843a0255329f (esc)
   \xc3\xb9/e\xcc\x81 (esc)
   getting files: \xc3\xb9/e\xcc\x81 4/4 (100.00%) (esc)
    \xc3\xb9/e\xcc\x81: copy \xc3\xa0/e\xcc\x81:a9092a3d84a37b9993b5c73576f6de29b7ea50f6 (esc)
+  committing manifest
+  committing changelog
   2 remove files
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@4
   converting: 3/6 revisions (50.00%)
@@ -99,22 +106,30 @@
   reparent to file://*/svn-repo/trunk (glob)
   getting files: \xc3\xa8 1/2 (50.00%) (esc)
   getting files: \xc3\xb9/e\xcc\x81 2/2 (100.00%) (esc)
+  committing files:
+  committing manifest
+  committing changelog
   1 branch to branch?
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?@5
   converting: 4/6 revisions (66.67%)
   reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
   scanning paths: /branches/branch\xc3\xa9 0/1 (0.00%) (esc)
+  committing changelog
   0 branch to branch?e
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?e@6
   converting: 5/6 revisions (83.33%)
   reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
   scanning paths: /branches/branch\xc3\xa9e 0/1 (0.00%) (esc)
+  committing changelog
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
   updating tags
+  committing files:
   .hgtags
+  committing manifest
+  committing changelog
   run hg sink post-conversion action
   $ cd A-hg
   $ hg up
--- a/tests/test-copy.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-copy.t	Fri Apr 18 13:33:20 2014 +0200
@@ -20,8 +20,11 @@
   commit: 1 copied
   update: (current)
   $ hg --debug commit -m "2"
+  committing files:
   b
    b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
+  committing manifest
+  committing changelog
   committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4
 
 we should see two history entries
--- a/tests/test-graft.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-graft.t	Fri Apr 18 13:33:20 2014 +0200
@@ -159,7 +159,10 @@
   merging b and a to b
   my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622
    premerge successful
+  committing files:
   b
+  committing manifest
+  committing changelog
   grafting 5:97f8bfe72746 "5"
     searching for copies back to rev 1
   resolving manifests
@@ -169,7 +172,10 @@
   getting e
   updating: e 1/1 files (100.00%)
    b: remote unchanged -> k
+  committing files:
   e
+  committing manifest
+  committing changelog
   grafting 4:9c233e8e184d "4"
     searching for copies back to rev 1
   resolving manifests
--- a/tests/test-hook.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-hook.t	Fri Apr 18 13:33:20 2014 +0200
@@ -511,7 +511,10 @@
   Automatically installed hook
   $ echo >> foo
   $ hg ci --debug -d '0 0' -m 'change foo'
+  committing files:
   foo
+  committing manifest
+  committing changelog
   calling hook commit.auto: hgext_hookext.autohook
   Automatically installed hook
   committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708
--- a/tests/test-import.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-import.t	Fri Apr 18 13:33:20 2014 +0200
@@ -411,11 +411,17 @@
   $ hg --cwd b import -v ../patch1 ../patch2
   applying ../patch1
   patching file a
+  committing files:
   a
+  committing manifest
+  committing changelog
   created 1d4bd90af0e4
   applying ../patch2
   patching file a
+  committing files:
   a
+  committing manifest
+  committing changelog
   created 6d019af21222
   $ hg --cwd b rollback
   repository tip rolled back to revision 0 (undo import)
--- a/tests/test-issue1175.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-issue1175.t	Fri Apr 18 13:33:20 2014 +0200
@@ -28,9 +28,12 @@
   $ hg ci -Am4 a
 
   $ hg ci --debug --traceback -Am5 b
+  committing files:
   b
    b: searching for copy revision for a
    b: copy a:b80de5d138758541c5f05265ad144ab9fa86d1db
+  committing manifest
+  committing changelog
   committed changeset 5:732aafbecb501a198b3cc9323ad3899ff04ccf95
 
   $ hg verify
--- a/tests/test-keyword.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-keyword.t	Fri Apr 18 13:33:20 2014 +0200
@@ -135,8 +135,11 @@
 Commit with several checks
 
   $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
+  committing files:
   a
   b
+  committing manifest
+  committing changelog
   overwriting a expanding keywords
   running hook commit.test: cp a hooktest
   committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
@@ -475,7 +478,10 @@
   new file mode 100644
   examine changes to 'r'? [Ynesfdaq?] y
   
+  committing files:
   r
+  committing manifest
+  committing changelog
   committed changeset 3:82a2f715724d
   overwriting r expanding keywords
  - status call required for dirstate.normallookup() check
@@ -500,7 +506,10 @@
   new file mode 100644
   examine changes to 'i'? [Ynesfdaq?] y
   
+  committing files:
   i
+  committing manifest
+  committing changelog
   committed changeset 3:9f40ceb5a072
   $ cat i
   $Id$
@@ -585,8 +594,11 @@
 Commit and show expansion in original and copy
 
   $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
+  committing files:
   c
    c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
+  committing manifest
+  committing changelog
   overwriting c expanding keywords
   committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
   $ cat a c
@@ -756,7 +768,10 @@
 Commit with multi-line message and custom expansion
 
   $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
+  committing files:
   a
+  committing manifest
+  committing changelog
   overwriting a expanding keywords
   committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
   $ rm log
@@ -798,6 +813,9 @@
   $ hg debugrebuildstate
   $ hg remove a
   $ hg --debug commit -m rma
+  committing files:
+  committing manifest
+  committing changelog
   committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
   $ hg status
   ? c
@@ -868,7 +886,10 @@
   >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read())
   >>> open('a', 'wb').write(text)
   $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
+  committing files:
   a
+  committing manifest
+  committing changelog
   overwriting a expanding keywords
   committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
   $ hg export -o ../rejecttest.diff tip
@@ -908,8 +929,11 @@
   [255]
   $ cd x
   $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
+  committing files:
   x/a
    x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
+  committing manifest
+  committing changelog
   overwriting x/a expanding keywords
   committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
   $ cat a
--- a/tests/test-mq-guards.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-mq-guards.t	Fri Apr 18 13:33:20 2014 +0200
@@ -270,7 +270,10 @@
   applying c.patch
   patching file c
   adding c
+  committing files:
   c
+  committing manifest
+  committing changelog
   now at: c.patch
 
 guards in series file: +1 +2 -3
--- a/tests/test-mq-qpush-fail.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-mq-qpush-fail.t	Fri Apr 18 13:33:20 2014 +0200
@@ -264,7 +264,10 @@
   applying p2
   saving current version of a as a.orig
   patching file a
+  committing files:
   a
+  committing manifest
+  committing changelog
   applying p3
   saving current version of b as b.orig
   saving current version of d as d.orig
@@ -277,7 +280,10 @@
   file e already exists
   1 out of 1 hunks FAILED -- saving rejects to file e.rej
   patch failed to apply
+  committing files:
   b
+  committing manifest
+  committing changelog
   patch failed, rejects left in working dir
   errors during apply, please fix and refresh p3
   [2]
@@ -302,7 +308,10 @@
   $ hg qpush --force --no-backup --verbose
   applying p2
   patching file a
+  committing files:
   a
+  committing manifest
+  committing changelog
   now at: p2
   $ test -f a.orig && echo 'error: backup with --no-backup'
   [1]
@@ -316,7 +325,10 @@
   $ hg qgoto --force --no-backup p2 --verbose
   applying p2
   patching file a
+  committing files:
   a
+  committing manifest
+  committing changelog
   now at: p2
   $ test -f a.orig && echo 'error: backup with --no-backup'
   [1]
--- a/tests/test-mq-symlinks.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-mq-symlinks.t	Fri Apr 18 13:33:20 2014 +0200
@@ -47,7 +47,10 @@
   $ hg qpush --debug
   applying updatelink
   patching file a
+  committing files:
   a
+  committing manifest
+  committing changelog
   now at: updatelink
   $ "$TESTDIR/readlink.py" a
   a -> c
--- a/tests/test-mq.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-mq.t	Fri Apr 18 13:33:20 2014 +0200
@@ -1400,7 +1400,10 @@
   applying empty
   saving current version of hello.txt as hello.txt.orig
   patching file hello.txt
+  committing files:
   hello.txt
+  committing manifest
+  committing changelog
   now at: empty
   $ hg st
   M bye.txt
--- a/tests/test-patch-offset.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-patch-offset.t	Fri Apr 18 13:33:20 2014 +0200
@@ -68,7 +68,10 @@
   Hunk #1 succeeded at 43 (offset 34 lines).
   Hunk #2 succeeded at 87 (offset 34 lines).
   Hunk #3 succeeded at 109 (offset 34 lines).
+  committing files:
   a
+  committing manifest
+  committing changelog
   created 189885cecb41
 
 compare imported changes against reference file
--- a/tests/test-rebase-conflicts.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-rebase-conflicts.t	Fri Apr 18 13:33:20 2014 +0200
@@ -245,7 +245,10 @@
    f1.txt: remote is newer -> g
   getting f1.txt
   updating: f1.txt 1/1 files (100.00%)
+  committing files:
   f1.txt
+  committing manifest
+  committing changelog
   rebased as 19c888675e13
   rebasing 10:2f2496ddf49d "merge" (tip)
   rebasing: 10:2f2496ddf49d 6/6 changesets (100.00%)
@@ -261,7 +264,10 @@
    f1.txt: remote is newer -> g
   getting f1.txt
   updating: f1.txt 1/1 files (100.00%)
+  committing files:
   f1.txt
+  committing manifest
+  committing changelog
   rebased as 2a7f09cac94c
   rebase merging completed
   update back to initial working directory parent
--- a/tests/test-rebase-mq-skip.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-rebase-mq-skip.t	Fri Apr 18 13:33:20 2014 +0200
@@ -56,7 +56,10 @@
   getting r1
   resolving manifests
   getting p0
+  committing files:
   p0
+  committing manifest
+  committing changelog
   rebasing 3:148775c71080 "P1" (p1.patch qtip)
   resolving manifests
   note: rebase of 3:148775c71080 created no changes to commit
--- a/tests/test-rebase-newancestor.t	Fri Aug 15 19:43:32 2014 +0200
+++ b/tests/test-rebase-newancestor.t	Fri Apr 18 13:33:20 2014 +0200
@@ -291,7 +291,10 @@
   end of auction
   
   getting other
+  committing files:
   other
+  committing manifest
+  committing changelog
   rebase merging completed
   1 changesets found
   uncompressed size of bundle content: