[PATCH 3 of 3] patchbomb: fix patch name generation in patch series

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Wed Nov 12 09:35:54 CST 2008


# HG changeset patch
# User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
# Date 1226504042 -3600
# Node ID d0317a8b942e5a030fd7c46cbfb0c4d5f3514b9e
# Parent  2fddc1c5a4079ae4042e15c1e3f17d0aaf7b47c8
patchbomb: fix patch name generation in patch series

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -159,7 +159,7 @@
                 patchname = patchtags[0]
             elif total > 1:
                 patchname = cmdutil.make_filename(repo, '%b-%n.patch',
-                                                  binnode, idx, total)
+                                                  binnode, seqno=idx, total=total)
             else:
                 patchname = cmdutil.make_filename(repo, '%b.patch', binnode)
         disposition = 'inline'
diff --git a/tests/test-patchbomb.out b/tests/test-patchbomb.out
--- a/tests/test-patchbomb.out
+++ b/tests/test-patchbomb.out
@@ -386,7 +386,7 @@
 Content-Type: text/x-patch; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
-Content-Disposition: inline; filename=t2-2.patch
+Content-Disposition: inline; filename=t2-1.patch
 
 # HG changeset patch
 # User test
@@ -522,7 +522,7 @@
 Content-Type: text/x-patch; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename=t2-2.patch
+Content-Disposition: attachment; filename=t2-1.patch
 
 # HG changeset patch
 # User test
@@ -650,7 +650,7 @@
 Content-Type: text/x-patch; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
-Content-Disposition: inline; filename=t2-2.patch
+Content-Disposition: inline; filename=t2-1.patch
 
 # HG changeset patch
 # User test


More information about the Mercurial-devel mailing list