[Top][All Lists]

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

Re: [Monotone-devel] nvm.resolve_conflicts ready to land on mainline

From: Stephen Leake
Subject: Re: [Monotone-devel] nvm.resolve_conflicts ready to land on mainline
Date: Sun, 16 Nov 2008 20:04:04 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Tero Koskinen <address@hidden> writes:

> On Sat, 08 Nov 2008 14:25:55 -0500 Stephen Leake wrote:
>> Tero Koskinen <address@hidden> writes:
>> > However, it tooks quite a lot of commands to get
>> > two revisions with conflicts merged. 
>> Was it more comfortable than the standard "here's another file to
>> merge" approach?
> Yes. The conflicts command set is definately an improvement over
> the current situation.

Ok, good.

>> <snip examples of Darcs, mergemaster>
> Ideally, something like "mtn merge --interactive" would start
> the conflict resolution menu system.
> An example of interactive merge could be something like this:
> $ mtn explicit_merge --interactive c564266d6f0... 057862d149f09a4...
> mtn: [left]  c564266d6f0ec9d2591ca4b5052cfd531e047330
> mtn: [right] 057862d149f09a4b288a30f854c04f79e2922940
> mtn: content conflict in test/tester.adb
> mtn: possible resolutions:
> mtn: [1] resolve_first interactive "file_name"
> mtn: [2] resolve_first user "file_name"
> mtn: How to resolve this conflict? 2
> mtn: What is the file name? test/tester.adb
> mtn: executing external editor "vim" for file "test/tester.adb"
> mtn: all conflicts resolved
> mtn: replacing content of test/tester.adb, test/tester.adb with 
> test/tester.adb
> mtn: [merged] 3f2ef9d43da99d96c21779abd6f9a79354dab126
> $
> (Using *exactly* this kind of ui/sequence might not make
>  sense, but I assume one can get the idea).

You might be able to program this in Lua, in the merge hook.

>> > A patch below makes the interactive command to use the name
>> > of the conflicting file by default if no name is given.
>> There are two files, one from each revision. You arbitarily choose
>> the left, when the user might want the right one. I don't think it's a
>> good idea to default this.
> My main point was that "mtn conflicts resolve_first interactive" should
> not need the filename as its parameter. Instead, monotone can
> generate the filename for the command. Probably randomly generated name is
> better than the name from the left side.

Ah, I see. Yes, a random name could be generated. But (in my system,
with my mtn hook settings), this will run emacs ediff. I prefer
meaningful file names in that case, and you don't want to default to
an existing file.

I suppose the filename could be optional; use a random one if none

I think that's the kind of tweaking that can be done after merging to
main, and after more people get more experience with this.

I'll merge this into main next weekend, if no other objections crop up.

-- Stephe

reply via email to

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