You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Øyvind A. Holm" <su...@sunbase.org> on 2004/07/12 14:37:04 UTC

Error when restoring broken links

The symlinks story goes on... When trying to check out or update broken
links and "use-commit-times = yes" is set in ~/.subversion/config , svn
aborts with the message

subversion/libsvn_wc/log.c:329: (apr_err=155009)
svn: In directory 'trunk'
subversion/libsvn_wc/log.c:1236: (apr_err=155009)
svn: Error processing command 'set-timestamp' in 'trunk'
subversion/libsvn_subr/io.c:780: (apr_err=2)
svn: Can't set access time of 'trunk/broken_symlink.txt': No such file
or directory

Tested with trunk@r10245 and 1.1.x@r10244 , and the following script
reproduces the error:

======== CUT {{{ ========
#!/bin/bash

mkdir wc repos 2>/dev/null
[ -d "repos/." ] || { echo "Repository parent dir not found" >&2; exit 1; }
[ -d "wc/." ] || { echo "wc parent dir not found" >&2; exit 1; }
subrepos=test.$(date +"%H_%M_%S")
repos=$(/bin/pwd)/repos/$subrepos
echo === Creating repository in "$repos"...
svnadmin create $repos
cd wc || { echo "cd wc: Error" >&2; exit 1; }
echo === Checking out empty wc...
svn co file://$repos $subrepos
echo === cd $subrepos
cd $subrepos || { echo "cd $subrepos: Error" >&2; exit 1; }
echo === svn mkdir trunk
svn mkdir trunk
echo === Checkin empty trunk
svn ci -m "Added trunk"
echo === cd trunk
cd trunk
echo === Create regular file regular.txt
echo This is a regular file >regular.txt
echo === svn add regular.txt
svn add regular.txt
echo === Checkin regular.txt
svn ci -m "Adding regular file"
echo === ln -sv regular.txt symlink.txt
ln -sv regular.txt symlink.txt
echo === svn add symlink.txt
svn add symlink.txt
echo === Check in symlink
svn ci -m "Adding symlink to regular.txt"
echo === svn update
svn up
echo === So far so good. Now we\'ll create a broken symlink
ln -sv path/to/nowhere/land broken_symlink.txt
svn add broken_symlink.txt
echo === Checkin broken_symlink.txt
svn ci -m "Adding broken_symlink.txt" broken_symlink.txt
echo "=== cd ..; rm -rf trunk"
cd ..
rm -rf trunk
echo === svn up
svn up
======== CUT }}} ========

This is the result of running the script with the newest version from
1.1.x:

======== CUT {{{ ========
2004-07-12 16:33:55 sunny@sunba:~/tmp/sym$ . ~/testscript
=== Creating repository in /home/sunny/tmp/sym/repos/test.16_34_10...
=== Checking out empty wc...
Checked out revision 0.
=== cd test.16_34_10
=== svn mkdir trunk
A         trunk
=== Checkin empty trunk
Adding         trunk

Committed revision 1.
=== cd trunk
=== Create regular file regular.txt
=== svn add regular.txt
A         regular.txt
=== Checkin regular.txt
Adding         trunk/regular.txt
Transmitting file data .
Committed revision 2.
=== ln -sv regular.txt symlink.txt
create symbolic link `symlink.txt' to `regular.txt'
=== svn add symlink.txt
A         symlink.txt
=== Check in symlink
Adding         trunk/symlink.txt
Transmitting file data .
Committed revision 3.
=== svn update
At revision 3.
=== So far so good. Now we'll create a broken symlink
create symbolic link `broken_symlink.txt' to `path/to/nowhere/land'
A         broken_symlink.txt
=== Checkin broken_symlink.txt
Adding         broken_symlink.txt
Transmitting file data .
Committed revision 4.
=== cd ..; rm -rf trunk
=== svn up
A  trunk
A  trunk/regular.txt
A  trunk/broken_symlink.txt
A  trunk/symlink.txt
subversion/libsvn_wc/log.c:329: (apr_err=155009)
svn: In directory 'trunk'
subversion/libsvn_wc/log.c:1236: (apr_err=155009)
svn: Error processing command 'set-timestamp' in 'trunk'
subversion/libsvn_subr/io.c:780: (apr_err=2)
svn: Can't set access time of 'trunk/broken_symlink.txt': No such file or directory
2004-07-12 16:34:18 sunny@sunba:~/tmp/sym/wc/test.16_34_10$
======== CUT }}} ========

Tested on Debian woody (stable) and Debian sarge (testing).

Mvh,
Øyvind A. Holm
---------------------
cat /dev/urandom >SCO

Re: Error when restoring broken links

Posted by "Øyvind A. Holm" <su...@sunbase.org>.
On 2004-07-15 20:02-0400 Josh Pieper wrote:
> Øyvind A. Holm wrote:
> > The symlinks story goes on... When trying to check out or update
> > broken links and "use-commit-times = yes" is set in
> > ~/.subversion/config , svn aborts with the message
> > [...]
>
> I believe this was caused by a bug fixed in r10324.  Let me know
> otherwise.

I have tested it with trunk@r10328, and the symlink is updated fine, and
the error is gone. Thanks again for the quick fix.

Regards,
Øyvind A. Holm
---------------------
cat /dev/urandom >SCO

Re: Error when restoring broken links

Posted by Josh Pieper <jj...@pobox.com>.
??yvind A. Holm wrote:
> The symlinks story goes on... When trying to check out or update broken
> links and "use-commit-times = yes" is set in ~/.subversion/config , svn
> aborts with the message
> 
> subversion/libsvn_wc/log.c:329: (apr_err=155009)
> svn: In directory 'trunk'
> subversion/libsvn_wc/log.c:1236: (apr_err=155009)
> svn: Error processing command 'set-timestamp' in 'trunk'
> subversion/libsvn_subr/io.c:780: (apr_err=2)
> svn: Can't set access time of 'trunk/broken_symlink.txt': No such file
> or directory

I believe this was caused by a bug fixed in r10324.  Let me know
otherwise.

-Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org