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

Re: [BUG] Manual conflict removal leads to spurious revert report

From: <kfogel_at_collab.net>
Date: 2006-03-06 17:01:08 CET

"Ed Price" <ed.price@gmail.com> writes:
> Shall I file this as an issue? Any hints as to how to proceed are
> welcome.

+1 on filing this as an issue (although I think I agree with you that
your quick-n-dirty patch is not The Right Fix :-) ). Can you make
sure the issue links back to this email thread, so readers of the
issue can find the discussion?

I think the fix is just a Simple Matter Of Programming, but I don't
know where to actually make the changes. One useful contribution
would be an "XFAIL" regression for it, since that can be done right
now and reduces the burden on whoever eventually fixes the bug...

-Karl

> Thanks,
> -Ed
>
> #!/bin/bash
> set -ev
>
> svn --version
>
> svnadmin create repos
>
> svn co file://`pwd`/repos wc
> touch wc/foo
> svn add wc/foo
> svn ci wc -m ""
> svn up wc
>
> echo "### Cause a conflict." > /dev/null
>
> svn co file://`pwd`/repos wc2
> echo "1" > wc/foo
> echo "2" > wc2/foo
> svn ci wc2 -m ""
> svn up wc
>
> echo "### Resolve conflict 'manually'." > /dev/null
>
> echo "2" > wc/foo
> rm wc/foo.*
>
> svn st wc
> svn diff wc
>
> echo "### Status and diff agree: No changes." > /dev/null
> echo "### So revert should not revert anything." > /dev/null
> echo "### (We'll snapshot WC here.)" > /dev/null
>
> cp -pR wc wc.save
>
> echo "### Revert (nothing to do, right?)" > /dev/null
>
> svn revert -R wc
>
> echo "### Did it say that it reverted something?" > /dev/null
> echo "### If so, the user panics..." > /dev/null
> echo "### What was reverted?? Who knows!" > /dev/null
> echo "### Luckily, we happen to have a snapshot..." > /dev/null
> echo "### So let's see what really did change:" > /dev/null
>
> diff -ur wc.save wc
>
> # It's interesting that only "svn revert" cleans out those conflict
> # markers in the entries file.
> #
> # "svn cleanup" should also clean up these conflict entries. Its help
> # text says "cleanup: Recursively clean up the working copy, removing
> # locks, resuming unfinished operations, etc.". I tried adding "svn
> # cleanup wc" just before "svn revert -R wc" but it did not affect the
> # result, ie it did not cleanup the conflict entries.
> #
> # Perhaps "svn up" should do it too. That would be ideal because, at
> # least for me, it is a very frequently executed command, moreso than
> # 'revert' and much moreso than 'cleanup'.
> #
> # Neither "svn status" nor "svn diff" should do it because they should
> # be strictly read-only. (Or if they did try to do it, they should
> # silently ignore "harmless" failure to update the entries file, to
> # avoid regression against a truly read-only WC.)
> #
> # I wonder if there could be other bugs due to the leftover conflict
> # info in there? I did try producing another conflict with the
> # previous conflict markers still in the file, but it didn't cause any
> # problem AFAICT; the conflict markers were updated properly for the
> # second conflict.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

-- 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 6 18:48:26 2006

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.