'Commit' should handle the local changed 'ignore list'

437 views
Skip to first unread message

M Saftwerk

unread,
Apr 1, 2021, 10:29:41 AM4/1/21
to TortoiseSVN
OS: Windows 10 x64
TortoiseSVN 1.14.1, Build 29085 - 64 Bit , 2021/02/09 16:17:02
ipv6 enabled
Subversion 1.14.1, -release
apr 1.6.5
apr-util 1.6.1
serf 1.3.9
OpenSSL 1.1.1i  8 Dec 2020
zlib 1.2.11
SQLite 3.29.0

Steps to repro:

1. Use existing repo with lots of files and folders.
2. 'SVN commit...' and 'SVN Update' are working fine, so all local files are up to date. (green)
3. Create any demo file with unwanted extension like 'hello.txtbad'.
4. Click 'TortoiseSVN' > 'Add to ignore list...' > 'hello.txtbad'.
5. Close message box: "Added the file pattern(s) 'hello.txtbad' to the ignore list."
6. Modify an existing file which state is green. e.g.: "myDiary.txt" will change state to red.
7. At root folder click 'SVN commit' and the normal Commit dialog appears.
8. Click OK

Result:
Command: Commit to *****  
Modified: C:\Project\myDiary.txt  
Modified: C:\Project\files  
Error: Commit failed (details follow):  
Error: Directory 'C:\Project\files' is out of date  
Completed!:   

Now you can click 'OK' and another dialog appears: "Command failed - Update needed. Shall I update the working copy and retry?" <Update> <Cancel>

Expceted:
The command 'Commit' should handle the local changed 'ignore list' since nothing was changed on server.
2021-04-01.png

Daniel Sahlberg

unread,
Apr 2, 2021, 3:19:49 AM4/2/21
to TortoiseSVN
Den tors 1 apr. 2021 kl 16:29 skrev M Saftwerk über TortoiseSVN <torto...@googlegroups.com>:
OS: Windows 10 x64
TortoiseSVN 1.14.1, Build 29085 - 64 Bit , 2021/02/09 16:17:02
ipv6 enabled
Subversion 1.14.1, -release
apr 1.6.5
apr-util 1.6.1
serf 1.3.9
OpenSSL 1.1.1i  8 Dec 2020
zlib 1.2.11
SQLite 3.29.0

Steps to repro:

1. Use existing repo with lots of files and folders.
2. 'SVN commit...' and 'SVN Update' are working fine, so all local files are up to date. (green)

I can't reproduce this by following the steps exactly (ie, updating in the root of the WC). I have to add the following step:

2b. Change an existing file and commit. 

DON'T do an SVN Update after this step.
 
3. Create any demo file with unwanted extension like 'hello.txtbad'.
4. Click 'TortoiseSVN' > 'Add to ignore list...' > 'hello.txtbad'.
5. Close message box: "Added the file pattern(s) 'hello.txtbad' to the ignore list."
6. Modify an existing file which state is green. e.g.: "myDiary.txt" will change state to red.
7. At root folder click 'SVN commit' and the normal Commit dialog appears.

What is listed in the commit dialog? I would presume that "myDiary.txt" and the folder containing "hello.txtbad" are listed, but not "hello.txtbad" itself. If this is correct, then TortoiseSVN is honoring the ignore list as it should.

What do you select in the commit dialog? Only the "myDiary.txt" file or also the changed folder? If you don't select the changed folder (only "myDiary.txt") you should be able to commit. If you select the changed folder then you run into a limitation with Subversion's "mixed revision working copies", see the paragraph starting with "Second, ..." in the Subversion Book:

It is step 2b above that introduces the mixed revision working copy. If you do an SVN Update as step 2c, then you are back to a single revision working copy and the remaining steps will succeed even if you commit both the file and the changed folder.

8. Click OK

Result:
Command: Commit to *****  
Modified: C:\Project\myDiary.txt  
Modified: C:\Project\files  
Error: Commit failed (details follow):  
Error: Directory 'C:\Project\files' is out of date  
Completed!:   

Now you can click 'OK' and another dialog appears: "Command failed - Update needed. Shall I update the working copy and retry?" <Update> <Cancel>

Expceted:
The command 'Commit' should handle the local changed 'ignore list' since nothing was changed on server.
2021-04-01.png

TortoiseSVN is doing its best to help you resolve the situation with the mixed revision revision working copy. If you accept the update you should get back to the commit dialog and be able to retry the commit (which should now succeed).

The same situation happen with the Subversion command line client:

[[[
$ svnadmin create ms_repo
$ svn co file:///home/daniel/ms_repo/ ms
Checked out revision 0.
$ cd ms
$ touch file1
$ svn add file1
A         file1
$ svn ci file1 -m 'committing file1'
Adding         file1
Transmitting file data .done
Committing transaction...
Committed revision 1.
$ svn propset svn:ignore bad.file .
property 'svn:ignore' set on '.'
$ echo "modify">file1
$ svn status
 M      .
M       file1
$ svn ci -m 'changes'
Sending        .
svn: E155011: Commit failed (details follow):
svn: E155011: Directory '/home/daniel/ms' is out of date
svn: E160028: Directory '/' is out of date
$
]]]

Above is same error as shown by TortoiseSVN when I try to commit both the changed file and the changed property. If I commit only the file, the commit succeeds.

[[[
$  svn ci file1 -m 'changes only committing file'
Sending        file1
Transmitting file data .done
Committing transaction...
Committed revision 2.
$
]]]

If I'm missing out something in your reproduction receipt or what you are trying to do (for example if you are only selecting the file in step 7, then please report back in this mailing list.

If you have questions about Subversion's handling of mixed revision working copies, then you will probably get better help from the Subversion project's mailing lists (us...@subversion.apache.org, see http://subversion.apache.org/mailing-lists.html).

Kind regards
Daniel
Reply all
Reply to author
Forward
0 new messages