diff tests/test-export.t @ 14986:70e11de6964d

export: add %m to file format string (first line of the commit message) $ hg commit -m "Initial commit" $ hg export -o %m.patch tip #It creates Initial_commit.patch file.
author Andrzej Bieniek <andyhelp@gmail.com>
date Sat, 30 Jul 2011 11:08:45 +0100
parents a5b77eb0409b
children 8ca7187d479f
line wrap: on
line diff
--- a/tests/test-export.t	Fri Jul 29 00:39:27 2011 +0200
+++ b/tests/test-export.t	Sat Jul 30 11:08:45 2011 +0100
@@ -7,7 +7,7 @@
   >    hg ci -m "foo-$i"
   > done
 
-  $ for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r"; do
+  $ for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r" "%m"; do
   >    echo
   >    echo "# foo-$out.patch"
   >    hg export -v -o "foo-$out.patch" 2:tip
@@ -77,6 +77,19 @@
   foo-09.patch
   foo-10.patch
   foo-11.patch
+  
+  # foo-%m.patch
+  exporting patches:
+  foo-foo_2.patch
+  foo-foo_3.patch
+  foo-foo_4.patch
+  foo-foo_5.patch
+  foo-foo_6.patch
+  foo-foo_7.patch
+  foo-foo_8.patch
+  foo-foo_9.patch
+  foo-foo_10.patch
+  foo-foo_11.patch
 
 Exporting 4 changesets to a file:
 
@@ -108,3 +121,11 @@
    foo-9
   +foo-10
 
+Checking if only alphanumeric characters are used in the file name (%m option):
+
+  $ echo "line" >> foo
+  $ hg commit -m " !\"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~" 
+  $ hg export -v -o %m.patch tip
+  exporting patch:
+  ____________0123456789_______ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz____.patch
+