changeset 20411:66359d8b8d7e

shelve: add 'changes to' prefix to default shelve message The shelved changes _could_ perhaps be amended to the parent changeset but it _is_ not the parent changeset. Using the description from the parent changeset is thus wrong and confusing. Instead, add a 'changes to' prefix.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 10 Feb 2014 00:53:27 +0100
parents fc5354648224
children e584fc30456b
files hgext/shelve.py tests/test-shelve.t
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/shelve.py	Mon Feb 10 00:53:27 2014 +0100
+++ b/hgext/shelve.py	Mon Feb 10 00:53:27 2014 +0100
@@ -172,9 +172,9 @@
                 repo.mq.checkapplied = saved
 
     if parent.node() != nullid:
-        desc = parent.description().split('\n', 1)[0]
+        desc = "changes to '%s'" % parent.description().split('\n', 1)[0]
     else:
-        desc = '(empty repository)'
+        desc = '(changes in empty repository)'
 
     if not opts['message']:
         opts['message'] = desc
--- a/tests/test-shelve.t	Mon Feb 10 00:53:27 2014 +0100
+++ b/tests/test-shelve.t	Mon Feb 10 00:53:27 2014 +0100
@@ -81,11 +81,11 @@
 ensure that our shelved changes exist
 
   $ hg shelve -l
-  default-01      (*)    [mq]: second.patch (glob)
-  default         (*)    [mq]: second.patch (glob)
+  default-01      (*)    changes to '[mq]: second.patch' (glob)
+  default         (*)    changes to '[mq]: second.patch' (glob)
 
   $ hg shelve -l -p default
-  default         (*)    [mq]: second.patch (glob)
+  default         (*)    changes to '[mq]: second.patch' (glob)
   
   diff --git a/a/a b/a/a
   --- a/a/a
@@ -400,7 +400,7 @@
   shelved as default
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg shelve --list
-  default         (*)    create conflict (glob)
+  default         (*)    changes to 'create conflict' (glob)
   $ hg unshelve --keep
   unshelving change 'default'
   adding changesets
@@ -408,7 +408,7 @@
   adding file changes
   added 1 changesets with 1 changes to 7 files
   $ hg shelve --list
-  default         (*)    create conflict (glob)
+  default         (*)    changes to 'create conflict' (glob)
   $ hg shelve --cleanup
   $ hg shelve --list
 
@@ -437,7 +437,7 @@
   shelved as test
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg --config extensions.mq=! shelve --list
-  test            (1s ago)    create conflict
+  test            (*)    changes to 'create conflict' (glob)
   $ hg --config extensions.mq=! unshelve
   unshelving change 'test'
   adding changesets