On Mon, Jan 17, 2011 at 10:01:46PM -0600, Jonathan Nieder wrote: > Package: git-buildpackage > Version: 0.5.17 > > Trying to import history of a Debian package from a git clone > of the upstream repo: > > $ git import-dsc ../source-libwpd/libwpd_0.7.2-1.dsc > gbp:info: Tag upstream/0.7.2 not found, importing Upstream tarball > fatal: Needed a single revision > gbp:error: Git command failed: can't find SHA1 for upstream > > Two problems: > > 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. If not please reopen. Cheers, -- Guido > > import-orig gives a friendlier message: > > $ git import-orig ../source-libwpd/libwpd_0.7.2.orig.tar.gz > gbp:error: > Repository does not have branch 'upstream' 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. > > Side note: instead of an upstream/0.7.2 tag, this repo has > > LIBWPD-0-8-0 > LIBWPD-0-8-2 > RELEASE-0-3-0 > [...] > RELEASE-0-6-3 > RELEASE-0-7-1 > RELEASE-0-7-2 > [...] > RELEASE-0-9-0 > libwpd-0-6-2 > release-0-7-0 > release-0-8-1 > start > > Patch to somewhat mitigate (1) follows. It might also make sense to > use --quiet unconditionally. > -- 8< -- > Subject: Use terminology more consistent with git > > When an operation fails due to an unexpectedly absent git > rev, gbp writes > > fatal: Needed a single revision > gbp:error: Git command failed: can't find SHA1 for upstream > > At first glance it is not obvious that these two messages > have much to do with each other. Follow the git terminology: > > fatal: Needed a single revision > gbp:error: Git command failed: revision 'upstream' not found > > to make what happened a little clearer. > --- > diff --git a/gbp/git.py b/gbp/git.py > index 9fac3ba..26e2728 100644 > --- a/gbp/git.py > +++ b/gbp/git.py > @@ -331,7 +331,7 @@ def rev_parse(self, name, quiet=False): > args.insert(0, "--quiet") > sha, ret = self.__git_getoutput('rev-parse', args) > if ret: > - raise GitRepositoryError, "can't find SHA1 for %s" % name > + raise GitRepositoryError, "revision '%s' not found" % name > return sha[0].strip() > > def write_tree(self, index=None): > > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org