Hello,

last week, I wrote this E-Mail to the dev-list,  but didn't get a response 
until now.

Maybe someone here can help me?

Thank you
Daniel Petat


Von: Petat, Daniel
Gesendet: Mittwoch, 7. Juni 2017 17:14
An: 'd...@subversion.apache.org' <d...@subversion.apache.org>
Betreff: Windows - Can not commit if foldername contains invalid characters

Hello,

I am using:
Windows 10, x64
Subversion 1.9.5 x64, provided by TortoiseSVN 1.9.5 x64.

I first thought, this was a bug in TortoiseSVN, but I was able to reproduce it 
using the command line tools only.

We use a script, to create tags, using the current timestamp as folder names 
with the ISO format yyyy-MM-ddThh:mm:ss_REV. This script creates the tag on the 
server itself, using the "svn copy" command.
The included colons are not allowed as folder names in Windows.
When I check out the whole tags folder, I see only folders like ss_REV  (e.g:  
54_8403 of revision 8403). So the folder names are cut off before the last 
colon.

For some reason, I had to commit something into this folder again.
So I checked the tags out, changed something, and tried to commit it.
I just get the error message "File not found: transaction '2-3', path 
'/tags/54_8403/filename.txt'"
Which seems logical, because this folder does not exist on the server.  When I 
use the "svn list" command, it says "/tags/2017-06-06T13:00:54_8403"


Steps to reproduce:

-          Rename the attached *.txt file to *.bat  and run it. You will see 
the error message in the console window.

o   This script creates a repository, creates a tag with "invalid" folder name 
and tries to commit something into this tag.


I hope you can help me?
Yes I know, I should not commit anything to a tag. But I think this would 
happen to a branch as well.

Best regards
Daniel Petat

@echo off

rem 
##############################################################################
rem ##                                                                          
##
rem ##  This is a template for writing Subversion bug reproduction scripts.     
##
rem ##                                                                          
##
rem ##  It creates a repository containing the standard Greek Tree (see         
##
rem ##  
http://svn.apache.org/repos/asf/subversion/trunk/subversion/tests/greek-tree.txt)
 ##
rem ##  and checks out a working copy containing that tree.  Please adjust      
##
rem ##  this script however you need to to demonstrate your bug.  When it's     
##
rem ##  ready, post the bug report to d...@subversion.apache.org -- after       
 ##
rem ##  
http://subversion.apache.org/docs/community-guide/issues.html#reporting-bugs, ##
rem ##  of course.                                                              
##
rem ##                                                                          
##
rem 
##############################################################################

:defineCommands
rem You might need to adjust these lines to point to your
rem compiled-from-source Subversion binaries, if using those:
for %%i in (svn.exe) do set SVN="%%~$PATH:i"
for %%i in (svnadmin.exe) do set SVNADMIN="%%~$PATH:i"

:defineUrls
rem Only supported access method: file://. If http:// or svn://, then
rem you'll have to configure it yourself first.
set URL=file:///%CD%/repos
set URL=%URL:\=/%
echo Base url for repo: %URL%

:cleanAllDirsAndCreateRepo
if exist repos rmdir /s /q repos
if exist import-me rmdir /s /q import-me
if exist wc rmdir /s /q wc
%SVNADMIN% create repos

:prepareGreekTree
echo Making a Greek Tree for import...
mkdir import-me
mkdir import-me\trunk
mkdir import-me\tags
mkdir import-me\branches
mkdir import-me\trunk\A
echo This is the file 'iota'.        > import-me\trunk\iota
echo This is the file 'A\mu'.        > import-me\trunk\A\mu
echo Importing it...
cd import-me
%SVN% import -q -m "Initial import." %URL%
cd ..

:commitInvalidFolderName
%SVN% copy %URL%/trunk %URL%/tags/2017-01-01T13:00:00 -q -m "Creating invalid 
folder"

:outputOriginalFolderName
%SVN% list %URL%/tags

:checkoutTrunk
echo Checking out working copy..
%SVN% co -q %URL% wc

:changeSomethingAndTryToCommit
mkdir WC\tags\00\B
%SVN% add WC\tags\00\B
%SVN% commit WC -m "TestCommit that will fail"

goto :eof

Reply via email to