9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] OT -  CVS-like merge for dumpfs / relica with sources
@ 2002-11-27  0:11 Geoff Collyer
  0 siblings, 0 replies; 5+ messages in thread
From: Geoff Collyer @ 2002-11-27  0:11 UTC (permalink / raw)
  To: 9fans

I use idiff(1).  It's not automatic, but it's simple and easy.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] OT -  CVS-like merge for dumpfs / relica with sources
  2002-11-26 12:08 steve.simon
  2002-11-26 13:40 ` Lucio De Re
@ 2002-11-26 15:55 ` andrey mirtchovski
  1 sibling, 0 replies; 5+ messages in thread
From: andrey mirtchovski @ 2002-11-26 15:55 UTC (permalink / raw)
  To: 9fans

dpx@lanl ported patch and diffutils to P9:

http://www.acl.lanl.gov/plan9/unix/patch-2.5.4.tar
http://www.acl.lanl.gov/plan9/unix/diffutils-2.7.tar

the downloads are rather big, though...

hope that helps, andrey


On Tue, 26 Nov 2002 steve.simon@snellwilcox.com wrote:

> Hi,
>
> Any ideas on a script to do a CVS like merge of two
> incompatable versions (overlapping changes)
> of a file in the dump filesystem.
>
> I assume this is fairly easy using just diff/awk/sed etc
> but I cannot see how to do it...
>
> This would also be handy when doing a replica only to discover that
> "the labs" (tm) has fixed parts of a file you are also working on and you
> want to merge their changes with yours...
>
> -Steve
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] OT -  CVS-like merge for dumpfs / relica with sources
  2002-11-26 12:08 steve.simon
@ 2002-11-26 13:40 ` Lucio De Re
  2002-11-26 15:55 ` andrey mirtchovski
  1 sibling, 0 replies; 5+ messages in thread
From: Lucio De Re @ 2002-11-26 13:40 UTC (permalink / raw)
  To: 9fans

On Tue, Nov 26, 2002 at 12:08:12PM +0000, steve.simon@snellwilcox.com wrote:
>
> Any ideas on a script to do a CVS like merge of two
> incompatable versions (overlapping changes)
> of a file in the dump filesystem.
>
I'm busy building a CVS repository (two, in fact, but the one with 2nd
Edition source code will be closed to the public :-) of 3rd Edition
and 4th Edition Plan 9 source code.  Unfortunately, I'll have missed a
series of updates to sources by the time everything is in place, but
perhaps there's a dump9660 somewhere to minimise the loss.

It's a lenghty, somewhat tedious process, but I ought to have it
online before the end of February.

If in the meantime somebody can produce a "dump" like snapshot of
sources since its inception, or even copies of the various "release"
images, I'll try to make the resolution of the CVS repository as fine
as I can.  It will definitely be a best effort exercise.

++L

PS: I'm back online after a longish absence.  I'll catch up as best I
can.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] OT -  CVS-like merge for dumpfs / relica with sources
@ 2002-11-26 12:44 rog
  0 siblings, 0 replies; 5+ messages in thread
From: rog @ 2002-11-26 12:44 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

> Any ideas on a script to do a CVS like merge of two
> incompatable versions (overlapping changes)
> of a file in the dump filesystem.

i use the gnu version of diff3, and a little script called "merge"
(which i've attached).

then when i've made changes on my home laptop that
i want to merge in with the current source, i use (e.g.)

	merge -n 5 /n/kfs/usr/rog/xx/*.c /usr/rog/xx

the options are exactly those taken by yesterday(1).

you have to be a little careful, as merging is not idempotent.
(but conflicts are flagged, so it's not too bad).

nigel@9fs.org did the diff3 port and suggested how to use it.
i think he's got the port.

  cheers,
    rog.

[-- Attachment #2: merge --]
[-- Type: text/plain, Size: 535 bytes --]

#!/bin/rc

fn usage {
	echo usage: merge [-n days] file.... dir
	echo '	'merge [-n days] file1 file2
}

fn domerge {
	echo gnu/diff3 -m $1 `{yesterday $opts $2} $2
	gnu/diff3 -m $1 `{yesterday $opts $2} $2 > $2.xxx
	cp $2.xxx $2 && rm $2.xxx
}

opts=()
while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 --){
	opts=($opts $1)
	shift
}
if(! ~ $#* 0 && ~ $1 --)
	shift
if(~ $#* 0 1)
	usage
if(test -d $$#*) {
	d=$$#*
	while(! ~ $#* 1) {
		domerge $1 $d/$1
		shift
	}
}
if not {
	if (! ~ $#* 2)
		usage
	domerge $1 $2
}

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] OT -  CVS-like merge for dumpfs / relica with sources
@ 2002-11-26 12:08 steve.simon
  2002-11-26 13:40 ` Lucio De Re
  2002-11-26 15:55 ` andrey mirtchovski
  0 siblings, 2 replies; 5+ messages in thread
From: steve.simon @ 2002-11-26 12:08 UTC (permalink / raw)
  To: 9fans

Hi,

Any ideas on a script to do a CVS like merge of two
incompatable versions (overlapping changes)
of a file in the dump filesystem.

I assume this is fairly easy using just diff/awk/sed etc
but I cannot see how to do it...

This would also be handy when doing a replica only to discover that
"the labs" (tm) has fixed parts of a file you are also working on and you
want to merge their changes with yours...

-Steve



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-11-27  0:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-27  0:11 [9fans] OT - CVS-like merge for dumpfs / relica with sources Geoff Collyer
  -- strict thread matches above, loose matches on Subject: below --
2002-11-26 12:44 rog
2002-11-26 12:08 steve.simon
2002-11-26 13:40 ` Lucio De Re
2002-11-26 15:55 ` andrey mirtchovski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).