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

File Obstructed by Symbolic Link Prevents Submitting Unrelated Changelists

From: Nick <nospam_at_codesniffer.com>
Date: Mon, 20 Dec 2010 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.

Nick
Received on 2010-12-20 15:48:08 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.