[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

FW: Patch command execution

From: Billy Tanksley <btanksley_at_hifn.com>
Date: 2002-02-08 23:59:58 CET

(Ooops, I should have sent this to the list.)

From: Sean Russell [mailto:ser@germane-software.com]
>How do you want the markup to appear in the modified local
>file? I wanted to
>represent all three sets of information, so I was going to use
>a modified CVS markup:

BitKeeper just recently changed its format to do something similar.

>>>>>>>>>>> ORIGINAL
>... original file lines here
>========== REPOSITORY
>... repository version lines here
>========== LOCAL
>... local file lines here
><<<<<<<<<< END

...the difference is, Bitkeeper doesn't include the "ORIGINAL" section.
Instead, it adds diff-style "+", "-", and "!" prefixes to lines which were
added, subtracted, or changed from the original to get the conflicting
patches.

Stolen from the subversion-user list, as written by Wayne Scott:

"""
Compare this from CVS:
    <<<<<<< slib.c
                  sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, s->proj);
                  assert(HASGRAPH(sc));
                  sccs_sdelta(sc, sccs_ino(sc), file);
    =======
                  sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, p);
                  assert(sc->tree);
                  sccs_sdelta(sc, sc->tree, file);
>>>>>>> 1.642.2.1

to this from 'bk smerge'

    <<<<<<< local slib.c 1.642.1.6 vs 1.645
                  sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, s->proj);
    - assert(sc->tree);
    - sccs_sdelta(sc, sc->tree, file);
    + assert(HASGRAPH(sc));
    + sccs_sdelta(sc, sccs_ino(sc), file);
    <<<<<<< remote slib.c 1.642.1.6 vs 1.642.2.1
    - sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, s->proj);
    + sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, p);
                  assert(sc->tree);
                  sccs_sdelta(sc, sc->tree, file);
>>>>>>>
"""

As you can see, all information about the original source is preserved,
without actually having to display the original source. I'd like his format
a bit better if he supported a notation for changes "!" instead of/as well
as a notation for additions/deletions. In my hypothetical notation, the
above would be:

    <<<<<<< local slib.c 1.642.1.6 vs 1.645
                  sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, s->proj);
    ! assert(HASGRAPH(sc));
    ! sccs_sdelta(sc, sccs_ino(sc), file);
    <<<<<<< remote slib.c 1.642.1.6 vs 1.642.2.1
    ! sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, p);
                  assert(sc->tree);
                  sccs_sdelta(sc, sc->tree, file);
>>>>>>>

As you can see, the original text is preserved.

>y'all can screw with the script and change the tags, but I'm
>not going to use
>the obtuse CVS versions; I've found they only confuse matters.
> I'd really
>like to use words that humans can understand, like the ones above.

I'm glad to hear that. I've always hated having to look back and forth to
figure out which version I was looking at.

-Billy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:05 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.