While working on some other tests, I noticed that the push command was returning
exit code 1 on success. This changeset makes hgrepo.push use the same return
code contract as localrepo.push, which makes the exit codes behave as expected.
This changeset doesn't remove any previous major releases. Instead, I just
updated major releases to their latest minor release, and added major releases
that have been released since this was last updated.
On Hg 1.5.4, util.version() appears to return "unknown", which wasn't an
expected value in the version parsing logic in test-incoming and test-outgoing.
The net result of the change is that test-incoming no longer fails in 1.5.4,
but is skipped instead.
As demonstrated by the test suite, it was already broken. Specifically, the
"Remove any dangling tag references." section of git_handler.py wasn't properly
detecting Hg 1.4, and fell through to a call to util.safehasattr, which didn't
yet exist.
Both were failing due to extra spaces in the output from merges, which seems
to have been caused by a sed expression not working as intended. According
to my copy of "man re_format", basic regular expressions (such as used by sed
without the -E option) don't support using + as a special character. Thus, I
replaced it with one of the recommended alternatives (x+ to xx*).
Without this change, the test is skipped for modern versions of Mercurial
with minor version less than 5, despite the test actually passing for said
versions.
that mimic a branchname to be maintained on the git side without
a particular suffix - e.g. if the hg repo had a branch "release_05",
and a bookmark created onto it "release_05_bookmark", the branch on the
git side would be named "release_05". When pulling branches back from
git, if an hg named branch of that name exists, the suffix is appended
back onto the name before creating a bookmark on the hg side.
This is strictly so that a git repo can be generated that has the
same "branch names" as an older hg repo that has named branches, and
has had bookmarks added in to mirror the branch names.
This is given the restrictions that
A. hg named branches can never be renamed and B. hg-git only supports
hg bookmarks, not branches
Since git v1.7.7, merge outputs its status in the form
Merge made by the * strategy.
Use a regex substitution, so that older versions are handled
successfully as well.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Ehsan Akhgari <ehsan.akhgari@gmail.com>
---
I found a number of bugs when I was trying to convert Mozila's hg repository
to git using hg-git. This patch fixes a number of bugs with irregular
author lines present in hg repositories. Git cannot correctly process a
commit object which has a committer or author line in a format that it does
not understand, which makes it not be able to handle the repositories
with have such commit objects.
The added test cases shows the irregular cases that this patch is able to
deal with.