Hi Guido, Guido Günther wrote: > On Mon, Jan 17, 2011 at 10:01:46PM -0600, Jonathan Nieder wrote:
>> 1) the error message from rev-parse --verify is not so useful. >> 2) it's not clear to me why git-buildpackage wants the >> 'upstream' rev in the first place. Couldn't it create >> the branch itself? > > I've added a --create-missing-branches option to git to cope with > another case: importing via git-import-dscs an archive that switches > from Debian only to upstream + debian .diff.gz. I think that should help > with your issue too. Sounds interesting. I don't think that would work here, since that makes the upstream branch branch from current HEAD, no? I suspect this particular bug (user confusion trying import-dsc for the first time) might be better solved with something like the following. The help string is stolen from git-import-orig. Probably the message should go in a module to simplify maintenance but I'm not sure which one --- gbp.config, maybe? Thanks for a reminder. --- diff --git a/git-import-dsc b/git-import-dsc index d537ad6..f248046 100755 --- a/git-import-dsc +++ b/git-import-dsc @@ -275,6 +275,14 @@ def main(argv): if not repo.has_branch(branch) and options.create_missing_branches: gbp.log.info("Creating missing branch '%s'" % branch) repo.create_branch(branch) + if not repo.has_branch(branch): + 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. +""" % branch) + raise GbpError + commit = repo.commit_dir(unpack_dir, "Imported %s" % msg, branch) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org