subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey <an...@inbox.ru>
Subject "svn status" does not show unversioned items been deleted but not committed
Date Wed, 17 May 2017 17:50:55 GMT
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/

Mime
View raw message