pull: do not invent or imply a "default" when none exists
As far as I can tell, this was previously used to "detect" an initial clone. Unfortunately, that logic is incorrect: like Mercurial, hg-git should consider pulling into an empty repository distinct from cloning. As an apparent aside, it also kind-of-sort-of handled the case where you pulled from a local Git repository into a location that happened to be default. To fix this, we do two things: 1) Expand relative local paths before comparing them to other paths. 2) Detect clone from the source of the default `default` path. The end result is: 1) You can pull from e.g. `../repo` to update remotes, with an equivalent path specified in the configuration 2) Pulls from entirely foreign remotes are no longer saved. 3) We always activate the desired bookmarks on clone. Although the two changes might seem unrelated, their effect is combined, and either alone would break the tests.
parent
ed22a015
No related branches found
No related tags found
Showing
- hggit/git_handler.py 24 additions, 26 deletionshggit/git_handler.py
- hggit/schemes.py 12 additions, 0 deletionshggit/schemes.py
- tests/test-branch-bookmark-suffix.t 3 additions, 3 deletionstests/test-branch-bookmark-suffix.t
- tests/test-hg-tags.t 1 addition, 0 deletionstests/test-hg-tags.t
- tests/test-phases-public.t 0 additions, 1 deletiontests/test-phases-public.t
Loading
Please register or sign in to comment