push & pull: consolidate invalid path handling, default to skipping
The current behaviour is quite unhelpful, given that it either allows you to abort the conversion or generate a bogus repository. As an example, GitHub rejects anything with a `.git` in it. Instead, the new default is to issue a warning and simply discard the dangerous files. Although this might cause problems down the line, I'd much rather have those problems than just have hg-git give up. As an example of such a bogus repository, look no further than this one. c43c02cc803a committed some tests from Dulwich with nested Git repositories, and a061dce264b7 renamed them. Prior to this change, hg-git could not push its own repository to GitHub. Further more, Mercurial disallows paths containing carriage return (CR) and newline (NL) characters; as noted in the original Mercurial bug report that enabled this behaviour,[1] such paths appear for folder icons on macOS. This was reported on the list by Uwe Brauer.[2] Since Mercurial simply cannot store these files, we always either skip them or abort the conversion. [1] https://bz.mercurial-scm.org/show_bug.cgi?id=352 [2] https://groups.google.com/g/hg-git/c/Rz3oRzrMS3Q/m/RRq4AIMsBAAJ
parent
9a8e55e598df
No related branches found
No related tags found
Showing
- README.rst 20 additions, 16 deletionsREADME.rst
- hggit/__init__.py 19 additions, 0 deletionshggit/__init__.py
- hggit/compat.py 1 addition, 2 deletionshggit/compat.py
- hggit/git_handler.py 28 additions, 10 deletionshggit/git_handler.py
- hggit/hg2git.py 40 additions, 24 deletionshggit/hg2git.py
- tests/test-illegal-contents.t 76 additions, 35 deletionstests/test-illegal-contents.t
- tests/testutil 11 additions, 0 deletionstests/testutil
Loading
Please register or sign in to comment