by wscott · 2y ago · 0 comments
<<<<<<< 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);
>>>>>>>
Here we have a code conflict and rather than showing you what the file looks like on the two sides it shows you what was changed on both sides relative to the GCA. So we get two unified diffs. The local side made this edit, while on the remote side we had that edit. Then it is obvious how to resolve the conflict without losing a change.This works for the cris-cross case because that GCA is really a set of common revisions merged together.
<<<<<<< HEAD
sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, s->proj);
assert(HASGRAPH(sc));
sccs_sdelta(sc, sccs_ino(sc), file);
||||||| merged common ancestors
sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, s->proj);
assert(sc->tree);
sccs_sdelta(sc, sc->tree, file);
=======
sc = sccs_init(file, INIT_NOCKSUM|INIT_SAVEPROJ, p);
assert(sc->tree);
sccs_sdelta(sc, sc->tree, file);
>>>>>>> c4892343......
That contains the same information, but you have to parse it yourself and it is not nearly as fast to see what changed.However, it is faster to edit since you don't need to remove the diff markers.
That's right. Here's an example I wrote up:
Your wish will be answered; I wanted a conflict-aware format, and I will definitely plunder the smerge format.