You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Nick <no...@codesniffer.com> on 2010/12/20 14:47:27 UTC

File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

(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@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@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@nimble ~/test_repo $ rm c.txt
      nick@nimble ~/test_repo $ ln -s d.txt c.txt

      nick@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@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@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@nimble ~/test_repo $ svn status
      ~ c.txt

      --- Changelist 'cltest':
      M b.txt
      M a.txt

4.  Attempt to commit the changelist:

      nick@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.


Nick

Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Nick <no...@codesniffer.com>.
On Thu, 2010-12-30 at 22:44 +0200, Daniel Shahaf wrote:
> > Awesome, thanks!  Any idea which release this will make it into?
> > 
> 
> 1.7.0.
> 
> It may also make it into a 1.6.x: I've nominated it for backport, and
> now it needs three +1 votes by full committers.
> 
> (I haven't voted yet.)

While it would be great to have this fix in the next 1.6.x, I've dealt
w/ this behavior for over a year, so obviously it's not critical.

I really appreciate your prompt attention to this--thanks again Daniel!

Best regards,
Nick


Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Nick wrote on Thu, Dec 30, 2010 at 15:44:52 -0500:
> On Thu, 2010-12-30 at 21:42 +0200, Daniel Shahaf wrote:
> 
> > Nick wrote on Tue, Dec 21, 2010 at 12:00:47 -0500:
> > > On Tue, 2010-12-21 at 11:59 +0200, Daniel Shahaf wrote:
> > > > I've updated some
> > > > fields, and I'll try to get around to look at it in more detail some
> > > > time.
> > > 
> > > I appreciate it, thanks!
> > 
> > Sending        subversion/libsvn_client/commit_util.c
> > Sending        subversion/tests/cmdline/special_tests.py
> > Transmitting file data ..
> > Committed revision 1053984.
> 
> 
> Awesome, thanks!  Any idea which release this will make it into?
> 

1.7.0.

It may also make it into a 1.6.x: I've nominated it for backport, and
now it needs three +1 votes by full committers.

(I haven't voted yet.)

Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Nick <no...@codesniffer.com>.
On Thu, 2010-12-30 at 21:42 +0200, Daniel Shahaf wrote:

> Nick wrote on Tue, Dec 21, 2010 at 12:00:47 -0500:
> > On Tue, 2010-12-21 at 11:59 +0200, Daniel Shahaf wrote:
> > > I've updated some
> > > fields, and I'll try to get around to look at it in more detail some
> > > time.
> > 
> > I appreciate it, thanks!
> 
> Sending        subversion/libsvn_client/commit_util.c
> Sending        subversion/tests/cmdline/special_tests.py
> Transmitting file data ..
> Committed revision 1053984.


Awesome, thanks!  Any idea which release this will make it into?


Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Nick wrote on Tue, Dec 21, 2010 at 12:00:47 -0500:
> On Tue, 2010-12-21 at 11:59 +0200, Daniel Shahaf wrote:
> > I've updated some
> > fields, and I'll try to get around to look at it in more detail some
> > time.
> 
> I appreciate it, thanks!

Sending        subversion/libsvn_client/commit_util.c
Sending        subversion/tests/cmdline/special_tests.py
Transmitting file data ..
Committed revision 1053984.

Enjoy,

Daniel

Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Nick <no...@codesniffer.com>.
On Tue, 2010-12-21 at 11:59 +0200, Daniel Shahaf wrote:
> I've updated some
> fields, and I'll try to get around to look at it in more detail some
> time.

I appreciate it, thanks!


Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Nick wrote on Mon, Dec 20, 2010 at 18:17:02 -0500:
> On Mon, 2010-12-20 at 19:19 +0200, Daniel Shahaf wrote:
> > 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)
> 
> Thanks for confirming Daniel!
> I had opened an issue for this last year, but it's in the
> subversion.tigris.org site:
> http://subversion.tigris.org/issues/show_bug.cgi?id=3484 .
> 
> Is this OK?  Or should I open another issue in the apache.org tracker?
> 

That's okay.  (We have no apache.org tracker.)  I've updated some
fields, and I'll try to get around to look at it in more detail some
time.

> 

Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Nick <no...@codesniffer.com>.
On Tue, 2010-12-21 at 12:02 +0200, Daniel Shahaf wrote:

> > When I read that part of the page I wasn't sure if it was a mix of
> > tigris.org and apache.org, or still entirely tigris.org.  Thanks for
> the
> > clarification.
> 
> Fixed:
> http://svn.apache.org/viewvc/subversion/site/publish/issue-tracker.html?r1=1051442&r2=1051441&pathrev=1051442


That reads much clearer to me now, thanks!


Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Nick wrote on Mon, Dec 20, 2010 at 21:01:59 -0500:
> On Mon, 2010-12-20 at 17:34 -0600, Ryan Schmidt wrote:
> 
> > The Subversion project still uses the tigris.org issue tracker; it
> > does not yet use the apache.org issue tracker. See the yellow box on
> > this page:
> > 
> > http://subversion.apache.org/issue-tracker.html
> 
> 
> When I read that part of the page I wasn't sure if it was a mix of
> tigris.org and apache.org, or still entirely tigris.org.  Thanks for the
> clarification.

Fixed:
http://svn.apache.org/viewvc/subversion/site/publish/issue-tracker.html?r1=1051442&r2=1051441&pathrev=1051442

Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Nick <no...@codesniffer.com>.
On Mon, 2010-12-20 at 17:34 -0600, Ryan Schmidt wrote:

> The Subversion project still uses the tigris.org issue tracker; it
> does not yet use the apache.org issue tracker. See the yellow box on
> this page:
> 
> http://subversion.apache.org/issue-tracker.html


When I read that part of the page I wasn't sure if it was a mix of
tigris.org and apache.org, or still entirely tigris.org.  Thanks for the
clarification.


Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 20, 2010, at 17:17, Nick wrote:
> I had opened an issue for this last year, but it's in the
> subversion.tigris.org site:
> http://subversion.tigris.org/issues/show_bug.cgi?id=3484 .
> 
> Is this OK?  Or should I open another issue in the apache.org tracker?

The Subversion project still uses the tigris.org issue tracker; it does not yet use the apache.org issue tracker. See the yellow box on this page:

http://subversion.apache.org/issue-tracker.html


Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Nick <no...@codesniffer.com>.
On Mon, 2010-12-20 at 19:19 +0200, Daniel Shahaf wrote:
> 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)

Thanks for confirming Daniel!
I had opened an issue for this last year, but it's in the
subversion.tigris.org site:
http://subversion.tigris.org/issues/show_bug.cgi?id=3484 .

Is this OK?  Or should I open another issue in the apache.org tracker?


Re: File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
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@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@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@nimble ~/test_repo $ rm c.txt
>       nick@nimble ~/test_repo $ ln -s d.txt c.txt
> 
>       nick@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@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@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@nimble ~/test_repo $ svn status
>       ~ c.txt
> 
>       --- Changelist 'cltest':
>       M b.txt
>       M a.txt
> 
> 4.  Attempt to commit the changelist:
> 
>       nick@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
>