diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-02-11 18:03:43 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-02-11 18:14:18 +0100 |
commit | 23c534db7d0f5431597c765b7decb06cc153c6ca (patch) | |
tree | 1f1828e0af0f6062b8607fede4d2ed7c04f08364 | |
parent | c69e2aa99844ab089f821ab687eb477441c48975 (diff) |
Move no_upstream_branch message into gbp.config
Git-Dch: Ignore
-rw-r--r-- | gbp/config.py | 6 | ||||
-rwxr-xr-x | git-import-orig | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/gbp/config.py b/gbp/config.py index 00b8dbc..103920e 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -13,6 +13,12 @@ except ImportError: gbp_version = "[Unknown version]" import gbp.tristate +no_upstream_branch_msg = """ +Repository does not have branch '%s' for upstream sources. If there is none see +file:///usr/share/doc/git-buildpackage/manual-html/gbp.import.html#GBP.IMPORT.CONVERT +on howto create it otherwise use --upstream-branch to specify it. +""" + def expand_path(option, opt, value): value = os.path.expandvars(value) return os.path.expanduser(value) diff --git a/git-import-orig b/git-import-orig index 391c5ee..2f5553c 100755 --- a/git-import-orig +++ b/git-import-orig @@ -35,7 +35,7 @@ from gbp.deb import (parse_changelog, unpack_orig, repack_orig, packagename_msg, is_valid_upstreamversion, upstreamversion_msg) from gbp.git import (FastImport, GitRepositoryError, GitRepository, build_tag) -from gbp.config import GbpOptionParser, GbpOptionGroup +from gbp.config import GbpOptionParser, GbpOptionGroup, no_upstream_branch_msg from gbp.errors import (GbpError, GbpNothingImported) import gbp.log @@ -296,11 +296,7 @@ def main(argv): turn_off_fastimport(options, "Fast importing into empty archives not yet supported.") if not repo.has_branch(options.upstream_branch) and not is_empty: - gbp.log.err(""" -Repository does not have branch '%s' for upstream sources. If there is none see -file:///usr/share/doc/git-buildpackage/manual-html/gbp.import.html#GBP.IMPORT.CONVERT -on howto create it otherwise use --upstream-branch to specify it. -""" % options.upstream_branch) + gbp.log.err(no_upstream_branch_msg % options.upstream_branch) raise GbpError # Guess defaults for the package name and version from the |