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
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
Summary: We previously aborted with a KeyError traceback.
Test Plan: Run that thing with an unknown command, got a clear abort
Reviewers: durham
Differential Revision: https://phabricator.fb.com/D1299542
A change in core mercurial added --edit to the commit options. This conflicted
with the fbamend --edit, which caused hg commit --amend -l foo.txt to actually
open the editor. Breaking arc diff.
Smartlog is supposed to sort commits such that master is a straight line on the
left. This broke in the last commit because we passed master as 'master' instead
of as a rev number to the sorter.
- Adds a -r flag that allows you to view the smartlog of any arbitrary set of
commits. It displays those commits, how they are related, and the common
ancestor.
- Fixes a dag bug where a node with ancestors from seperate lineages would not
have a line drawn to the first ancestor. This was because the fake node logic
overwrote the original fake node when it saw the second one.
- Fixes smartlog to work better with branches. Previously it only ever hid
commits that were ancestors of the 'master' commit. Now, if you are on a
different branch from the master, we will also show the tip most public commit
on that branch, and hide all of it's ancestors. If you are on the master
branch, nothing has changed.
- Add a warning message at the bottom of the output when we know we're hiding
old heads from you. Adds a --all flag for showing all heads, even old ones.
Summary:
Adds an 'hg backups' command that lists the commits in the backup
bundles, newest first. It also allows 'hg backups --recover <commit hash>' which will then
recover the commit from the appropriate backup bundle.
The default output looks like so: https://www.facebook.com/pxlcld/l0gC
Test Plan: Ran it. See the screenshot
Reviewers: mpm, sid0, dschleimer, pyd, davidsp
Differential Revision: https://phabricator.fb.com/D1183032
Summary:
phrevset can hang when the revwalk already returns a rev but
the parallel arc call didn't finish with arc having subprocesses running.
This will result in hg log showing output but hanging for a quiet a bit.
We have to use a processgroup and make arc the leader of it to kill
all it's subprocesses properly. Note this will make it incompatible
with windows.
Test Plan:
Tested locally and ensured that a differential revision is
found and we abort nicely.
Reviewers: durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1096568
If the repo had a lots of heads, the ancestor revset would previously cause
a stack overflow in the revset parser. I changed it to not use revsets at all.
If the repo had a merge, the ancestor walk code was sometimes adding the
entire repo to the rev list. I changed it to only add nodes that are > the
common ancestor.
Added smartlog to the default pager attend list.