diff options
author | Guido Guenther <agx@sigxcpu.org> | 2007-06-08 16:51:04 +0200 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2007-06-08 16:51:04 +0200 |
commit | 6e38b0373a9fc9500d589dd74353441f4f725939 (patch) | |
tree | 2e18ab91dc51dee803ccbc5d46a34317e9a2e86d | |
parent | e8348a167dc7687ce079d49dab386aad6b278126 (diff) | |
download | git-buildpackage-6e38b0373a9fc9500d589dd74353441f4f725939.tar.gz git-buildpackage-6e38b0373a9fc9500d589dd74353441f4f725939.tar.bz2 git-buildpackage-6e38b0373a9fc9500d589dd74353441f4f725939.zip |
print a sensible error message, when a git repository isn't a debian source package
-rwxr-xr-x | git-buildpackage | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-buildpackage b/git-buildpackage index 550d36b0..6817a820 100755 --- a/git-buildpackage +++ b/git-buildpackage @@ -50,6 +50,7 @@ def create_orig(cp, output_dir, branch): def main(argv): output_dir = '..' + changelog = 'debian/changelog' args = [ arg for arg in argv[1:] if arg.find('--git-') == 0 ] dpkg_args = [ arg for arg in argv[1:] if arg.find('--git-') == -1 ] @@ -105,7 +106,9 @@ def main(argv): print >>sys.stderr, "You are not on branch '%s' but on '%s'" % (options.debian_branch, branch) raise GbpError, "Use --git-ignore-new to ignore or --git-debian-branch to set the branch name." - cp = parse_changelog('debian/changelog') + cp = parse_changelog(changelog) + if not cp: + raise GbpError,"'%s' does not exist, not a debian package" % changelog if not is_native(cp) and not has_orig(cp, output_dir): print "%s does not exist, creating from branch '%s'" % (orig_file(cp), options.upstream_branch) if not repo.has_branch(options.upstream_branch): |