summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2006-09-29 19:09:33 +0200
committerGuido Guenther <agx@bogon.sigxcpu.org>2006-09-29 19:09:33 +0200
commit8b155f5eade2ee4cdfd01f786ddb95b5db2ba70d (patch)
treee0457e2d8815fbca9224c3c565fe00a487b110bc
parentc6074bbc5c47d87d249f5cedfce4a623a1e43157 (diff)
downloadgit-buildpackage-8b155f5eade2ee4cdfd01f786ddb95b5db2ba70d.tar.gz
git-buildpackage-8b155f5eade2ee4cdfd01f786ddb95b5db2ba70d.tar.bz2
git-buildpackage-8b155f5eade2ee4cdfd01f786ddb95b5db2ba70d.zip
git-import-dsc: don't fail if the dsc is a plain filename without a directory componentdebian/0.2.2
git-import-{orig,dsc}: allow to set the name of the upstream branch
-rw-r--r--TODO6
-rw-r--r--debian/changelog8
-rwxr-xr-xgit-import-dsc15
-rwxr-xr-xgit-import-orig14
4 files changed, 26 insertions, 17 deletions
diff --git a/TODO b/TODO
index adf0e794..0b667b7a 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,4 @@
-- git-import-dsc:
- - allow to set use individual branch names
-- git-import-orig:
- - allow to set use individual branch names
- git-buildpackage:
- allow to export the hole source tree to tmpdir before building
+ - easy push to remote repositories (like alioth) after a successful build
+- manpages
diff --git a/debian/changelog b/debian/changelog
index 5f1af9b1..9bbb7de2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,11 @@
git-buildpackage (0.2.2) git-buildpackage; urgency=low
- * UNRELEASED
- * git-buildpackage: add --git-verbose option
+ * git-import-dsc: don't fail if the dsc is a plain filename without a
+ directory component
+ * git-buildpackage: add --git-verbose option
+ * git-import-{orig,dsc}: allow to set the name of the upstream branch
- -- Guido Guenther <agx@sigxcpu.org> Thu, 28 Sep 2006 14:13:46 +0200
+ -- Guido Guenther <agx@sigxcpu.org> Fri, 29 Sep 2006 19:08:08 +0200
git-buildpackage (0.2.1) git-buildpackage; urgency=low
diff --git a/git-import-dsc b/git-import-dsc
index abc10cc8..b32420e0 100755
--- a/git-import-dsc
+++ b/git-import-dsc
@@ -51,16 +51,19 @@ class DscPackage(object):
continue
m=self.pkgre.match(line)
if m:
- self.pkg= m.group('pkg')
+ self.pkg = m.group('pkg')
continue
m=self.tarre.match(line)
if m:
- self.tgz= os.path.dirname(dscfile)+'/'+m.group('tar')
+ dir=os.path.dirname(dscfile)
+ if len(dir):
+ dir+='/'
+ self.tgz = dir+m.group('tar')
continue
f.close()
-def import_upstream(src, dirs):
+def import_upstream(src, dirs, upstream_branch):
try:
unpackTGZ=UnpackTGZ(src.tgz, dirs['tmp'])
unpackTGZ()
@@ -77,7 +80,7 @@ def import_upstream(src, dirs):
gitCommitAll(msg="Imported upstream version %s" % (src.upstream_version,))
gitTag(src.upstream_version)
if not src.native:
- GitBranch()('upstream')
+ GitBranch()(upstream_branch)
except CommandExecFailed:
print >>sys.stderr,"Creation of git repository failed"
RemoveTree(unpackTGZ.dir)()
@@ -114,6 +117,8 @@ def main(argv):
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False,
help="verbose command execution")
+ parser.add_option("--upstream-branch", dest="upstream_branch", default='upstream',
+ help="name of the upstream branch, default is 'upstream'")
(options, args) = parser.parse_args()
if options.verbose:
@@ -125,7 +130,7 @@ def main(argv):
src=DscPackage(args[0])
dirs['tmp']=os.path.abspath(tempfile.mkdtemp(dir='.'))
- if import_upstream(src, dirs):
+ if import_upstream(src, dirs, options.upstream_branch):
return 1
os.chdir(dirs['top'])
if not src.native:
diff --git a/git-import-orig b/git-import-orig
index 642f9b72..e1e50f13 100755
--- a/git-import-orig
+++ b/git-import-orig
@@ -26,11 +26,6 @@ from optparse import OptionParser
from git_buildpackage import *
from git_buildpackage.utils import is_repository_clean
-# Used GIT Commands
-gitCheckoutUpstream=GitCheckoutBranch('upstream')
-gitCheckoutMaster=GitCheckoutBranch('master')
-gitShowBranch=GitShowBranch()
-gitPullUpstream=GitPull('.', 'upstream')
def cleanupTmpTree(tree):
RemoveTree(tree)()
@@ -60,8 +55,17 @@ def main():
help="Upstream Version")
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False,
help="verbose command execution")
+ parser.add_option("--upstream-branch", dest="upstream", default='upstream',
+ help="name of the upstream branch, default is 'upstream'")
+ parser.add_option("--debian-branch", dest='debian', default='master',
+ help="name of the branch the debian being package is developed on, default is 'master'")
(options, args) = parser.parse_args()
+ gitCheckoutUpstream=GitCheckoutBranch(options.upstream)
+ gitCheckoutMaster=GitCheckoutBranch(options.debian)
+ gitShowBranch=GitShowBranch()
+ gitPullUpstream=GitPull('.', options.upstream)
+
if options.verbose:
Command.verbose = True