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

Re: Windows - Can not commit if foldername contains invalid characters

From: Branko Čibej <brane_at_apache.org>
Date: Thu, 8 Jun 2017 10:01:47 +0200

On 07.06.2017 17:14, Petat, Daniel wrote:
>
> 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.
>

The problem is that you're using colons (:) in the names. Colons are
forbidden in file (or directory) names on Windows; that restriction has
nothing to do with Subversion.

Subversion will allow you to create such directories in the repository,
but can't create them in your Windows working copy.

The safest thing to do is to change the name of your tags (for example,
use dashes instead of colons in the time separator) and rename all the
tags in the repository. Or you can use a Unix client to make your
changes; Unix filesystems typically allow colons in file names.

-- Brane
Received on 2017-06-08 10:01:55 CEST

This is an archived mail posted to the Subversion Dev mailing list.