Commit Graph

10 Commits

Author SHA1 Message Date
Durham Goode
37f3fa1f19 gitlookup: change back to b2x
Summary:
My migration of gitlookup to not use b2x was too aggressive. Since the
servers still only respond to b2x, let's keep them as b2x where applicable.

Test Plan:
Ran the tests with the new mercurial (and in some cases with the old
as well).

Reviewers: pyd, sid0, rmcelroy, lcharignon, ericsumner

Differential Revision: https://phabricator.fb.com/D2016082
2015-04-22 14:49:20 -07:00
Durham Goode
cf664f17f0 gitgetmeta: update to work with upstream
Summary:
Upstream has removed the experimental flag from bundle2, so we need to update
getgitmeta to use the new form.

Test Plan: Ran the tests

Reviewers: sid0, rmcelroy, lcharignon, pyd, ericsumner

Differential Revision: https://phabricator.fb.com/D2003041
2015-04-17 14:20:20 -07:00
Siddharth Agarwal
7e95bdd9c0 [gitgetmeta] support named branches
Summary: The named branches support adds a new file called git-named-branches. Support that.

Test Plan: Ran the tests.

Reviewers: durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1655756

Signature: t1:1655756:1415047400:14a3a082390af25c713ef4d9f8721efb05e20875
2014-11-03 12:39:16 -08:00
Durham Goode
e41b3642db Update gitlookup to work with the latest bundle format
Summary:
This will break clients ability to talk to old servers, so we'll need
to roll this out appropriately.k

Test Plan: Tests passed

Reviewers: sid0

Differential Revision: https://phabricator.fb.com/D1633066
2014-10-22 14:24:35 -07:00
Siddharth Agarwal
058326f2c9 [gitgetmeta] fixes for upstream API changes
Summary: per @pyd

Test Plan: Ran the tests.

Reviewers: pyd, davidsp, durham

Reviewed By: durham

Subscribers: pyd, sourcecontrol-dev@

Differential Revision: https://phabricator.fb.com/D1602043
2014-10-07 18:19:17 -07:00
Siddharth Agarwal
2610f6b5fe [gitlookup] fix compatibility with Mercurial 3.2
Summary: The location of `bundle2caps` changed.

Test Plan: Ran the tests, saw that they no longer failed.

Reviewers: durham, davidsp, akushner, pyd

Reviewed By: pyd

Differential Revision: https://phabricator.fb.com/D1562466

Tasks: 5170539
2014-09-17 16:40:37 -07:00
Pierre-Yves David
ca67005ce2 gitlookup: declare unkown parameters in the part handler
Mercurial core now requires handler to declare known parameters. This is used to
detect unhandled mandatory parameter.
2014-06-04 17:18:39 -07:00
Pierre-Yves David
840e36d875 gitlookup: use BundleValueError instead of UnknownPartError
The exception have been renamed and moved into the ``mercurial.error`` module in
mercurial core.
2014-06-04 17:17:15 -07:00
Siddharth Agarwal
5322d7b6fe add a command and server-side support to fetch git metadata
Summary:
When a machine is newly set up, it needs to have the git mapfile available. Generating it from scratch is prohibitively slow for large repos like `configerator`, so instead add a command that can download the entire git metadata from a server that has it.

This is a temporary hack while I work on a real fix to upstream to hg-git. A real fix would be

- part of hg-git
- not send the entire git metadata over, just the bits that are needed based on a common/heads computation
- be dependent on bundle2
- (probably) be part of the pull operation, not a separate command
- be configurable with an option

This isn't part of hg-git, even in a private branch, to emphasize its temporary nature. `gitlookup` might also not be the best fit, but I want to avoid adding yet another extension for a temporary hack.

Test Plan:
Ran the following commands. Note that the current version of `hg` deployed to devservers is broken, so we need to deploy an updated hg before enabling this. These commands were tested against 1ced7c762592

(in `fbandroid-hg`, with `gitlookup` enabled on both ends and the remotefilelog fix in D1341059)

    hg gitgetmeta ../fbandroid-from-git

Saw that 3 files were written out.

    hg gitgetmeta ssh://localhost//data/users/sid0/fbandroid-from-git

Saw that 3 files were written out.

Reviewers: dschleimer, davidsp, akushner, durham, pyd

Reviewed By: pyd

Differential Revision: https://phabricator.fb.com/D1341166

Tasks: 3751836
2014-05-20 22:32:54 -07:00
Siddharth Agarwal
cdda6c15f8 add an extension that allows server-side hg->git and git->hg lookups
Summary:
This is a massive hack until Dewey becomes capable of answering these questions.

The plan is to use these commands in `arc diff` and `arc patch` to send the Git versions of the base commit over, so that the diff and land infra reaches parity with Git.

This should also unblock configerator-hg and allow the landing strip to work.

Test Plan:
In my `fbandroid-from-git` repo, enabled this extension, and then added the config:

```
[gitlookup]
mapfile = git-mapfile
```

Then, ran

```
hg id -r _gitlookup_hg_1fe73e73af4acadf1865a41e3aaa518a70cc2302 ssh://localhost//data/users/sid0/fbandroid-from-git -i --debug
```

Saw that the last line printed out was `76327beadc98c7c0559cd8aa36f0a25d93d781a5`, the Git equivalent of that commit.

After this, ran

```
hg id -r _gitlookup_git_76327beadc98c7c0559cd8aa36f0a25d93d781a5 ssh://localhost/data/users/sid0/fbandroid-from-git -i --debug
```

Saw that the last line printed out was `1fe73e73af4acadf1865a41e3aaa518a70cc2302`, as expected.

Reviewers: dschleimer, akushner, davidsp, pyd, mpm, durham

Reviewed By: durham

Subscribers: pradvenkat, akshay, thawan

Differential Revision: https://phabricator.fb.com/D1330813

Tasks: 3751836
2014-05-14 16:17:25 -07:00