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

Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 20 Dec 2010 19:19:39 +0200

Nick wrote on Mon, Dec 20, 2010 at 09:47:27 -0500:
> (I originally reported this issue last year but nothing came of it.)
>
> A file which has been obstructed by changing it to a symbolic link
> prevents submitting unrelated changelists.
>
> To repro, simply replace a file with a sym link of the same name, and
> then try to submit a changelist which does not include the obstructed
> file.
>
> Reproduced with SVN 1.6.4, 1.6.5, 1.6.6, 1.6.9, 1.6.13 (I didn't try
> others).
>
> Here is an unannotated list of commands which can serve as a script to
> repro the problem. Execute from within a pre-existing repo working
> copy.
>
> touch a.txt b.txt c.txt d.txt
> svn add a.txt b.txt c.txt d.txt
> svn commit -m "Add a, b, c, d"
> echo a >> a.txt
> echo b >> b.txt
> rm c.txt
> ln -s d.txt c.txt
> svn changelist cltest a.txt b.txt
> svn commit --changelist cltest
>
>
> Here is an annotated step-by-step repro:
>
> 1. Start with a couple modified files (a.txt & b.txt in this case):
>
> nick_at_nimble ~/test_repo $ ls -hl
> total 24K
> -rw-r--r-- 1 nick users 4 Sep 15 04:24 a.txt
> -rw-r--r-- 1 nick users 4 Sep 15 04:24 b.txt
> -rw-r--r-- 1 nick users 2 Sep 15 04:31 c.txt
> -rw-r--r-- 1 nick users 2 Sep 15 04:31 d.txt
>
> nick_at_nimble ~/test_repo $ svn status
> M b.txt
> M a.txt
>
> 2. Obstruct a 3rd file (c.txt) by changing it to a symlink:
>
> nick_at_nimble ~/test_repo $ rm c.txt
> nick_at_nimble ~/test_repo $ ln -s d.txt c.txt
>
> nick_at_nimble ~/test_repo $ ls -hl
> total 20K
> -rw-r--r-- 1 nick users 4 Sep 15 04:24 a.txt
> -rw-r--r-- 1 nick users 4 Sep 15 04:24 b.txt
> lrwxrwxrwx 1 nick users 5 Sep 15 04:32 c.txt -> d.txt
> -rw-r--r-- 1 nick users 2 Sep 15 04:31 d.txt
>
> nick_at_nimble ~/test_repo $ svn status
> M b.txt
> ~ c.txt
> M a.txt
>
> 3. Place the modified files (a.txt & b.txt) in a changelist:
>
> nick_at_nimble ~/test_repo $ svn cl cltest a.txt b.txt
> Path 'a.txt' is now a member of changelist 'cltest'.
> Path 'b.txt' is now a member of changelist 'cltest'.
>
> nick_at_nimble ~/test_repo $ svn status
> ~ c.txt
>
> --- Changelist 'cltest':
> M b.txt
> M a.txt
>
> 4. Attempt to commit the changelist:
>
> nick_at_nimble ~/test_repo $ svn commit --changelist cltest
> svn: Commit failed (details follow):
> svn: Entry '/home/nick/test_repo/c.txt' has unexpectedly changed
> special status
>
>
> This failure is unexpected, since the obstructed file (c.txt) is not in
> the changelist being committed.
>
> I've confirmed that this behavior does not exist if the obstruction is
> caused by changing the file to a directory. If the file is obstructed w/
> a directory, svn allows the unrelated changelist to be submitted. So I
> suspect this issue is due to obstructions which are caused by changing
> to a sym link.
>

I can reproduce this with trunk:
[[[
% cd wc1/trunk/
% touch a b c d
% $svn add -q ?
% $svn ci -q -m add
% echo line1 >a >b
% rm c; ln -s d c
% $svn cl -q cltest a b
% $svn ci --cl cltest
subversion/svn/commit-cmd.c:156: (apr_err=145001)
subversion/libsvn_client/commit.c:846: (apr_err=145001)
svn: Commit failed (details follow):
subversion/libsvn_client/commit_util.c:1097: (apr_err=145001)
subversion/libsvn_client/commit_util.c:891: (apr_err=145001)
subversion/libsvn_client/commit_util.c:455: (apr_err=145001)
svn: Entry '/tmp/svn/wc1/trunk/c' has unexpectedly changed special status
zsh: exit 1 $svn ci --cl cltest
% $svn ci --cl cltest -q -mm [ab]
%
]]]

Could you, please, file an issue for this (if there isn't one already filed)?

Thanks,

Daniel
(I can't look at this right now; but if there's an issue then I or
someone else will eventually get to it)

>
> Nick
>
Received on 2010-12-20 18:22:34 CET

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

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