Commit Graph

501 Commits

Author SHA1 Message Date
Felipe Contreras
ed5a70706a Fix getchangegroup() for 4.0
The arguments heads and common have been removed.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 20:23:18 -05:00
Felipe Contreras
0faf2c9189 Tell hg-git to be backwards compatible
Since version 0.7.0 hg-git stores extra information directly into the
commits, we don't support that, so we need to tell hg-git to do what it
always did: put the extra data in the message.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 19:54:48 -05:00
Felipe Contreras
ada49422a7 test: add test for annotated tags
So we make sure they keep working as expected.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 19:54:39 -05:00
Felipe Contreras
580cea0d31 Explicitly process tags
Normally tag commands come with a corresponding ref, but not since
Git v2.21.

It's not clear if Git's change is correct, but fix it our end anyway.

  fdf31b6369 (fast-export: ensure we export requested refs)

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 19:51:38 -05:00
Felipe Contreras
1f376e437f Revert "test: skip tests with broken hg-git compatibility"
We need to fix the compatibility.

This reverts commit 29a0d8a0e3.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 19:51:35 -05:00
Felipe Contreras
4108665799 Add version check for filelog creation
The functions are only present in 3.2. Older versions don't need this
code.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 19:49:54 -05:00
Felipe Contreras
fc28115a53 Avoid ManifestLookupError
In versions older than 2.6 ManifestLookupError doesn't exist.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 19:49:08 -05:00
Felipe Contreras
e3009683f8 test: add missing &&s
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 14:55:25 -05:00
Felipe Contreras
54cec85f94 test: update expected result
It seems these work since Git v2.0.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 14:55:20 -05:00
Felipe Contreras
5ad322c54d Merge branch 'sharness-output-dir'
* sharness-output-dir:
  test: sharness: add support for output directory
2019-06-03 14:54:51 -05:00
Felipe Contreras
13bbc8a342 test: sharness: add support for output directory
I don't know why this was removed from Git's version.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 14:54:44 -05:00
Felipe Contreras
673b50d3f4 test: update to sharness 1.1
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-03 14:54:29 -05:00
Mark Nauwelaerts
35ecb45fda Tweak hg to git ref name translation
Fixes mnauw/git-remote-hg#26
2019-05-19 13:01:59 +02:00
Mark Nauwelaerts
1456e68129 Really strip prefix to ensure a valid package version 2019-04-28 14:32:42 +02:00
Mark Nauwelaerts
de95133416 Release v1.0.1 v1.0.1 2019-04-27 15:08:20 +02:00
Mark Nauwelaerts
e0b752be8f Move release version management to make stage
... to ensure setup.py does not trip some later time.

Fixes mnauw/git-remote-hg#25
2019-04-27 15:08:20 +02:00
native-api
f050de1bcc Additional installation step in Windows
fixes https://github.com/mnauw/git-remote-hg/issues/23
2019-03-19 20:41:21 +01:00
Mark Nauwelaerts
0bf3db826b Handle platform dependency in atomic file renaming 2019-01-06 15:51:42 +01:00
Mark Nauwelaerts
3698638e98 Always pass forward slash to git
Fixes mnauw/git-remote-hg#22
2019-01-06 15:51:42 +01:00
Mark Nauwelaerts
765f9ae287 Add python pip packaging
Fixes mnauw/git-remote-hg#13
v1.0.0
2018-10-14 16:27:51 +02:00
Mark Nauwelaerts
5ddcdd33ec Adjust to Mercurial 4.7 wrt deprecated revlog method 2018-09-09 12:08:29 +02:00
Mark Nauwelaerts
435373ee83 Adjust to Mercurial 4.7 wrt more restricted changectx API
Fixes mnauw/git-remote-hg#18
2018-09-09 12:08:26 +02:00
Mark Nauwelaerts
5e96683f67 Adjust to Mercurial 4.6 wrt revision numbers
... as modified in 38f4805020437f126f5c1c8f41d78445f9ab6547

Fixes mnauw/git-remote-hg#16
v0.4
2018-05-14 21:40:37 +02:00
Mark Nauwelaerts
144f48df44 Adjust to Mercurial 4.6 wrt bookmarks
... as modified in cd23423029287e299d65bbece497ff09a2a673f4
2018-05-14 21:40:37 +02:00
Mark Nauwelaerts
ad36a25064 helper: adjust to Mercurial 4.6 wrt subrepo helper functions
... now in a separate module as of 55e8efa2451a0999b56978e471dc31dc8066a0fb
2018-05-14 21:27:40 +02:00
Mark Nauwelaerts
679e016943 Adjust to modified internals of Mercurial 4.5
Fixes mnauw/git-remote-hg#12
2018-02-07 18:47:18 +01:00
Mark Nauwelaerts
9f6c541a2c test: tweak and clarify copy-rename test
... to align it with current git's more restricted behavior
2017-12-03 14:29:27 +01:00
Mark Nauwelaerts
476ffcbde0 test: adjust to recent git-fast-export which only detects exact copy
Fixes mnauw/git-remote-hg#11
2017-11-28 20:50:18 +01:00
Mark Nauwelaerts
76be528c0d Optionally ignore some remote Mercurial revision names
... in particular when these would otherwise map to unsupported refnames.

