Skip to content

Change defaults to drop illegal paths rather aborting the conversion

Aborting the conversion might be sensible in some cases where history editing in possible, and the user controls both Mercurial and Git repositories. For most users, however, that's not the case, and they're stuck with the repository history as it is. In that case, aborting is supremely unhelpful, and makes hg-git essentially useless for those repositories. Previously, the only option was to proceed with the offending paths in place, but that's not suitable:

  1. GitHub actively rejects pushes containing paths with a .git component.
  2. You can have commits in Mercurial which you cannot check out.
  3. For the CR/NL case, Mercurial cannot even store them.

The new behaviour is to simply drop any invalid paths. Although that might be somewhat incorrect and inconvenient for bidirectionality, that's more than outweighed by the usefulness of a repository that actually works everywhere, and commits that you can actually check out.

https://github.com/corona-warn-app/cwa-app-ios is an example of a Git repository that triggers this. This repository is itself an example of a Mercurial repository.

Since this is a change of behaviour, it might be the first change not suitable for a 0.9.x release. If so, I'll create a new branch for this.

Reported on the mailing list. Fixes #323 (closed).

Edited by Dan Villiom Podlaski Christiansen

Merge request reports