Dulwich treats ref names internally as unicode strings (probably
because of Python 3?), which means that at some points it tries to do
os.path.join between the repo path and the unicode of the ref name,
which fails miserably if we construct the repo with a str and not a
unicode. Kludge around this problem.
Fixes issue 172.
This is a roll-forward of 3df4d529a2f2, which should be valid now that
the previous change defends against accidentally writing unicode tags
inside the templater.
If we don't do this we might end up with unicodes being written using
ui, which then breaks in popbuffer in test-encoding.t. This appears to
be an academic concern until we start passing unicode paths to git
repos, which we need to do in order to resolve some other problems. Yay.
bookmarks.write is deprecated and it was showing warning messages in
test-hg-branch.t with the latest test runner from core mercurial. Tested with
both hg 2.8 and hg tip.
Dulwich treats ref names internally as unicode strings (probably
because of Python 3?), which means that at some points it tries to do
os.path.join between the repo path and the unicode of the ref name,
which fails miserably if we construct the repo with a str and not a
unicode. Kludge around this problem.
Fixes issue 172.
Upstream added opargs to exchange.push and uses it as kwargs to the
pushoperation constructor (59da9543ec6c). There was an attempt to fix this in
hggit (2eb4c0de6bc6) but it passes the exchange.push kwargs directly to
pushoperation(), where we actually need to pull out the opargs and pass them as
kwargs.
Previously, cloning from a git ssh uri (e.g. git@github.com:user/repo.git)
would prepend the local file path because Mercurial classifies this as a path
(since there is no scheme at the beginning of the string). This patch fixes
that by doing the same logic as before in hgutil.url so that the correct hgrc
path is written.
The latest version of Mercurial validates that a path contains the .hg
directory. This breaks when pulling/pushing to git repos.
This patch makes a gitrepo a valid path as well.
Refactors the logic that decides if a local directory is a git directory into a
separate function. This will let us use it later on to integrate with
Mercurial's new paths component.