Fixes mnauw/git-remote-hg#10
2017-11-27 20:57:19 +01:00
Mark Nauwelaerts
6c2f4d8ff4 Adjust to recent Mercurial API in pushing to remote
Fixes mnauw/git-remote-hg#9
2017-11-11 17:23:46 +01:00
Mark Nauwelaerts
e9c37f78d8 test: adjust hg subrepo configuration 2017-11-11 17:23:46 +01:00
Mark Nauwelaerts
dfa6910cab Adjust to recent Mercurial API in hg-git mode tag handling 2017-09-21 13:15:20 +02:00
Mark Nauwelaerts
2ab9ae9073 Use ui.ui.load() only if available 2017-09-18 21:24:22 +02:00
Beren Minor
f21923b052 Add info about hg repos used as git submodules 2017-09-18 20:24:24 +02:00
Beren Minor
45866dbeba Use ui.ui.load() to create a new ui which loads the global and user hg config 2017-09-18 13:47:01 +02:00
Renaud Casenave-Péré
eaa9361ab0 Fix README formatting 2017-08-09 19:00:41 +02:00
Mark Nauwelaerts
f0e4c95bf5 Add test for importing multiple independent histories
Based on reproduction steps provided by Adam Bliss.
2017-05-01 14:51:19 +02:00
David Turner
e467b22dd3 Fix obscure bug with multiple independent histories
If you have a repository with multiple independent histories (perhaps
that get merged later), under some circumstances revision 0 can get
imported *after* some other revision.  "Independent histories" are those
that start from different zero-parent commits.  I have thus far failed to
get a local reproduction on this, in part because I don't understand
how git-remote-hg choses the order in which to import branches.  But
we did notice this in our production system.

If revision 0 is imported late, a reset would not be issued, and it would
be wrongly re-parented on top of whatever previous history existed, instead
of being a root-level commit.

Fix this by always issuing a reset for a parentless commit, even on
revision 0.
2017-04-21 16:47:36 -04:00
Mark Nauwelaerts
40c9eafcc9 Fix corner case version calculation 2017-03-13 20:53:44 +01:00
Mark Nauwelaerts
0bfbc0da4b Merge pull request #4 from novalis/dturner/do-not-mangle-quotes
Optionally don't mangle git usernames with quotes
2016-12-06 22:02:02 +01:00
David Turner
a1ca279d92 Optionally don't mangle git usernames with quotes
By default, for backwards compatibility with earlier versions,
git-remote-hg removes quotation marks from git usernames
(e.g. 'Raffaello "Raphael" Sanzio da Urbino <raphael@example.com>'
would become 'Raffaello Raphael Sanzio da Urbino
<raphael@example.com>').  This breaks round-trip compatibility; a git
commit by an author with quotes would become an hg commit without,
and if re-imported into git, would get a different SHA1.

To restore round-trip compatibility (at the cost of backwards
compatibility with commits converted by older versions of
git-remote-hg), add an option 'remote-hg.remove-username-quotes'. This
option defaults to true (for backwards compatibility).
2016-12-05 16:08:01 -05:00
David Turner
e19dd84571 hack for submodules
A complete solution for submodules might be to convert them to hg
subrepositories.  But this would, in the general case, be quite
difficult -- for instance, local copies of all historical submodule
commits might not be available, and repositories might have moved
around.

It's better to do the conversion in some understandable way than to
crash with a weird error message, so let's do that.
2016-11-29 16:41:21 -05:00
Mark Nauwelaerts
1d94ba2d42 Add compatibility for Mercurial v4.0
Fixes felipec/git-remote-hg#66
2016-11-22 19:54:09 +01:00
Mark Nauwelaerts
85b585b824 Make unit test for executable rename slightly more resilient. 2016-11-15 20:51:21 +01:00
David Turner
e8c88c70d9 Fix mode setting in the case of moved executable files 2016-11-14 18:13:56 -05:00
Mark Nauwelaerts
a35f93cbc1 Fix duplication typos in marks file migration.
Fixes mnauw/git-remote-hg#1
2016-11-12 16:18:04 +01:00
Mark Nauwelaerts
a59e1246a2 Refactor updating of notes upon fetch and push 2016-10-18 21:32:26 +02:00
Mark Nauwelaerts
cbbbaddc41 Support using shared marks files for all remotes
... which essentially track the shared bag of revisions that
the shared proxy repo constitutes.
2016-10-18 21:32:19 +02:00
Mark Nauwelaerts
5d429d2da1 Refactor all marks file path access through common variable 2016-10-18 21:32:11 +02:00
Mark Nauwelaerts
94bb2488e8 Fix comment typo 2016-10-18 21:32:04 +02:00