You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David O'Shea <da...@s3group.com> on 2007/10/17 07:35:41 UTC
[PATCH] Fix for reverting broken softlinks
Hi,
I sent this on yesterday but it never seemed to show up on the list,
(possibly because the address I sent it from was not the one I'd
subscribed with?) so I'm resending - apologies if it turns up twice.
David.
--------------------------- Original Message ---------------------------
Hi,
The attached patch fixes the case where you're trying to revert a
working copy with broken softlinks. Steps to reproduce the existing
problem are as follows:
$ touch foo
$ ln -s foo bar
$ svn add foo bar
$ svn ci -m "Adding link for testing purposes."
$ ln -sf fish bar
$ svn revert bar
This will result in the error message:
svn: Can't open file 'bar': No such file or directory
[[[
Fix for reverting WC with broken softlinks.
* subversion/libsvn_wc/questions.c
(compare_and_verify): Do not attempt to read untranslated special files.
]]]
Regards,
David.
The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: Whelan House, South County Business Park, Leopardstown, Dublin 18
Re: [PATCH] Fix for reverting broken softlinks
Posted by David O'Shea <da...@s3group.com>.
On 12/12/2007 23:54, David Glasser wrote:
> So is the resolution here that trunk does not have this bug?
Yep.
> Is it still the case that your test would be a useful addition to the
> trunk test suite?
I think so, yes. If it's been broken before, it could be broken again...
David.
--
The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: South County Business Park, Leopardstown, Dublin 18
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix for reverting broken softlinks
Posted by David Glasser <gl...@davidglasser.net>.
On Dec 7, 2007 12:14 AM, David O'Shea <da...@s3group.com> wrote:
> On 06/12/2007 12:49, Stefan Sperling wrote:
> > On Thu, Dec 06, 2007 at 11:02:10AM +0000, David O'Shea wrote:
> >> On 05/12/2007 23:55, Stefan Sperling wrote:
> >>> On Wed, Nov 28, 2007 at 09:36:25AM +0000, David O'Shea wrote:
> >>>> The diff is against a 1.4.5 tarball, as I cannot check out the trunk
> >>>> from here. I hope this isn't a problem.
> >>> It's not a big problem. The diff applies to current trunk with
> >>> a tiny bit of fuzz and one very minor reject.
> >>>
> >>> But for me, the test passes whether or not I patch questions.c with
> >>> your change (on FreeBSD 6.2). This does not seem right.
> >>>
> >>> Can you reproduce this? Could you take a look at the test again
> >>> and verify that it is correct?
> >> Strange. It does fail for me here without the patch.
> >
> > Just checked again to make sure:
> > It does fail for me, too, but only in 1.4.4, not on trunk.
> > Seems like this has been fixed in trunk?
>
> You're right - it passes for me on an unpatched trunk checked out yesterday.
>
> Looks like this one is already fixed for 1.5 then!
So is the resolution here that trunk does not have this bug?
Is it still the case that your test would be a useful addition to the
trunk test suite?
--dave
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix for reverting broken softlinks
Posted by David O'Shea <da...@s3group.com>.
On 06/12/2007 12:49, Stefan Sperling wrote:
> On Thu, Dec 06, 2007 at 11:02:10AM +0000, David O'Shea wrote:
>> On 05/12/2007 23:55, Stefan Sperling wrote:
>>> On Wed, Nov 28, 2007 at 09:36:25AM +0000, David O'Shea wrote:
>>>> The diff is against a 1.4.5 tarball, as I cannot check out the trunk
>>>> from here. I hope this isn't a problem.
>>> It's not a big problem. The diff applies to current trunk with
>>> a tiny bit of fuzz and one very minor reject.
>>>
>>> But for me, the test passes whether or not I patch questions.c with
>>> your change (on FreeBSD 6.2). This does not seem right.
>>>
>>> Can you reproduce this? Could you take a look at the test again
>>> and verify that it is correct?
>> Strange. It does fail for me here without the patch.
>
> Just checked again to make sure:
> It does fail for me, too, but only in 1.4.4, not on trunk.
> Seems like this has been fixed in trunk?
You're right - it passes for me on an unpatched trunk checked out yesterday.
Looks like this one is already fixed for 1.5 then!
David.
--
The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: South County Business Park, Leopardstown, Dublin 18
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix for reverting broken softlinks
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Dec 06, 2007 at 11:02:10AM +0000, David O'Shea wrote:
> On 05/12/2007 23:55, Stefan Sperling wrote:
> > On Wed, Nov 28, 2007 at 09:36:25AM +0000, David O'Shea wrote:
> >>
> >> The diff is against a 1.4.5 tarball, as I cannot check out the trunk
> >> from here. I hope this isn't a problem.
> >
> > It's not a big problem. The diff applies to current trunk with
> > a tiny bit of fuzz and one very minor reject.
> >
> > But for me, the test passes whether or not I patch questions.c with
> > your change (on FreeBSD 6.2). This does not seem right.
> >
> > Can you reproduce this? Could you take a look at the test again
> > and verify that it is correct?
>
> Strange. It does fail for me here without the patch.
Just checked again to make sure:
It does fail for me, too, but only in 1.4.4, not on trunk.
Seems like this has been fixed in trunk?
--
Stefan Sperling <st...@elego.de> Software Developer
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de Geschaeftsfuehrer: Olaf Wagner
Re: [PATCH] Fix for reverting broken softlinks
Posted by David O'Shea <da...@s3group.com>.
On 05/12/2007 23:55, Stefan Sperling wrote:
> On Wed, Nov 28, 2007 at 09:36:25AM +0000, David O'Shea wrote:
>>
>> The diff is against a 1.4.5 tarball, as I cannot check out the trunk
>> from here. I hope this isn't a problem.
>
> It's not a big problem. The diff applies to current trunk with
> a tiny bit of fuzz and one very minor reject.
>
> But for me, the test passes whether or not I patch questions.c with
> your change (on FreeBSD 6.2). This does not seem right.
>
> Can you reproduce this? Could you take a look at the test again
> and verify that it is correct?
Strange. It does fail for me here without the patch. I will check out
the trunk at home tonight and see if I can reproduce it there.
[davidos@willow cmdline]$ ./revert_tests.py --verbose 15
CMD: svnadmin "create" "svn-test-work/local_tmp/repos"
"--bdb-txn-nosync" <TIME = 0.078114>
CMD: svn "import" "--username" "jrandom" "--password" "rayjandom" "-m"
"Log message for revision 1." "svn-test-work/local_tmp/greekfiles"
"file:///local/davidos/svn/subversion-1.4.5/subversion/tests/cmdline/svn-test-work/local_tmp/repos"
"--config-dir"
"/local/davidos/svn/subversion-1.4.5/subversion/tests/cmdline/svn-test-work/local_tmp/config"
<TIME = 0.216879>
CMD: svnadmin "create" "svn-test-work/repositories/revert_tests-15"
"--bdb-txn-nosync" <TIME = 0.066743>
CMD: svnadmin dump "svn-test-work/local_tmp/repos" | svnadmin load
"svn-test-work/repositories/revert_tests-15" <TIME = 0.002003>
CMD: svn "co" "--username" "jrandom" "--password" "rayjandom"
"file:///local/davidos/svn/subversion-1.4.5/subversion/tests/cmdline/svn-test-work/repositories/revert_tests-15"
"svn-test-work/working_copies/revert_tests-15" "--config-dir"
"/local/davidos/svn/subversion-1.4.5/subversion/tests/cmdline/svn-test-work/local_tmp/config"
<TIME = 0.464405>
CMD: svn "add" "svn-test-work/working_copies/revert_tests-15/link"
"--config-dir"
"/local/davidos/svn/subversion-1.4.5/subversion/tests/cmdline/svn-test-work/local_tmp/config"
<TIME = 0.043337>
CMD: svn "commit" "-m" "link"
"svn-test-work/working_copies/revert_tests-15/link" "--config-dir"
"/local/davidos/svn/subversion-1.4.5/subversion/tests/cmdline/svn-test-work/local_tmp/config"
<TIME = 0.947768>
CMD: svn "revert" "svn-test-work/working_copies/revert_tests-15/link"
"--config-dir"
"/local/davidos/svn/subversion-1.4.5/subversion/tests/cmdline/svn-test-work/local_tmp/config"
<TIME = 0.999148>
EXPECTED STDERR:
ACTUAL STDERR:
svn: Can't open file
'svn-test-work/working_copies/revert_tests-15/link': No such file or
directory
EXCEPTION: SVNLineUnequal
FAIL: revert_tests.py 15: revert a broken softlink
--
The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: South County Business Park, Leopardstown, Dublin 18
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix for reverting broken softlinks
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Nov 28, 2007 at 09:36:25AM +0000, David O'Shea wrote:
> Hi,
>
> On 23/11/2007 19:37, David Glasser wrote:
> > It looks like a good bug find and fix. Can you write a regression
> > test as well? The connection between the "revert" code and
> > compare_and_verify isn't immediately obvious to me, so a test is
> > especially nice.
>
> I'm attaching an updated patch which contains a new test in revert_tests.py
>
> The diff is against a 1.4.5 tarball, as I cannot check out the trunk
> from here. I hope this isn't a problem.
It's not a big problem. The diff applies to current trunk with
a tiny bit of fuzz and one very minor reject.
But for me, the test passes whether or not I patch questions.c with
your change (on FreeBSD 6.2). This does not seem right.
Can you reproduce this? Could you take a look at the test again
and verify that it is correct?
stsp@ted [cmdline] $ ./revert_tests.py --verbose 19
CMD: svnadmin create svn-test-work/local_tmp/repos --bdb-txn-nosync <TIME = 0.204771>
CMD: svn import -m "Log message for revision 1." svn-test-work/local_tmp/greekfiles file:///home/stsp/elego/svn-tigris/subversion/tests/cmdline/svn-test-work/local_tmp/repos --config-dir /home/stsp/elego/svn-tigris/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom <TIME = 0.298827>
CMD: svnadmin create svn-test-work/repositories/revert_tests-19 --bdb-txn-nosync <TIME = 0.249194>
CMD: svnadmin dump "svn-test-work/local_tmp/repos" | svnadmin load "svn-test-work/repositories/revert_tests-19" --ignore-uuid <TIME = 0.006592>
CMD: svn co file:///home/stsp/elego/svn-tigris/subversion/tests/cmdline/svn-test-work/repositories/revert_tests-19 svn-test-work/working_copies/revert_tests-19 --config-dir /home/stsp/elego/svn-tigris/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom <TIME = 0.490552>
CMD: svn add svn-test-work/working_copies/revert_tests-19/link --config-dir /home/stsp/elego/svn-tigris/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom <TIME = 0.170242>
CMD: svn commit -m link svn-test-work/working_copies/revert_tests-19/link --config-dir /home/stsp/elego/svn-tigris/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom <TIME = 0.230031>
CMD: svn revert svn-test-work/working_copies/revert_tests-19/link --config-dir /home/stsp/elego/svn-tigris/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom <TIME = 0.173965>
PASS: revert_tests.py 19: revert a broken softlink
--
Stefan Sperling <st...@elego.de> Software Developer
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de Geschaeftsfuehrer: Olaf Wagner
Re: [PATCH] Fix for reverting broken softlinks
Posted by David O'Shea <da...@s3group.com>.
Hi,
On 23/11/2007 19:37, David Glasser wrote:
> It looks like a good bug find and fix. Can you write a regression
> test as well? The connection between the "revert" code and
> compare_and_verify isn't immediately obvious to me, so a test is
> especially nice.
I'm attaching an updated patch which contains a new test in revert_tests.py
The diff is against a 1.4.5 tarball, as I cannot check out the trunk
from here. I hope this isn't a problem.
Regards,
David.
--
The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: Whelan House, South County Business Park, Leopardstown, Dublin 18
Re: [PATCH] Fix for reverting broken softlinks
Posted by David O'Shea <da...@s3group.com>.
On 23/11/2007 19:37, David Glasser wrote:
> Well, we haven't actually committed it to trunk yet, which is a first step :)
>
> It looks like a good bug find and fix. Can you write a regression
> test as well?
I have not looked at the test code before, but I'll give it a go!
> The connection between the "revert" code and
> compare_and_verify isn't immediately obvious to me, so a test is
> especially nice.
Yes... it did take me a while to track it down to there :-)
Cheers,
David.
--
The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: Whelan House, South County Business Park, Leopardstown, Dublin 18
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix for reverting broken softlinks
Posted by David Glasser <gl...@davidglasser.net>.
Well, we haven't actually committed it to trunk yet, which is a first step :)
It looks like a good bug find and fix. Can you write a regression
test as well? The connection between the "revert" code and
compare_and_verify isn't immediately obvious to me, so a test is
especially nice.
--dave
On Nov 23, 2007 9:51 AM, David O'Shea <da...@s3group.com> wrote:
> Any chance of including this fix in 1.4.6?
>
> Thanks,
>
> David.
>
> On 17/10/2007 08:35, David O'Shea wrote:
> > Hi,
> >
> > The attached patch fixes the case where you're trying to revert a
> > working copy with broken softlinks. Steps to reproduce the existing
> > problem are as follows:
> >
> > $ touch foo
> > $ ln -s foo bar
> > $ svn add foo bar
> > $ svn ci -m "Adding link for testing purposes."
> > $ ln -sf fish bar
> > $ svn revert bar
> >
> > This will result in the error message:
> >
> > svn: Can't open file 'bar': No such file or directory
> >
> >
> > [[[
> > Fix for reverting WC with broken softlinks.
> >
> > * subversion/libsvn_wc/questions.c
> > (compare_and_verify): Do not attempt to read untranslated special files.
> >
> > ]]]
> >
> > Regards,
> >
> > David.
> >
> --
>
> The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
> Please direct any additional queries to: communications@s3group.com.
> Thank You.
> Silicon and Software Systems Limited. Registered in Ireland no. 378073.
> Registered Office: Whelan House, South County Business Park, Leopardstown, Dublin 18
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix for reverting broken softlinks
Posted by David O'Shea <da...@s3group.com>.
Any chance of including this fix in 1.4.6?
Thanks,
David.
On 17/10/2007 08:35, David O'Shea wrote:
> Hi,
>
> The attached patch fixes the case where you're trying to revert a
> working copy with broken softlinks. Steps to reproduce the existing
> problem are as follows:
>
> $ touch foo
> $ ln -s foo bar
> $ svn add foo bar
> $ svn ci -m "Adding link for testing purposes."
> $ ln -sf fish bar
> $ svn revert bar
>
> This will result in the error message:
>
> svn: Can't open file 'bar': No such file or directory
>
>
> [[[
> Fix for reverting WC with broken softlinks.
>
> * subversion/libsvn_wc/questions.c
> (compare_and_verify): Do not attempt to read untranslated special files.
>
> ]]]
>
> Regards,
>
> David.
>
--
The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: Whelan House, South County Business Park, Leopardstown, Dublin 18
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org