#!/bin/sh # Show how "props" set on files causes merge conflicts where there should # be none. # Alfred Perlstein, Juniper Networks 2008 # CHANGE THESE TO YOUR SVNROOT AND "TEST PROJECT" SVNROOT="svn+ssh://spigot/svn" TESTPROJ="scratch" # Make my project top level and the "trunk" svn mkdir --parents -m "mkdir testproj" ${SVNROOT}/${TESTPROJ}/trunk # Make space for branches. svn mkdir --parents -m "mkdir testproj" ${SVNROOT}/${TESTPROJ}/branches # Checkout trunk, add a file "bar.c" to it, commit it # set "mtime" property and commit. svn co ${SVNROOT}/${TESTPROJ}/trunk cd trunk echo foo >> bar.c svn add bar.c svn commit -m "add bar in trunk" svn propset mtime 1 bar.c svn commit -m "add mtime prop" bar.c # make a branch. svn cp -m "branch it" ${SVNROOT}/${TESTPROJ}/trunk ${SVNROOT}/${TESTPROJ}/branches/testbranch # check out my branch, don't do anything yet... cd ../ svn co ${SVNROOT}/${TESTPROJ}/branches/testbranch # go back into trunk. modify the file, adding some data and modify the # mtime meta data. cd trunk echo barrrrrr >> bar.c svn propset mtime 2 bar.c svn commit -m "second change with mtime=2" bar.c # go back to my "testbranch" and try to merge. # this will show conflicts in both metadata and data! cd ../testbranch svn merge ${SVNROOT}/${TESTPROJ}/trunk #Conflict for property 'mtime' discovered on 'bar.c'. #Select: (p) postpone, (mf) mine-full, (tf) theirs-full, # (h) help for more options: tf #Conflict discovered in 'bar.c'. #Select: (p) postpone, (df) diff-full, (e) edit, # (h) help for more options: df #--- .svn/tmp/tempfile.tmp Mon Jun 23 19:16:29 2008 #+++ .svn/tmp/tempfile.3.tmp Mon Jun 23 19:17:34 2008 #@@ -0,0 +1,7 @@ #+<<<<<<< .working #+foo #+||||||| .merge-left.r0 #+======= #"svn-merge-madness-done.txt" 73L, 2514C written