aboutsummaryrefslogtreecommitdiff
path: root/git-import-dsc
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2006-10-05 19:37:39 +0200
committerGuido Guenther <agx@bogon.sigxcpu.org>2006-10-05 19:37:39 +0200
commit0608261f07f4bdd12944deed887f5eebbf5ce946 (patch)
treef64cc09715dcde24a1c8b49dff30ae5521303da8 /git-import-dsc
parent7f1faea64d42f069386352135a696b18aa6b4d5d (diff)
allow for '+' in Debian as well as upstream version numbers
Diffstat (limited to 'git-import-dsc')
-rwxr-xr-xgit-import-dsc10
1 files changed, 5 insertions, 5 deletions
diff --git a/git-import-dsc b/git-import-dsc
index b32420e0..59d7b5ed 100755
--- a/git-import-dsc
+++ b/git-import-dsc
@@ -32,8 +32,8 @@ gitTag=GitTag()
class DscPackage(object):
"""Parse the dsc file for verions, package names, etc"""
pkgre=re.compile('Source: (?P<pkg>[\w\-]+)')
- versionre=re.compile('Version: (?P<upstream>[a-z\d\.]+)(-(?P<debian>[a-z\d\.~]+))?')
- tarre=re.compile ('^ [\da-z]+ \d+ (?P<tar>[a-z\d-]+_[a-z\d\.\~\-]+(\.orig)?\.tar\.gz)')
+ versionre=re.compile('Version: (?P<upstream>[a-z\d\.\+]+)(-(?P<debian>[a-z\d\.~\+]+))?')
+ tarre=re.compile ('^ [\da-z]+ \d+ (?P<tar>[a-z\d\-]+_[a-z\d\.\~\+\-]+(\.orig)?\.tar\.gz)')
def __init__(self, dscfile):
self.dscfile=os.path.abspath(dscfile)
@@ -77,7 +77,7 @@ def import_upstream(src, dirs, upstream_branch):
os.chdir(dirs['git'])
GitInitDB()()
gitAdd(['.'])
- gitCommitAll(msg="Imported upstream version %s" % (src.upstream_version,))
+ gitCommitAll(msg="Imported %s version %s" % (['upstream','Debian'][src.native],src.upstream_version,))
gitTag(src.upstream_version)
if not src.native:
GitBranch()(upstream_branch)
@@ -92,10 +92,10 @@ def apply_debian_patch(src, dirs):
try:
DpkgSourceExtract()(src.dscfile, dirs['dpkg-src'])
os.chdir(dirs['git'])
- GitLoadDirs()(dirs['dpkg-src'], 'Imported debian patch')
+ GitLoadDirs()(dirs['dpkg-src'], 'Imported Debian patch')
gitTag('%s-%s' % (src.upstream_version, src.debian_version))
except CommandExecFailed:
- print >>sys.stderr,"Failed to import debian package"
+ print >>sys.stderr,"Failed to import Debian package"
return 1
return 0