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

"svn status" does not show unversioned items been deleted but not committed

From: Andrey <andry_at_inbox.ru>
Date: Wed, 17 May 2017 20:50:55 +0300

As a result, for example, you can not say by "svn status" command which
file you forgot to add.

Reproduction batch script for windows:
```
@echo off

set REPODIR=test_repo
set "REPOROOT=%~dp0%REPODIR%"
set "REPOURL=file:///%REPOROOT:\=/%"
set WCROOT=%REPODIR%_root

if exist "%REPOROOT%\" rmdir /S /Q "%REPOROOT%"
if exist "%WCROOT%\" rmdir /S /Q "%WCROOT%"

mkdir "%REPOROOT%"
svnadmin create "%REPOROOT%"
mkdir "%WCROOT%"

svn co "%REPOURL%" "%WCROOT%"

rem creating simple file
type nul > "%WCROOT%/file1.txt"
svn add "%WCROOT%/file1.txt"
svn ci "%WCROOT%" -m "rev1"

rem update to the head
svn up "%WCROOT%"

rem add new file to the directory but do not add it to the version control
type nul > "%WCROOT%/file2.txt"

rem test status
echo --- svn status 1 ---
svn status "%WCROOT%"
echo ---

rem rename file
svn mv "%WCROOT%/file1.txt" "%WCROOT%/file_bubbles.txt" || goto :EOF

rem add a new file instead
type nul > "%WCROOT%/file1.txt"

rem test status again
echo --- svn status 2 ---
svn status "%WCROOT%"
echo ---

rem after this point the status output missed file1.txt file as
unversioned file in the listing
```

The script output:
```
Checked out revision 0.
A test_repo_root\file1.txt
Adding test_repo_root\file1.txt
Transmitting file data .done
Committing transaction...
Committed revision 1.
Updating 'test_repo_root':
At revision 1.
--- svn status 1 ---
? test_repo_root\file2.txt

---
A         test_repo_root\file_bubbles.txt
D         test_repo_root\file1.txt
--- svn status 2 ---
D       test_repo_root\file1.txt
         > moved to test_repo_root\file_bubbles.txt
?       test_repo_root\file2.txt
A  +    test_repo_root\file_bubbles.txt
         > moved from test_repo_root\file1.txt
---
```
As you see the file1.txt is missed in second status output as unversioned  
and so can be missed from add before a commit.
-- 
îÁÐÉÓÁÎÏ Ó ÐÏÍÏÝØÀ ÐÏÞÔÏ×ÏÇÏ ËÌÉÅÎÔÁ Opera: http://www.opera.com/mail/
Received on 2017-05-17 19:51:14 CEST

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.