1

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.

janos
  • 4,888

1 Answers1

1

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 @@
-aa
+zz

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

AmanicA
  • 1,749
  • 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