'bzr diff' should include file revision numbers

Bug #443435 reported by Frédéric Buclin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
Declined for 2.0 by Martin Pool
Declined for 2.1 by Martin Pool
Breezy
Triaged
Low
Unassigned

Bug Description

In Bugzilla, we have a feature which displays a patch with any given number of context lines, independently of the original number of context lines included in the patch (usually 3). For patches generated by 'cvs diff' we do this thanks to the revision number of the files included in the patch, and then get the files with these specific revision numbers. When the patch is generated using 'bzr diff', no revision number is included in the patch:

=== modified file 'process_bug.cgi'
--- process_bug.cgi 2007-10-12 07:21:59 +0000
+++ process_bug.cgi 2007-11-25 18:58:35 +0000
@@ -1223,6 +1223,10 @@
....

This means we have no easy way to know which revision numbers the patch was generated against and this makes us hard to know which original files to download (a workaround is to use the timestamp included in the headers, and to do a 'bzr cat -r date:', but that's not ideal). To be able to handle patches generated by Bazaar the same way as we do with CVS, we need this information by default when a patch is generated by 'bzr diff'.

Tags: diff
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 443435] [NEW] 'bzr diff' should include file revision numbers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frédéric Buclin wrote:
> Public bug reported:
>
> In Bugzilla, we have a feature which displays a patch with any given
> number of context lines, independently of the original number of context
> lines included in the patch (usually 3). For patches generated by 'cvs
> diff' we do this thanks to the revision number of the files included in
> the patch, and then get the files with these specific revision numbers.
> When the patch is generated using 'bzr diff', no revision number is
> included in the patch:
>
> === modified file 'process_bug.cgi'
> --- process_bug.cgi 2007-10-12 07:21:59 +0000
> +++ process_bug.cgi 2007-11-25 18:58:35 +0000
> @@ -1223,6 +1223,10 @@
> ....
>
> This means we have no easy way to know which revision numbers the patch
> was generated against and this makes us hard to know which original
> files to download (a workaround is to use the timestamp included in the
> headers, and to do a 'bzr cat -r date:', but that's not ideal). To be
> able to handle patches generated by Bazaar the same way as we do with
> CVS, we need this information by default when a patch is generated by
> 'bzr diff'.
>

It might be reasonable to add this as 'bzr diff --show-ids', which is
how some of the other commands deal with this.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrKUk4ACgkQJdeBCYSNAAN2sACfe6RqZRRwCjN+xYcd4wVRfIu1
Z+IAn3RU215xK5SjoDgMmfjxY6LpnlgV
=nHy3
-----END PGP SIGNATURE-----

Revision history for this message
Martin Pool (mbp) wrote :

I'm declining this for the bugfix-only 2.0 and 2.1 series because this would clearly be a new feature.

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Mathias Brodala (mathbr) wrote :

Since version 2.2 is about to be released, how is the status on this one? It could prove really handy since it lets the user know which revision is required beforehand.

Revision history for this message
Andrew Bennetts (spiv) wrote :

Mathias: no-one has started work on this (or if they have, they haven't updated the bug). It probably is fairly straightforward, so if you are interested working on a patch that would probably be faster than waiting for someone else to do it :)

As always, we'd be happy to help (by guiding you to the relevant part of the code, reviewing patches, answering questions about APIs, etc).

There's still time to get this into 2.2, I think.

Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Low
tags: added: diff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.