Is there an easy way to find the svn revno for revisions I commit with bzr?

Asked by Francis Devereux

I often need to know the svn revno of a revision that I have committed using bzr svn, for example so that I can tell my non-bzr-using colleagues "I fixed that in svn r12345".

When I do "bzr log -v" I see a "svn revno:" field for revisions that were committed directly to svn, but not for revisions that I committed using bzr. I'm working around this at the moment by using "svn log svn+ssh://<repo-url>" to find the revno of my change but this is slow and a bit cumbersome (because the svn URL is long). Is there a better way for me to find out the svn revno of my commits?

I'm using bzr-svn svn 1.1.0 and bzr 2.4.1.

Thanks,

Francis

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Subversion Plugin Edit question
Assignee:
No assignee Edit question
Solved by:
Jelmer Vernooij
Solved:
Last query:
Last reply:
Revision history for this message
Best Jelmer Vernooij (jelmer) said :
#1

On Tue, 2011-10-25 at 15:55 +0000, Francis Devereux wrote:
> New question #176181 on Bazaar Subversion Plugin:
> https://answers.launchpad.net/bzr-svn/+question/176181
>
> I often need to know the svn revno of a revision that I have committed
> using bzr svn, for example so that I can tell my non-bzr-using
> colleagues "I fixed that in svn r12345".
>
> When I do "bzr log -v" I see a "svn revno:" field for revisions that
> were committed directly to svn, but not for revisions that I committed
> using bzr. I'm working around this at the moment by using "svn log
> svn+ssh://<repo-url>" to find the revno of my change but this is slow
> and a bit cumbersome (because the svn URL is long). Is there a better
> way for me to find out the svn revno of my commits?
"bzr log" directly against the Subversion repository should show the
subversion revision number of all commits.

Cheers,

Jelmer

Revision history for this message
Francis Devereux (frankoid) said :
#2

Hi Jelmer,

When I got your answer yesterday I thought I would still have to type "bzr log svn+ssh://<long-repo-url>", which is a bit cumbersome. However I've just realised that if the svn repo is set up as my bzr branch's push location then I can just do "bzr log :push" :-)

Thanks,

Francis

Revision history for this message
Francis Devereux (frankoid) said :
#3

Thanks Jelmer Vernooij, that solved my question.

Revision history for this message
Ryan Thomas (ryan-thomas) said :
#4

"bzr log" directly against the repository does work, but it impacts using bzr when offline. Is there a way you can get the svn revno when disconnected?

Revision history for this message
Jelmer Vernooij (jelmer) said :
#5

On Wed, Mar 21, 2012 at 03:25:46PM -0000, Ryan Thomas wrote:
> Question #176181 on Bazaar Subversion Plugin changed:
> https://answers.launchpad.net/bzr-svn/+question/176181
>
> Ryan Thomas posted a new comment:
> "bzr log" directly against the repository does work, but it impacts
> using bzr when offline. Is there a way you can get the svn revno when
> disconnected?
Only for the revisions that were pulled in from SVN, not those that
originated in Bazaar.

The reason for this is that Bazaar revisions are immutable, and at the
time the revision is created, it is not yet present in Subversion.
Related to that, bzr revisions can be pushed into multiple Subversion
repositories, so there isn't necessarily a single svn revno associated
with it.

That said, it would be possible to keep a lookup table somewhere (in
the bzr source branch, perhaps?) which remembers where in SVN
particular bzr revisions have been pushed to. "bzr log" (or something
else) could then show that information.

Cheers,

Jelmer