Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Encoding issue #5

purcell opened this Issue · 4 comments

2 participants


pheaver said 7 days ago:

I'm getting this error when running darcs-to-git, and I'm not sure how to proceed:

../darcs-to-git/darcs-to-git:253:in `scan': incompatible encoding regexp match (Windows-31J regexp with UTF-8 string) (Encoding::CompatibilityError)

    from ../darcs-to-git/darcs-to-git:253:in `block in fill_from_darcs_hash_comments'
    from ../darcs-to-git/darcs-to-git:252:in `each'
    from ../darcs-to-git/darcs-to-git:252:in `fill_from_darcs_hash_comments'
    from ../darcs-to-git/darcs-to-git:221:in `initialize'
    from ../darcs-to-git/darcs-to-git:481:in `new'
    from ../darcs-to-git/darcs-to-git:481:in `<main>'

I am using darcs 2.5, and I believe the initial import was done using an older version of darcs and with darcs-to-git 10c9e8e.

I had previously removed the _darcs directory, not knowing that darcs-to-git would need it, and I restored it from a backup on my fileserver. According to darcs, the log was the same; that is, the backup was up to date and contained the most recent commit.

purcell said 7 days ago:
Hmm... Can you please try putting # -- coding: utf-8 -- at the top of the darcs-to-git script? I think maybe the 2nd line would work.

It looks like you're using Ruby 1.9.x, and it has some quirks relating to the character coding of the ruby scripts themselves. If this works, then I'll update the script accordingly.


purcell said 6 days ago:
I've gone ahead and added the coding descriptor to the script anyway, since it seemed like a good idea. Go ahead and pull it, and let me know if that fixes the problem for you.



pheaver said 5 days ago:
Hmmm, I still got the same error message. I ran darcs-to-git with ruby-1.8.7, that worked, and now it works with ruby-1.9.2 (that may be because there are no longer any new commits for darcs-to-git to import, where it would normally fail).

purcell said 5 days ago:
Odd. If you convert the darcs repo from scratch, does it run through fine?

And are the darcs & git repos in question public ones which you could share with me in order to test, or are they private code?

pheaver said about 8 hours ago:
Here's the darcs repo: darcs get (I think the site is down right now)

Here's the git repo that I created using darcs-to-git:

I haven't gotten around to converting the repo from scratch. I'll let you know.



Heya, so the upstream darcs repo is now available again, so I thought I'd take a look at this. I'd need the _darcs subdir of your problem repo, though; perhaps you could just tar cvfj proj.tar.bz2 your local conversion dir, and mail it to me (steve, sanityinc dot com)?


Hmm... I just tried it and was unable to reproduce the error. I switched computers a while back, and this one has darcs-2.4 instead of 2.5 on it.

Did you want the _darcs directory that's in the darcs repo, or the one that darcs-to-git creates in the git repo?


I guess I'd look at both _darcs dirs, ideally, but if neither of us can reproduce the error right now with the latest darcs and git, then I'm likely to close the issue as an unusual edge case, rather than spend a lot of time figuring out what went wrong.


Ok, I'll try it with darcs-2.5 if I get a chance, but go ahead and close it for now if you want.

@purcell purcell closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.