Lobbying for -p1 diffs

Goffredo Baroncelli kreijack at alice.it
Tue Feb 28 23:34:40 GMT 2006


On Tuesday 28 February 2006 15:19, John Arbash Meinel wrote:
> Michael Ellerman wrote:
> > On 2/28/06, Wouter van Heyst <larstiq at larstiq.dyndns.org> wrote:
> >> On Mon, Feb 27, 2006 at 01:12:04PM +1100, Michael Ellerman wrote:
> >>> On 2/27/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
> >>>> Michael Ellerman wrote:
> >>>>> Hi guys,
> >>>>>
> >>>>> I just thought I'd pipe up once more before 0.8 freezes, and lobby for
> >>>>> diff producing -p1 format diffs.
> >>>> What are your preferred prefixes then? 'mod/' and 'orig/'?
> >>> I'd prefer branch-nick.org and branch-nick, eg:
> >>>
> >>> --- work.orig/arch/powerpc/kernel/setup-common.c
> >>> +++ work/arch/powerpc/kernel/setup-common.c
> >> Hmm, will branch nick work with "Aaron's integration" type nicks?
> >> +1 on using -p1, just need to figure out sensible labels.
> > 
> > You're right, I forgot you could set branch nick to something
> > arbitrary. With a nick like that it definitely wouldn't work, or at
> > least you might be able to make patch accept it with appopriate
> > escapes, but it'd look horrible, so that'd suck.
> > 
> > For the moment we can just use a/ b/ or orig/ mod/, the point is to
> > make it -p1 before 0.8, we can retrofit nicks later if we can work out
> > how to do it nicely.
> > 
> > cheers
> 
> Well, you could always just make it the last component of
> WorkingTree.basedir/Branch.base. Those have to be a valid path.
> 
> If I read what you had correctly, you want to use
> 
> SOMETHING.orig/path/inside/branch
> SOMETHING/path/inside/branch
> 


what about changing the diff header to something like

	diff -r <revplus> -r <revminus>
	--- a/path/inside/branch 
	+++ b/path/inside/branch
	[...]

where
	revplus		-> nick/rev_id
	revminus	-> nick/rev_id

or whatever you want, so you can highlight:
- the branch nickname/path
- the revision which you want diff

example:


	diff -r mybranchnick/abentley at panoramicfeedback.com-20060224161241-7875e2e8984975dd \
             -r myforkbranch/erik at bagfors.nu-20060224151736-92b72bcee550c0a3
	--- a/bzrlib/commands.py
	+++ b/bzrlib/commands.py
	@@ -573,8 +573,6 @@
        	 from bzrlib.plugin import disable_plugins
	         disable_plugins()
	[...]

Goffredo

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack AT inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9




More information about the bazaar mailing list