From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] OT - CVS-like merge for dumpfs / relica with sources
Date: Tue, 26 Nov 2002 12:44:11 +0000 [thread overview]
Message-ID: <a02916ff58c22a54c3cfbe87601984ee@vitanuova.com> (raw)
[-- 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
}
next reply other threads:[~2002-11-26 12:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-26 12:44 rog [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-27 0:11 Geoff Collyer
2002-11-26 12:08 steve.simon
2002-11-26 13:40 ` Lucio De Re
2002-11-26 15:55 ` andrey mirtchovski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a02916ff58c22a54c3cfbe87601984ee@vitanuova.com \
--to=rog@vitanuova.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).