Question

I did an svn update from the command line on a fairly old sandbox with a few local changes. There were conflicts detected, so I saw the usual output:

Conflict discovered in 'file.cpp'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options: p

I hadn't set up my svn command line options on this computer, so my preferred method of launching meld to resolve the conflict wasn't available. Therefore I chose to postpone the conflict until I had meld set up.

I then set up meld, using a similar procedure to the one shown here.

Now, doing another svn update does not rediscover the conflict and therefore does not give me the option to launch meld. I only get an "At revision ..." shown. Is there a way to get the "Conflict discovered in ..." line again? Or is there a command to launch the 3-way meld resolver?

Était-ce utile?

La solution

According to it's documentation meld can be used as a git merge helper. A git merge helper is called like this:

When git mergetool is invoked with this tool (either through the -t or --tool option or the merge.tool configuration variable) the configured command line will be invoked with $BASE set to the name of a temporary file containing the common base for the merge, if available; $LOCAL set to the name of a temporary file containing the contents of the file on the current branch; $REMOTE set to the name of a temporary file containing the contents of the file to be merged, and $MERGED set to the name of the file to which the merge tool should write the result of the merge resolution.

So at least you can run it like this:

export BASE=some_file.r123
export LOCAL=some_file.mine
export REMOTE=some_file.r124
export MERGED=some_file
meld

I don't know whether this is the same as running it with its three-file syntax: meld some_file.r123 some_file.mine some_file.r124.

Autres conseils

Follow up @AndreKR

  • How to resolve postponed conflict with Meld installed

Because you have (after postponing) 3 temp-files for every file-in-conflict (*.MY, *.THEIR, *.BASE) and Meld can accept up to three filenames as parameters for file-diff, you just run by hand meld MY BASE THEIR, edit MY files in order to get needed result, save it, and, for closing merge-conflict, use after it svn resolve --accept 'my-full FILENAME' (accoring to svn help resolve "the --accept option is currently required" and svn resolve is also a must all changes was done in MY file)

  • How to use Meld as merger-differ forever

[helpers] section in config file: diff-cmd, diff3-cmd and merge-tool-cmd keys will get common value - meld (maybe with path, but without parameters). You'll get small trouble with merge-tool, because "...Subversion will pass 4 arguments to the specified command" and Meld can accept only 3, but mentioned by you blog-post contain workaround for this headache

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top