changeset 23508:2164226a5637

graft: drop cset description from empty commit message This is either already redundant in the output or too verbose in quiet mode.
author Matt Mackall <mpm@selenic.com>
date Tue, 09 Dec 2014 12:39:23 -0600
parents 67045b5a903a
children 32e68271a037
files mercurial/commands.py tests/test-graft.t
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Dec 09 03:38:23 2014 +0100
+++ b/mercurial/commands.py	Tue Dec 09 12:39:23 2014 -0600
@@ -3498,8 +3498,9 @@
             node = repo.commit(text=message, user=user,
                         date=date, extra=extra, editor=editor)
             if node is None:
-                ui.warn(_('note: graft of %s created no changes to commit\n') %
-                        desc)
+                ui.warn(
+                    _('note: graft of %d:%s created no changes to commit\n') %
+                    (ctx.rev(), ctx))
     finally:
         wlock.release()
 
--- a/tests/test-graft.t	Tue Dec 09 03:38:23 2014 +0100
+++ b/tests/test-graft.t	Tue Dec 09 12:39:23 2014 -0600
@@ -716,5 +716,6 @@
   $ hg up -qr 26
   $ hg tag -f something
   $ hg graft -qr 27
-  $ hg graft -qf 27
-  note: graft of 27:3aaa8b6725f0 "28" created no changes to commit
+  $ hg graft -f 27
+  grafting 27:3aaa8b6725f0 "28"
+  note: graft of 27:3aaa8b6725f0 created no changes to commit