Package: mercurial-buildpackage
Version: 0.3
Severity: normal
Tags: patch

Hello:

I've written a patch to make mercurial-importorig supports wider orig 
tarballs, for instance: kvirc_4.0.0~svn3770.orig.tar.bz2

Please find it attached, you can apply it just doing in your repo:
hg import <patchfile>


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (80, 'unstable'), (10, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mercurial-buildpackage depends on:
ii  devscripts                    2.10.59    scripts to make the life of a 
Debi
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
ii  libneko0                      1.8.1-2    Lightweight virtual machine - 
shar
ii  mercurial                     1.4.1-1    scalable distributed version 
contr
ii  neko                          1.8.1-2    Lightweight virtual machine - 
comp
ii  pristine-tar                  1.00       regenerate pristine tarballs

Versions of packages mercurial-buildpackage recommends:
ii  pbuilder                      0.194      personal package builder for 
Debia
ii  sudo                          1.7.2p1-1  Provide limited super user 
privile

mercurial-buildpackage suggests no packages.

-- no debconf information
# HG changeset patch
# User Raúl Sánchez Siles <[email protected]>
# Date 1262162696 -3600
# Node ID 1919ede29b6f3a240f530f19d29d495307366152
# Parent  e86a87447b6dbee3641d4398561a5e6952682c88
Fix regex for mercurial-importorig tarballs.

diff --git a/MercurialImportOrig.hx b/MercurialImportOrig.hx
--- a/MercurialImportOrig.hx
+++ b/MercurialImportOrig.hx
@@ -425,7 +425,7 @@
 		}
 		// The names of tarballs must follow Debian conventions of dpkg format
 		// 3.0 (quilt).
-		var ballRegExp = ~/([^\/]+)_([0-9][0-9.]*)\.orig\.tar\.(bz2|lzma|gz)$/;
+		var ballRegExp = ~/([^\/]+)_([0-9][0-9.]*([\.\+\-\:~]?[a-z0-9.]*?)?)\.orig\.tar\.(bz2|lzma|gz)$/;
 		if( ! ballRegExp.match( origs[0] ) )
 		{
 			Util.die( "Filename of main tarball must follow the pattern defined by dpkg format 3.0." );
@@ -445,7 +445,7 @@
 		components.push( { component: ".", tarball: origs[0] } );
 		// Process additional tarball components, if any.
 		var componentRegExp =
-		~/([^\/]+)_([0-9][0-9.]*)\.orig-([a-z0-9][-a-z0-9]*)\.tar\.(bz2|lzma|gz)$/i;
+		~/([^\/]+)_([0-9][0-9.]*([\.\+\-\:~]?[a-z0-9.]*?)?)\.orig-([a-z0-9][-a-z0-9]*)\.tar\.(bz2|lzma|gz)$/i;
 		for( i in 1...origs.length )
 		{
 			if( ! componentRegExp.match( origs[i] ) )
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mercurial-buildpackage (0.4) UNRELEASED; urgency=low
+
+  * Fix regex for mercurial-importorig main tarball.
+
+ -- Raúl Sánchez Siles <[email protected]>  Tue, 29 Dec 2009 16:56:05 +0100
+
 mercurial-buildpackage (0.3) unstable; urgency=low
 
   * Porting branches are now suported.  

Reply via email to