[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Fwd: help with svn 1.5 -> merge with properties]

From: Alfred Perlstein <alfred_at_juniper.net>
Date: Sun, 29 Jun 2008 21:15:12 -0700

Karl Fogel wrote:
> Alfred Perlstein <alfred_at_juniper.net> writes:
>> Did you guys get this? I'm really confused about this bug, can we fix
>> it or can you tell me how to workaround? (maybe I'm doing something
>> stupid?)
>
> I can't reproduce it with r31913 of trunk over file:// or svn://; below
> is the script I used. It's based on your script, but this version is
> completely self-contained: it creates its own repository, etc.
>

Thanks Karl, it appears that after doing all of the following (although
maybe some steps aren't needed) everything worked:

1) svnadmin dump (it was a 1.4 repo)
2) svnadmin load (from that dump)
3) completely new checkout after step #2
4) try the merge..

 From 1.5.0-final it worked just fine.

Sorry for the noise.

> Starting from your script, it took me about 10 minutes to make the
> self-contained version. This is partly because I had the 'kf-doit'
> function from http://svn.red-bean.com/repos/kfogel/trunk/.emacs to help
> (search for "defun kf-doit" in that file). I mention this because you
> might want to keep the kf-doit template around for your own use when
> posting reproduction scripts. When a repro script is truly
> self-contained, people are much more likely to run it, because then they
> know they don't face an arbitrary amount of setup work before they can
> run the script.
>
> Anyway, first here's the output of my script, followed by the script
> itself. Let me know if the repro recipe I used was wrong.
>
> Output:
>
> Committed revision 1.
>
> Committed revision 2.
> Checked out revision 2.
> A bar.c
> Adding bar.c
> Transmitting file data .
> Committed revision 3.
> property 'mtime' set on 'bar.c'
> Sending bar.c
>
> Committed revision 4.
>
> Committed revision 5.
> A testbranch/bar.c
> Checked out revision 5.
> property 'mtime' set on 'bar.c'
> Sending bar.c
> Transmitting file data .
> Committed revision 6.
> --- Merging r5 through r6 into '.':
> UU bar.c
>
> And the script (not indented, unlike the output above):
>
> #!/bin/sh
>
> # The next line is the only line you should need to adjust.
> SVNDIR=/home/kfogel/src/subversion
>
> SVN=${SVNDIR}/subversion/svn/svn
> SVNSERVE=${SVNDIR}/subversion/svnserve/svnserve
> SVNADMIN=${SVNDIR}/subversion/svnadmin/svnadmin
>
> # Select an access method. If svn://, the svnserve setup is
> # handled automagically by this script; but if http://, then
> # you'll have to configure it yourself first.
> #
> # URL=http://localhost/SOMETHING/repos
> # URL=svn://localhost/repos
> URL=file:///`pwd`/repos
>
> rm -rf repos trunk testbranch
>
> ${SVNADMIN} create repos
>
> # These are for svnserve only.
> echo "[general]" > repos/conf/svnserve.conf
> echo "anon-access = write" >> repos/conf/svnserve.conf
> echo "auth-access = write" >> repos/conf/svnserve.conf
>
> # The server will only be contacted if $URL is svn://foo, of course.
> ${SVNSERVE} --pid-file svnserve-pid -d -r `pwd`
> # And put the kill command in a file, in case need to run it manually.
> echo "kill -9 `cat svnserve-pid`" > k
> chmod a+rwx k
>
> # Make my project top level and the trunk directory.
> ${SVN} mkdir --parents -m "mkdir testproj" ${URL}/testproj/trunk
>
> # Make space for branches.
> ${SVN} mkdir --parents -m "mkdir testproj" ${URL}/testproj/branches
>
> # Check out trunk, add a file "bar.c" to it, commit it.
> # Set "mtime" property, commit that too.
> ${SVN} co ${URL}/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
> cd ..
>
> # Make a branch.
> ${SVN} cp -m "branch it" ${URL}/testproj/trunk \
> ${URL}/testproj/branches/testbranch
>
> # Check out the branch, don't do anything yet...
> ${SVN} co ${URL}/testproj/branches/testbranch
>
> # Go back into trunk. Modify the file by adding some data, and modify
> # the property too.
> cd trunk
> echo barrrrrr >> bar.c
> ${SVN} propset mtime 2 bar.c
> ${SVN} commit -m "second change with mtime=2" bar.c
> cd ..
>
> # Go back to my "testbranch" and try to merge the trunk change.
> # It should merge cleanly, but it conflicts in both data and metadata!
> cd testbranch
> ${SVN} merge ${URL}/testproj/trunk
> cd ..
>
> #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
>
> # Put kill command in a file, in case need to run it manually.
> echo "kill -9 `cat svnserve-pid`" > k
> chmod a+rwx k
> ./k

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-30 20:24:09 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.