Commit Graph

983 Commits

Author SHA1 Message Date
Sean Farley
fd99e6fe49 git2hg: protect incoming from looking up HEAD
It doesn't really make sense to look up HEAD since this is checking 'incoming'.
2015-05-15 12:57:52 -07:00
Sean Farley
5544f7a66e git_handler: use our read_pkt_refs for fetch_pack 2015-05-15 11:40:49 -07:00
Sean Farley
369445a056 compat: add method for dulwich to return the symref 2015-05-15 11:38:59 -07:00
Stanislau Hlebik
982895dbea hotfix: add unfiltered() method to fix tests
38b8a4a2230cae562050ff420230883ed8a71d78 in mercurial main repo changed
changeset_printer so that it outputs all the troubles for the changeset.
To do it ctx.troubled() is accessed and in turn it asks for obsstore and
unfiltered() repo. It causes tests failures in hg-git because overlay repo has
neither obsstore field nor unfiltered method. This patch adds unfiltered method
that always returns unfiltered repo from the handler.
2017-01-09 05:05:12 -08:00
Henning Schild
7d43fa10eb CONTRIBUTING: add more information on the google group
so contributors have a link to the archive and the mail address and do not
have to google that first
2016-11-13 11:49:23 +01:00
Kevin Bullock
8ee7b3a759 tests: update list of versions we've tested with to include 4.0.1 2016-12-05 18:32:05 -06:00
Durham Goode
e6569cb3fc manifest: update to work with new manifest classes in core
Core hg has refactored the manifest logic to remove the manifest class. So we
need to update our use of manifests to use manifestlog and manifestctx instead.

Tested this by running the tests against hg 3.8, 3.9, 4.0, and @ (c27614f2dec).
2016-11-17 16:22:42 -08:00
Ryan McElroy
92731f9aa3 githandler: respect mapsavefrequency during export
When importing changesets, hggit uses the config knob hggit.mapsavefrequency to
determine how often to save the mapfile. This allows a user to interrupt the
import without losing all progress.

This patch adds this same functionality to the export mechanism.
2016-10-03 04:43:48 -07:00
Sietse Brouwer
5dcfe8fda4 revset_gitnode: allow abbreviated hashes
The previous implementation only allowed passing 40-hexdigit hashes or
12-hexdigit abbreviations to `gitnode(hash)`. Shorter or longer hashes
were accepted, but failed silently. With this fix, any unambiguous
abbreviation is accepted. `gitnode(a5b)` selects the revision whose Git hash
starts with `a5b`, if there is one, and aborts if there are several.
2016-10-06 10:11:14 +02:00
Ryan McElroy
12c6396df8 test-subrepos: update to account for newer git output
git 2.9 outputs a longer path during clone than 2.8 did. Update the tests to
allow either behavior.
2016-09-12 07:40:42 -07:00
Ryan McElroy
77faa86fb8 overlay: add support for upstream manifestlog transition
In mercurial, commit bea06dca98f6 changed some manifest lookups from using
manifest.read(sha) to using manifestlog[sha]. This change adds support for this
new kind of lookup. The old method is not removed to preserve compatibility.
2016-09-12 05:51:16 -07:00
Ryan McElroy
10a129544d stop dying if extras is malformed
A commit's extras field should be considered user-supplied input that can take
any form. Trusting it to be properly formatted is dangerous and can prevent
forward progress. Instead, swallow errors due to malformed extras and carry on.
2016-09-05 03:04:24 -07:00
Ryan McElroy
9c40cc4ed3 add progress to commit discovery phase
In large repositories, the commit discovery phase can take minutes. Let's give
the user feedback on how long it will take.
2016-09-05 03:03:24 -07:00
Sean Farley
137a3aff9c gitdirstate: only wrap for hg-git repos
Previously, if a user enables hg-git and in a non-git repo (i.e.
hg-only) they have a .gitignore, then hg-git will try to parse that. I
consider this a bug and a bad performance regression for what should be
a no-op.
2016-09-02 18:26:01 -07:00
Kevin Bullock
9839edd409 tests: update list of hg versions we've tested with 2016-08-12 16:54:20 -05:00
Sean Farley
7e5aa53a36 git_handler: use compat.passwordmgr for hg < 3.9 support 2016-08-04 14:16:44 -07:00
Sean Farley
791c577b0c compat: add method for backwards compatible passwordmgr 2016-08-04 14:16:06 -07:00
Anton Shestakov
690d2df089 CONTRIBUTING: update the link to Mercurial wiki 2016-07-22 00:35:24 +08:00
Martijn Pieters
68302586a9 Update test to keep graph output stable across versions.
Mercurial 3.8 graph output has changed; set the 'missing parent' style back to
a pipe to keep the test output stable across versions.
2016-04-20 07:22:44 -07:00
Mateusz Kwapich
7bdb16237b overlay: add changelogrevision
test-incoming.t was failing with latest mercurial head (345f4f) because we
didn't implement this method in the git overlay.
2016-03-28 16:22:17 -07:00
Dan Villiom Podlaski Christiansen
dec685e598 git_handler: detect and reject nested Mercurial repositories
The ReviewBoard repository contains a Mercurial repository within its
Git repository; if you just convert that into Mercurial, you can't
check it out. We handle this similar to invalid Git paths: by default,
refuse the conversion, but with a configuration knob to force it
through with a warning.

