开发者

Mercurial repository and files with strange names

开发者 https://www.devze.com 2022-12-18 20:42 出处:网络
I have a mercurial repository, and inside it a file that ends with \'>>\'.When doing a hg clone from this windows repository, I get the following error:

I have a mercurial repository, and inside it a file that ends with '>>'. When doing a hg clone from this windows repository, I get the following error:

abort: The filename, directory name, or volume label syntax is i开发者_运维问答ncorrect: C:\Users\Path\To\Repos/More/Path/file>>

Is there a way to fix it? It seems to do with the '>>' being confused for a redirect, although I'm also unsure of why it switched from using \ to /.


The problem is that on Windows, a filename can't contain the > symbol. You should probably try and find the push to the repository that added the file in question and do a partial rollback to get rid of that file. Then, never name a file that way again :)

EDIT: You might try performing a pull from a Linux machine or VM if you have it, and then renaming the file without the weird characters, then commit and push back to the repository. I'm not sure if you tried that already.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号