Discussion:
Windows - Can not commit if foldername contains invalid characters
Petat, Daniel
2017-06-12 10:23:42 UTC
Permalink
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: '***@subversion.apache.org' <***@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
Andreas Stieger
2017-06-12 12:08:35 UTC
Permalink
last week, I wrote this E-Mail to the dev-list,  but didn’t get a response until now.
You did!
http://mail-archives.apache.org/mod_mbox/subversion-dev/201706.mbox/%3Cffb97c0a-53a3-8e68-e112-2dc4fff29c5d%40apache.org%3E

Andreas
 
Petat, Daniel
2017-06-12 12:52:59 UTC
Permalink
Hello Andreas,

thank you. For any reason, I didn't get this answer via e-mail.

But how can I answer to this message now? Sorry, I am new to this mailing-list stuff.
I will write the answer here.

Brane:
My problem was not, that the local folders are created using an incomplete name.
But I thought that in the wc.db file, the client could save the correct server-repo-path, so I could still commit to this folder. See attached screenshot. Hope I marked the correct column.

So my local folder name would still be "tags/00", but Subversion would know that it points to the directory "tags/2017-01-01T13:00:00" on the server and commits to this place.

Just an idea.
For the future I will change the folder name in our scripts.

Best regards
Daniel


-----UrsprÃŒngliche Nachricht-----
Von: Andreas Stieger [mailto:***@gmx.de]
Gesendet: Montag, 12. Juni 2017 14:09
An: Petat, Daniel <***@ces.eu>
Cc: ***@subversion.apache.org
Betreff: Re: Windows - Can not commit if foldername contains invalid characters
last week, I wrote this E-Mail to the dev-list,  but didn’t get a response until now.
You did!
http://mail-archives.apache.org/mod_mbox/subversion-dev/201706.mbox/%3Cffb97c0a-53a3-8e68-e112-2dc4fff29c5d%40apache.org%3E

Andreas
 
Branko Čibej
2017-06-12 13:02:21 UTC
Permalink
Post by Petat, Daniel
Hello Andreas,
thank you. For any reason, I didn't get this answer via e-mail.
But how can I answer to this message now? Sorry, I am new to this mailing-list stuff.
I will write the answer here.
My problem was not, that the local folders are created using an incomplete name.
But I thought that in the wc.db file, the client could save the correct server-repo-path, so I could still commit to this folder. See attached screenshot. Hope I marked the correct column.
So my local folder name would still be "tags/00", but Subversion would know that it points to the directory "tags/2017-01-01T13:00:00" on the server and commits to this place.
Just an idea.
Yes, it would be a nice feature if the client could encode the path
names so that they conform to local filesystem rules. Unfortunately,
that feature is not implemented (and, for various reasons, it not
trivial to implement).

-- Brane
Daniel Shahaf
2017-06-12 14:41:09 UTC
Permalink
Post by Petat, Daniel
But how can I answer to this message now?
For future reference:

1. When posting to a mailing list, either subscribe to the list
beforehand, or explicitly ask to be CC'd on replies.

2. The mailing list archives usually provide an mbox export that can be
imported to any email client, e.g.,
https://mail-archives.apache.org/mod_mbox/subversion-dev/201706.mbox
for your previous question. That ensures the In-Reply-To / References
headers would be set correctly.
Niemann, Hartmut
2017-06-27 14:24:05 UTC
Permalink
Post by Petat, Daniel
Betreff: Windows - Can not commit if foldername contains invalid characters
We use a script, to create tags, using the current timestamp as folder names with the ISO format yyyy-MM-ddThh:mm:ss_REV.
[...]
Yes I know, I should not commit anything to a tag. But I think this would happen to a branch as well.
Hello Daniel!

IMHO, you should avoid file names that are illegal in one of the OSs you have to use like the plague ...

DIN ISO 8601:2006 allows as "Basisformat" YYYYMMDDThhmmss (or for an UTC timestamp: YYYYMMDDThhmmssZ)
I would recommend to switch to that time stamp format (it is the same ISO, after all :-) and have identical (and valid) names on all systems.

Hartmut
Petat, Daniel
2017-06-28 11:30:44 UTC
Permalink
Post by Niemann, Hartmut
Hello Daniel!
IMHO, you should avoid file names that are illegal in one of the OSs you have to use like the plague ...
DIN ISO 8601:2006 allows as "Basisformat" YYYYMMDDThhmmss (or for an UTC timestamp: YYYYMMDDThhmmssZ) I would recommend to switch to that time stamp format (it is the same ISO, after all :-) and have identical (and valid) names on all systems.
Hartmut
Hello Hartmut,

thank you for this hint.
I was not aware of this "Basic format" and have changed my scripts which create the tags.

Best regards
Daniel

Loading...