[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: Binary Diff System in Arch
From: |
Martin Pool |
Subject: |
Re: [Gnu-arch-users] Re: Binary Diff System in Arch |
Date: |
Fri, 6 Feb 2004 11:55:47 +1100 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On 5 Feb 2004, Tom Lord <address@hidden> wrote:
> Leaving those files is a fine idea and easy to do -- but xdiff3
> shouldn't do that itself. As a stand-alone tool, it would be silly
> for xdiff3 to leave those files: the user has provided the three files
> as input in the first place.
Right.
> arch should be the one to store those three files in project trees
> (which is a pretty trivial change). In this case, it's arch, not the
> user, that has the files on-hand.
>
> I think there are four distinct behaviors that would be useful from
> tla (when doing 3-way merges):
>
> ~ default
>
> Text files: arch just leaves conflict markers (if any) in the
> merged-into file and creates a ".rej" file that says "Hey, there
> are conflict markers in that file.
>
> Binary files: arch can, indeed, leave the three files and create
> a ".rej" file that says "binary merge conflicts occurred".
>
>
> ~ --no-markers
>
> All files: do the merges that are conflictless. If a merge would
> have conflicts, leave the merged-into unmodified and store all
> three files. Store a ".rej" that says: "merge would have
> conflicts".
>
>
> ~ --no-inexact
>
> All files: if the merged-to file matches the ancestor precisely,
> replace it with merged-from. Otherwise, leave the three files
> and a .rej that says "merge needed".
>
>
> ~ --merge-data-only
>
> All files: leave the three files. Leave merged-to unmodified.
> Make .rej that says "merge needed".
Perhaps there should be a separate tool that transforms a file plus
rejects into a file with conflict sections, and vice versa. (In fact,
that would be pretty useful just for working with patches in general.
I wonder if it exists?)
There seem to be a few orthogonal variables here:
- allow fuzzy merges?
- insert conflict markers in text files?
I think it is harmless to always try the merge: if the user or GUI
doesn't like the result they can always discard it and redo it from
the three basis files. Perhaps the easily-parsed output from the
attempted merge should make it clear whether the patch was exact,
approximate, or (partially) failed.
So the big question is, would you rather have cvs-style conflict
markers, or leftover chunks in a .rej file? I think the user-visible
option ought to address this question directly: perhaps
--conflicts=markers or --conflicts=reject.
> (It's more obvious that xpatch should store the xdelta-diff in the
> .rej file. I agree it will not _often_ be useful but sometimes it
> will be. For example, I might have an editor-backup file to which it
> applies cleanly.)
Good point.
--
Martin
signature.asc
Description: Digital signature
- Re: [Gnu-arch-users] Binary Diff System in Arch, (continued)