5

I have a central Hg repository on a samba server, and two working copies, one on a Ubuntu and one on a Windows 7 machine. Everything worked fine until I, by mistake, added to the project a file with a Russian letter in the name. I've done it in Linux. Mercurial has happily accepted it and in Linux everything still works. However I've discovered that I cannot pull changesets to Windows any longer. For hg pull I get

pulling from ...
searching for changes
adding changesets
transaction abort!
rollback completed
abort: empty or missing revlog for figures/interfDðÁsign.svg

(The problematc filename should be interfDеsign, with Cyrillic 'е' in it.) I've renamed the file in Linux, committed and pushed the change, and can even see this change if I do hg in in Windows. But I cannot pull it! Is there any way to correct this problem and make the repository work with Windows again?

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
texnic
  • 3,959
  • 4
  • 42
  • 75

2 Answers2

2

Read this... http://groups.google.com/group/mercurial_general/browse_thread/thread/300a3f5e1a23592e There are no good news :-)

BUT

there could be a fix: try this https://www.mercurial-scm.org/wiki/FixUtf8Extension

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
xanatos
  • 109,618
  • 12
  • 197
  • 280
  • 3
    RANT: Is it possible that every VCS I try has some limits? Is it so difficult to imagine that persons will have 100mb files, or will want to use Unicode to name files, or will want to rename files or duplicate existing files, or have empty directories that need versioning? Yes, I DO know that doing a VCS is a difficult thing, but at least you should try to cover the "usual bases", especially if you aren't the first to come to the "market". – xanatos Aug 31 '11 at 12:41
  • I'm getting "***failed to import extension fixutf8 from ...: [Errno 22] Invalid argument". Any idea what may be wrong? I've already moved the extension to a folder without space in the name and in the users/public directory to ensure it has the writing rights. – texnic Aug 31 '11 at 12:42
  • Are the .py "correct"? The first time I tried downloading them directly with right-key save-as. It's easier if you use the "get source" and save the zip file. Are you using a "recent" version of hg? I'm using the latest and I was able to use "normally" hg after installing the extension (the first time I had the files corrupted and I received errors, but when I corrected the files it worked), but I don't have a linux machine to run some tests. – xanatos Aug 31 '11 at 12:56
  • Reporting the results. 1) I am on Windows, yes. 2) I was using Hg version 1.9.1 (so recent but not current). Updated to 1.9.2. 3) I've initially got the extension using `hg clone https://bitbucket.org/stefanrusek/hg-fixutf8`, as recommended. I have now done it as xanatos suggested, with "get source" link of bitbucket. 4) With new Hg and newly got extension, the extension path in hgrc had to be changed to include the py file itself (previously the path was enough, though don't know why). The problem with errno 22 disappeared. – texnic Aug 31 '11 at 14:05
  • With the above updates, the problem with the file name disappeared. NOTE: I didn't correct the file names. I just did `hg pull` and then `hg update --clean`. Don't know if it is as expected and if I should do anything else. But for now the problem resolved. – texnic Aug 31 '11 at 14:06
  • 1
    @texnic the part about including the filename.py was written in the page linked (at the end: fixutf8 = `path/to/fixutf8.py` :-) – xanatos Aug 31 '11 at 14:08
  • It is, that's why I don't understand why it was doing something at all! It was not complaining about not finding the extension, which it does if the path is wrong, it was returning errno 22 instead! – texnic Aug 31 '11 at 14:32
0

I've found another solution, or rather a work around. With the Convert extension, it is possible to rename the poorly named file, i.e. to correct the mistake done long ago. In this particular case it worked fine. Of course, one should be careful that there are no dependencies on the badly named file in the project, and also some commit messages may get meaningless.

The advantage of this method is that other people don't have to install a non-standard extension for the mere sake of being able to check out an old changeset with a very wrong file name.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
texnic
  • 3,959
  • 4
  • 42
  • 75