You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Noorul Islam K M <no...@collab.net> on 2011/07/12 09:18:56 UTC

[PATCH] Fix regression in 'svn cl' add and remove operations on non-existent target.

Using 1.6 client
================
noorul@noorul:/tmp/wc/repos$ ls a
ls: cannot access a: No such file or directory
noorul@noorul:/tmp/wc/repos$ svn cl testlist a
svn: warning: 'a' is not under version control
noorul@noorul:/tmp/wc/repos$ svn cl a --remove
svn: warning: 'a' is not under version control
noorul@noorul:/tmp/wc/repos$ touch a
noorul@noorul:/tmp/wc/repos$ ls a
a
noorul@noorul:/tmp/wc/repos$ svn cl testlist a
svn: warning: 'a' is not under version control
noorul@noorul:/tmp/wc/repos$ svn cl a --remove
svn: warning: 'a' is not under version control

Using 1.7 client
================
noorul@noorul:/tmp/wc/repos1$ ls a 
ls: cannot access a: No such file or directory
noorul@noorul:/tmp/wc/repos1$ ~/projects/subversion/builds/trunk/bin/svn cl testlist a
noorul@noorul:/tmp/wc/repos1$ ~/projects/subversion/builds/trunk/bin/svn cl a --remove
noorul@noorul:/tmp/wc/repos1$ touch a
noorul@noorul:/tmp/wc/repos1$ ls a
a
noorul@noorul:/tmp/wc/repos1$ ~/projects/subversion/builds/trunk/bin/svn cl testlist a
noorul@noorul:/tmp/wc/repos1$ ~/projects/subversion/builds/trunk/bin/svn cl a --remove

The attached patch fixes this regression.

Log
[[[

Fix regression in 'svn cl' add/remove operations on
non-existent/unversioned target.

* subversion/libsvn_wc/adm_ops.c
  (svn_wc_set_changelist2): If the target is unversioned/non-existent
    then return error (SVN_ERR_UNVERSIONED_RESOURCE).

* subversion/tests/cmdline/changelist_tests.py
  (add_remove_non_existent_target, add_remove_unversioned_target):
    New tests.
  (test_list): Run them.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
Found by: danielsh
]]]