diff options
author | Guido Guenther <agx@sigxcpu.org> | 2006-12-22 17:51:33 +0100 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2006-12-22 17:51:33 +0100 |
commit | 62af3b51357f13584f1c8901c088280599c9ba81 (patch) | |
tree | 537825931df550f09c91e967aed8afbe33a52c3a /git-import-orig | |
parent | 8eadd9e525664b95ad58516cb3ad02ba6d544d73 (diff) |
git-import-orig: improve error message when the upstream branch cannot be found.
We cannot create the branch automatically since on repositories not created by
git-import-dsc it's not clear where to branch from. (Closes: #403990)
While doing that also remove pointless patch arguments from most of the git
helper functions
Minor doc updates
Diffstat (limited to 'git-import-orig')
-rwxr-xr-x | git-import-orig | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/git-import-orig b/git-import-orig index 2edbd59..1a187a7 100755 --- a/git-import-orig +++ b/git-import-orig @@ -89,6 +89,14 @@ def main(argv): print >>sys.stderr,"%s is not a git repository" % (os.path.abspath('.'),) return 1 + if not has_branch(options.upstream): + print >>sys.stderr, """ +Repository does not have branch '%s' for upstream sources. If there is none see +/usr/share/doc/git-buildpackage/manual-html/gbp.import.convert.html on howto +create it otherwise use --upstream-branch to specify it. +""" % options.upstream + return 1 + if options.version: version = options.version else: @@ -100,7 +108,7 @@ def main(argv): parser.print_help() return 1 - (ret, out) = is_repository_clean('.') + (ret, out) = is_repository_clean() if not ret: print >>sys.stderr, "Repository has uncommitted changes, commit them first: " print >>sys.stderr, out @@ -109,12 +117,13 @@ def main(argv): tmpdir = unpackOrig(tgz) if not tmpdir: return 1 - else: - print "Unpacked orig to %s" % (tmpdir, ) + else: + if options.verbose: + print "Unpacked orig to %s" % tmpdir origdir=glob.glob(tmpdir+'/*')[0] try: - print "Importing %s to upstream branch..." % (tgz,) + print "Importing %s to upstream branch..." % tgz gitCheckoutUpstream() gitShowBranch() GitLoadDirs()(origdir) |