subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yuri <y...@rawbw.com>
Subject 'svn update' command, in case of conflict, should leave the version with unchanged conflicting parts
Date Tue, 21 Jan 2014 00:31:44 GMT
I am trying to make an external merging utility present merging versions 
in a nicer way. I am using meld as a remote utility.
Below is an example of merge-tool-cmd that I use.
svn supplies base revision of the file, new incoming revision (causing 
conflict), merged by svn version, and the original user version.

So "merged" version here is marked up by svn, something like this:
<<<<<<< .mine
3b
||||||| .r1
3
=======
3a
 >>>>>>> .r2

It would be beneficial for the external merging utility to use version 
with resolved non-conflict places, and with original version in the 
places which do cause conflicts.
Maybe there is some option in subversion that is already doing this, in 
this case I apologize. Otherwise, I would like to suggest you add the 
fourth variant of the file, maybe called .pending, as I described above. 
Every marked up place would just contain the .mine version, and no markup.

Thanks,
Yuri


---merge-tool-cmd command---
#!/usr/bin/env python

import sys
import os.path
import time
import subprocess
import shutil

try:
    # path to meld
    meld = "meld"

    # file paths supplied by subversion
    base   = sys.argv[1]
    theirs = sys.argv[2]
    mine   = sys.argv[3]
    merged = sys.argv[4]

    # Call meld, making sure it exits correctly
    subprocess.check_call([meld, base, merged, theirs])
except:
    print "An error occurred in meld merge helper: ", sys.exc_info()[0], 
sys.exc_info()[1]
    sys.exit(-1)


Mime
View raw message