gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] merge conflicts


From: John Meinel
Subject: Re: [Gnu-arch-users] merge conflicts
Date: Thu, 07 Oct 2004 22:03:01 -0500
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)

Zenaan Harkness wrote:
The wiki says:

"Handling conflicts
You can use the --three-way or -t option to star-merge to save merge
conflicts as diff3 conflict markers, in way similar to what CVS does.
More generally, some editors have facilities to Process *.rej files.
This is more general because star-merge is only applicable when merging
revisions which share a common ancestor."


Is it possible to get merges done with conflicts in the same way as
Aegis provides? It's been 2.5-3 years, but I'll explain my memory of it:

Aegis would create a file, based on the two input files (pristine,
changed), which was a full file that contained diff sections (when there
were conflicts) such as:

...
  normal lines within the file
...
<<< LINE NUMBER
  old
  lines
===
  new
  lines

...

or something like that. The point being, that because the conflicted
diff sections were embedded in the full file, and therefore the file
obviously wouldn't compile, all one had to do was open the file that
didn't compile, and manually cut/change the conflict sections, one by
one, then save the file, and hope it compiled properly this time.

This was a very simple way to fix conflicts, not requiring any special
diff/merge tools - just open the file in your favourite editor, and
there in the file were the old and new (conflicting) sections, amongst
the rest of the file.

Really easy to see what's going on.

Really easy to choose (or change) the bits that need fixing.

Really easy to just save when done, and recompile/test afterwards.

It might just be the right combination of piping commands already, but
I'd be greateful if someone can show me how to achieve this. It's
something I consider "Just Works" in a good way, is easy to explain to
others, doesn't require special tools, etc.

tia
zen


tla has this. It's called 'tla star-merge --three-way'

The reason it isn't the default is that it is really easy to commit one of these conflicted files, which is *not* what you want to do.

In CVS it will show a conflict the first time you update. After that, you have to guess which files are corrupted, and make sure you get all the lines that need fixing. (You could grep I suppose...) Instead, tla patches as best it can, and then leaves .rej files around to make it obvious what files are incomplete.

But as I mentioned tla star-merge --three-way should do what you want.

IIRC, you can even use it as a replacement for update. So in a modified project where you don't have the latest version

tla star-merge --three-way

Should bring you up to date, and leave inline conflict markers.

John
=:->

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]