show commandline and/or rev info in diff output

Bug #130588 reported by Jari Aalto
16
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

Here is bzr diff output:

    === added file 'Makefile'
    --- Makefile 1970-01-01 00:00:00 +0000
    +++ Makefile 2007-08-05 21:38:10 +0000

I propose that an indentification like is added to the beginning of
diff to announce who generated the output. The command and options
could be added verbatim:

    bzr -r1..3 Makefile (bzr v0.18)
    === added file 'Makefile'
    --- Makefile 1970-01-01 00:00:00 +0000
    +++ Makefile 2007-08-05 21:38:10 +0000

I assume here that patch(1) will skip over the added 1st line.

FURTHER DETAILS

    I use a tool that deal with various version control sources and
    sometimes there is need to detect from which source certain patch
    comes from. E.g. Mercurial uses extra pseudo directories in output:

        --- a/Makefile.in Sun Aug 05 20:45:37 2007 +0300
        +++ b/Makefile.in Sun Aug 05 23:55:17 2007 +0300

    For a tool, it is most difficult to tell if "a/" is genuine directory
    or not and if --strip option would be needed or not during patching.

    [Martin Pool]

    Some diff tools prefix the diff with the command that generated
    it, or a cleaned-up version of the command. If we included that it
    would both indicate that it came from bazaar and maybe give some
    other useful information

    Otherwise this seems ok, as long as it's tested and optional.

    http://permalink.gmane.org/gmane.comp.version-control.bazaar-ng.general/29033

Revision history for this message
Andrew Cowie (afcowie) wrote :

Git does this, and it's good passive advertising for them. I'd recommend you throw a bzr into the diff line like they threw git into their diff line.

AfC

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Stefan Monnier (monnier) wrote : Re: show commandline in diff output

It's also worthwhile/important to include some revision-number or revision-id in this information. E.g. when I do "bzr diff -r ancestor:../trunk" I'm not always sure which revision on the trunk was used, and occasionally it's useful to have that info.

Karl Fogel (kfogel)
summary: - show commandline in diff output
+ show commandline and/or rev info in diff output
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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