dpush raises NoSuchRevision
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Git Plugin |
Fix Released
|
High
|
Jelmer Vernooij |
Bug Description
I always get NoSuchRevision when using dpush on bzr-git 0.5.2 with bzr 2.2.1 on python 2.6.6 (Linux-
An example session, from the beginning:
$ git init gitrepo
$ cd gitrepo
gitrepo$ echo "Hello world" > foo
gitrepo$ git add foo
gitrepo$ git commit -m "git: Added foo"
gitrepo$ cd ..
$ bzr branch gitrepo bzrbranch
$ cd bzrbranch
bzrbranch$ echo "Goodbye socks" >> foo
bzrbranch$ bzr ci -m "bzr: Added line to foo."
bzrbranch$ bzr log --show-ids
-------
revno: 2
revision-id: <email address hidden>
parent: git-v1:
committer: Matt Giuca <email address hidden>
branch nick: bzrbranch
timestamp: Wed 2010-11-24 21:21:38 +1100
message:
bzr: Added line to foo.
-------
revno: 1
revision-id: git-v1:
git commit: b8145f2213f4489
committer: Matt Giuca <email address hidden>
timestamp: Wed 2010-11-24 21:20:40 +1100
message:
git: Added foo
Note: At this point the bzr repo contains one git revision and one ordinary bzr revision.
bzrbranch$ bzr dpush ../gitrepo/
bzr: failed to report crash using apport:
OSError(13, 'Permission denied')
bzr: ERROR: bzrlib.
Traceback (most recent call last):
File "/usr/lib/
return the_callable(*args, **kwargs)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
return self._operation
File "/usr/lib/
self.cleanups, self.func, *args, **kwargs)
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
push_
File "/usr/lib/
note('Pushed up to revision %d.' % self.new_revno)
File "/usr/lib/
return self._lookup_
File "/usr/lib/
return self.target_
File "/usr/lib/
raise errors.
NoSuchRevision: <LocalGitBranch
bzr 2.2.1 on python 2.6.6 (Linux-
arguments: ['/usr/bin/bzr', 'dpush', '../gitrepo/']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_AU.utf8'
plugins:
bash_completion /usr/lib/
bzrtools /usr/lib/
git /usr/lib/
launchpad /usr/lib/
netrc_
news_merge /usr/lib/
rewrite /usr/lib/
svn /usr/lib/
Now from the error, it would appear that bzr-git is looking for a revision called "<email address hidden>" (that is, the revision ID which bzr gave to revision 2) in the git repository. I'm not sure why it's doing that, since the whole point of dpush is to push changes there without expecting them to arrive intact.
In any case, it seems not to matter. I *always* get this exception (unless there are no changes to push) but it *always* succeeds anyway. If I do a bzr log again, I see that it has been "dpushed" and become a standard git revision:
bzrbranch$ bzr log --show-ids
-------
revno: 2
revision-id: git-v1:
parent: git-v1:
git commit: d648b2c25ad1d50
committer: Matt Giuca <email address hidden>
timestamp: Wed 2010-11-24 21:21:38 +1100
message:
bzr: Added line to foo.
-------
revno: 1
revision-id: git-v1:
git commit: b8145f2213f4489
committer: Matt Giuca <email address hidden>
timestamp: Wed 2010-11-24 21:20:40 +1100
message:
git: Added foo
Note that revision 2 has changed its revision ID to a git one, lost its branch nick, and gained a git commit ID.
Sure enough, in git:
bzrbranch$ cd ../gitrepo/
gitrepo$ git log
commit d648b2c25ad1d50
Author: Matt Giuca <email address hidden>
Date: Wed Nov 24 21:21:38 2010 +1100
bzr: Added line to foo.
commit b8145f2213f4489
Author: Matt Giuca <email address hidden>
Date: Wed Nov 24 21:20:40 2010 +1100
git: Added foo
So it is working. It is just throwing an annoying exception too.
summary: |
- NoSuchRevision + dpush raises NoSuchRevision |
tags: | added: verified |
Changed in bzr-git: | |
milestone: | none → 0.5.3 |
status: | Fix Committed → Fix Released |
Thanks for the bug report. This is fixed in trunk.