Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given two branches, branchA and branchB, is there a syntax for comparing arbitrary revision X of branchA with Y of branchB?

For example:

cd /path/to/branchA
bzr diff --new /path/to/branchB -rX

This will show the differences between revision X of branchA and the HEAD of branchB. Is there a syntax to compare against revision Y of branchB instead of the HEAD?

As a workaround I can create a new branch branchB-Y using -rY and then diff against that branch instead of branchB, but I would like to be able to diff directly without creating such temporary branches.

share|improve this question
up vote 1 down vote accepted

You can specify the path to the branch of the revision by appending a : and the path:

cd /path/to/branchA
bzr diff --new /path/to/branchB -rX..Y:/path/to/branchB

I just tried it out:

$ bzr diff --new ../checkout -r2..2:../checkout
=== modified file 'x'
--- x   2013-03-12 17:28:11 +0000
+++ x   2013-03-12 17:26:47 +0000
@@ -1,1 +1,1 @@

See bzr help revisionspec for more information (it's hidden in the revno: section).

share|improve this answer
Wow. Good stuff. To improve the quality of your answer though, it would have been great if you also pointed out whereabouts this was in bzr help revisionspec, it's not exactly easy to find. (It's in the explanation of the revno: selector.) But hey thanks! – janos Mar 12 '13 at 18:35
@Janos: Yeah I thought about that, will do that now :) – AmanicA Mar 12 '13 at 21:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.