Windows - Can not commit if foldername contains invalid characters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows - Can not commit if foldername contains invalid characters

Petat, Daniel

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: '[hidden email]' <[hidden email]>
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

 


reproduce.txt (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Andreas Stieger
Daniel Peta wrote:
> 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
 
Reply | Threaded
Open this post in threaded view
|

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

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.

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:[hidden email]]
Gesendet: Montag, 12. Juni 2017 14:09
An: Petat, Daniel <[hidden email]>
Cc: [hidden email]
Betreff: Re: Windows - Can not commit if foldername contains invalid characters

Daniel Peta wrote:
> 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
 

2017-06-12_14h39_43.png (44K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Branko Čibej
On 12.06.2017 14:52, Petat, Daniel wrote:

> 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.

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

Reply | Threaded
Open this post in threaded view
|

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

Daniel Shahaf-2
In reply to this post by Petat, Daniel
Petat, Daniel wrote on Mon, 12 Jun 2017 12:52 +0000:
> 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.
Reply | Threaded
Open this post in threaded view
|

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

Niemann, Hartmut
In reply to this post by Petat, Daniel

> Von: Petat, Daniel [mailto:[hidden email]]
> 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


Reply | Threaded
Open this post in threaded view
|

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

Petat, Daniel
>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