Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Ask user on git errors #6

wants to merge 1 commit into from

2 participants



On importing a darcs repository, i had a non critical error on a git command:

Running: ["git", "tag", "-a", "-m", "TAG 0.2\n\ndarcs-hash:20080421160810-d61e2-c20fe32983a55557b721b0bfa30c56916ba71a87.gz", "0_2"]
fatal: tag '0_2' already exists

And the import stopped there. That is why i propose a mechanism to handle theses error and ask to the user if he want to continue the import anyway or not.

Feel free to pull or not :)

Best regards,



Hmmm... I want to make sure the script can always run through without any input from the user, so I'm most interested in figuring out why there are 2 darcs changes which introduce the same tag, because that seems to be the cause of the problem here. Is the darcs repository you are converting publicly available, so that I could take a look at it and investigate the issue?


The repository used to be publicy available on (and hsmagick link) but the server seems to be down.

I uploaded a tgz of the repository here : --URL removed--


Hi Vincent -- thanks very much for that. I see that there were several darcs changesets which applied the 0.3 tag, which then caused a problem in darcs-to-git. So I've changed darcs-to-git so that later tag changes override earlier ones; I think that's the behaviour which makes most sense, and I've tested it with the hsmagick repo you provided.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 darcs-to-git
4 darcs-to-git 100755 → 100644
@@ -357,6 +357,10 @@ class DarcsPatch
commit_id = output_of("git", "log", "-n1", "--no-color").scan(/^commit ([a-z0-9]+$)/).flatten.first
COMMIT_HISTORY.record_git_commit(commit_id, identifier)
+ rescue RuntimeError => error
+ STDERR.write "An error occurred: " + error + "\n"
+ STDERR.write "Do you want to continue ? (y/N): "
+ exit unless (STDIN.getc.chr.downcase == "y")
def darcs_date_to_git_date(utc,local)
Something went wrong with that request. Please try again.