diff options
author | Guido Guenther <agx@sigxcpu.org> | 2007-05-20 02:29:19 +0200 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2007-05-20 02:29:19 +0200 |
commit | f63599a3fe0924c6545587c0a2450fbd9ee4113b (patch) | |
tree | e82ad8ad42fb2c74076860eb96368af65f1bb2a5 /git-import-orig | |
parent | 20fddd876cc2621d31dab4c99ea3e27827c79aee (diff) | |
download | git-buildpackage-f63599a3fe0924c6545587c0a2450fbd9ee4113b.tar.gz git-buildpackage-f63599a3fe0924c6545587c0a2450fbd9ee4113b.tar.bz2 git-buildpackage-f63599a3fe0924c6545587c0a2450fbd9ee4113b.zip |
allow to import an already unpacked source tree
Diffstat (limited to 'git-import-orig')
-rwxr-xr-x | git-import-orig | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/git-import-orig b/git-import-orig index 0a4cbc9d..a7105af6 100755 --- a/git-import-orig +++ b/git-import-orig @@ -125,11 +125,14 @@ create it otherwise use --upstream-branch to specify it. print >>sys.stderr, "Repository has uncommitted changes, commit these first: " raise GbpError, out - tmpdir = unpack_orig(archive) - if options.verbose: - print "Unpacked orig to %s" % tmpdir - orig_dir = glob.glob(tmpdir+'/*')[0] - + if os.path.isdir(archive): + orig_dir = archive + else: + tmpdir = unpack_orig(archive) + if options.verbose: + print "Unpacked orig to %s" % tmpdir + orig_dir = glob.glob(tmpdir+'/*')[0] + try: print "Importing %s to upstream branch..." % archive gitCheckoutUpstream() |