Commit Graph

4 Commits

Author SHA1 Message Date
Durham Goode
bf3cad3004 hggit: store git hash in hg extras
Summary:
In order to move our hg-git mirroring off of the main hg servers, we
need to make it possible for the hg servers to compute the hg-git mapping
without having the entire git repository available. To do so, let's store the
git hash as an extra in the hg commit.

This breaks bidirectionality, but we've long since not needed that.

Reviewed By: phillco

Differential Revision: D13362980

fbshipit-source-id: 51df709bc5e77d78bb963abf90d0c35bb743d966
2018-12-06 12:35:14 -08:00
Durham Goode
e348c3c98c hggit: use transactions during git import
Summary:
Previously hggit used a single transaction for each commit it imported.
This added a lot of over head, such as writing the fncache every time and
committing to sql every time.

Instead, let's use a transaction that lasts a while. We'll tie it to the
existing gitmap save logic, so that we commit commits to disk before writing the
map file (so the map file never references commits that don't exist).

Reviewed By: quark-zju

Differential Revision: D9210162

fbshipit-source-id: 9b1302dfc824055742c4194dfaea7e172e5db6b4
2018-08-07 18:07:08 -07:00
Durham Goode
241ab4bdad hg: add hggit.disallowinitbare config option
Summary:
The hg servers were having trouble bootstrapping the .hg/git directory
because hggit was creating a bare repo and then later git fetches were super
slow. Those .hg/git directories should be managed by infra outside of hg, so
let's add a config knob to prevent hggit from creating a .hg/git repo.

Reviewed By: quark-zju

Differential Revision: D7586441

fbshipit-source-id: 7c2578123428aadaa6a94484e45dda6bd6b5a42d
2018-04-13 21:51:54 -07:00
Ryan McElroy
66bd74e558 hggit: internalize extension
Test Plan: run-tests-.py

Reviewers: mitrandir, #mercurial

Reviewed By: mitrandir

Subscribers: ps, terrelln

Differential Revision: https://phabricator.intern.facebook.com/D6675896

Tasks: T24908724

Signature: 6675896:1515448382:df8d80cd7356ae8f5fb04586dc4a0a651bc498fd
2018-01-09 06:08:01 -08:00