See also:

https://github.com/reviewboard/reviewboard/
https://reviewboard.org/bugs/3190
2016-02-04 13:33:32 +01:00
Siddharth Agarwal
d30699113e init: mark Mercurial 3.7 as supported and prepare for 0.8.5 2016-02-01 16:56:40 -08:00
Siddharth Agarwal
2f2e01664e test-help: fix for Mercurial 3.7
The other `sed` seems to no longer be necessary, so remove it.
2016-02-01 16:56:54 -08:00
Dmitrij D. Czarkoff
19936ed1b6 test-renames.t: don't use "seq"
Seq is not a standard utility, and explicit loop should be more performant.
2016-01-14 13:33:35 +01:00
Sean Farley
401a99e1cf push: better formatting of messages from the server 2016-01-11 16:28:28 -08:00
Sean Farley
868bf2a374 git_handler: use util method for writing bookmarks 2016-01-08 13:59:39 -08:00
Sean Farley
4ecdfcbaeb util: add method for writing bookmarks 2016-01-08 13:58:47 -08:00
Sean Farley
0927a0ce0f util: regularize mercurial imports 2016-01-08 13:57:03 -08:00
Sean Farley
175b24b557 ignore: add .testtimes to ignored files 2016-01-08 11:30:06 -08:00
Siddharth Agarwal
1636e9e169 version: bump up to 0.8.4 2016-01-02 03:39:18 -08:00
Siddharth Agarwal
25f68d3e38 all-version-tests: test Mercurial 3.6.3 2016-01-02 03:35:55 -08:00
Augie Fackler
2ee07e0b3b git_handler: work around dulwich using unicode for ref names
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.
2015-12-31 18:49:17 -05:00
Augie Fackler
1695f5ea63 hgrepo: ensure all git-origin tags are bytes
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.
2015-12-31 18:48:01 -05:00
Augie Fackler
1c80236266 all-version-tests: wrap to 80 columns and test 3.{5,6}.2 2015-12-07 19:59:17 -05:00
Augie Fackler
ad192a02a6 Makefile: respect HGTESTFLAGS environment variable 2015-12-07 19:58:53 -05:00
Siddharth Agarwal
097c3b3e37 test-push.t: clean up compat cruft 2015-12-31 13:07:49 -08:00
Siddharth Agarwal
d597ed7943 testutil: clean up compat cruft 2015-12-31 13:02:34 -08:00
Siddharth Agarwal
11cf15b0dd test-subrepos.t: clean up compat cruft 2015-12-31 13:01:03 -08:00
Siddharth Agarwal
5b3067b1ca gitdirstate: fix up compat comment
pathutil isn't in 2.8.
2015-12-31 12:56:12 -08:00
Siddharth Agarwal
0b8ebc4c37 gitrepo: clean up compat cruft 2015-12-31 12:54:33 -08:00
Siddharth Agarwal
6b44a596c9 merge 2015-12-31 12:45:30 -08:00
Siddharth Agarwal
4da8faa79d overlay: regularize mercurial imports 2015-12-31 12:37:40 -08:00
Siddharth Agarwal
88776b1c4d gitdirstate: regularize mercurial imports 2015-12-31 12:36:16 -08:00
Siddharth Agarwal
bc415ebbf6 ssh: regularize mercurial imports 2015-12-31 12:34:29 -08:00
Siddharth Agarwal
6e5e1a63de hgrepo: regularize mercurial imports 2015-12-31 12:33:17 -08:00
Siddharth Agarwal
cbe9637432 hg2git: regularize mercurial imports 2015-12-31 12:27:07 -08:00
Siddharth Agarwal
4db39a76a0 init: regularize mercurial imports 2015-12-31 12:26:34 -08:00
Siddharth Agarwal
bd7830175b git_handler: regularize mercurial imports 2015-12-31 12:25:00 -08:00
Laurent Charignon
4ea775d1ba bookmarks: use bookmarks.recordchange instead of bookmarks.write if available
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.
2015-12-30 10:27:24 -08:00
timeless@gmail.com
14a00dff5c init: handle AttributeError in addition to ImportError
If a module doesn't exist, it yields an ImportError,
if an attribtue doesn't exist on a module, it yields an AttributeError
2015-12-29 18:06:14 +00:00