Commit Graph

146 Commits

Author SHA1 Message Date
Arun Kulshreshtha
6c8c87dea1 edenapi: add curl-based client
Summary:
Add a new Eden API client based on libcurl (via the rust-curl crate). This should help us work around issues with Hyper.

This implementation is based on curl's "easy" API, and is intentionally naive. I intend to update it to use curl's "multi" API to send several concurrent HTTP requests per operation in a later diff.

Differential Revision: D14656756

fbshipit-source-id: 1f71074506844104f0f3237023b38317a7f41979
2019-04-05 17:34:14 -07:00
Stefan Filip
9751716173 commitctx: refuse to commit files names that can't be interpreted as UTF-8
Summary: This is a stop gap measure while we move internal path encodings to UTF-8.

Reviewed By: quark-zju

Differential Revision: D14791761

fbshipit-source-id: e4d5a845aa4f28ed0744cf80021fd1446f3d6129
2019-04-05 16:30:00 -07:00
Stefan Filip
60e885a890 localrepo: import error module as errormod
Summary: `commitctx` takes error as a named parameter shadowing the module import.

Reviewed By: quark-zju

Differential Revision: D14805901

fbshipit-source-id: 359a6d19d6a08b3c65ebf1af8a5e5baaec6711a2
2019-04-05 16:30:00 -07:00
Marla Azriel
36a67da6f7 commands: help text for commit
Summary: Updated help text for hg commit

Reviewed By: kulshrax

Differential Revision: D14811336

fbshipit-source-id: dbc26b3409094b1f70aca01b0f9ff89693ce7861
2019-04-05 16:23:14 -07:00
Jun Wu
31c8ecbdf4 dispatch: print shorter crash header
Summary:
Change the crash header to just a single line without blaming extensions or
Python. This makes the crash log shorter, and easier to read when there are
crashes in run-tests.py diffs.

Remove `ui.supportcontact` since it's no longer used.

Reviewed By: sfilipco

Differential Revision: D14393982

fbshipit-source-id: 3ede8d3d3d8fd5d125944a9a750350d3ce356b14
2019-04-04 23:38:34 -07:00
Mark Thomas
9867fdb893 cmdutil: add checkout identifier to commit loginfo
Summary:
Add the checkout identifier to the loginfo for commit contexts that take data
from the working copy.

Reviewed By: quark-zju

Differential Revision: D14751601

fbshipit-source-id: 6ddcbf17b970ee24237edf501ae3d7fc8d320193
2019-04-04 11:29:50 -07:00
Mark Thomas
5274006a31 context: add loginfo for committable contexts
Summary:
Add `loginfo`, a new field to committable contexts, the contents of which will
be logged when the commit is committed to the repository.

Initially the logging only includes the commit node and author, but more things
will be added later.

Reviewed By: quark-zju

Differential Revision: D14751602

fbshipit-source-id: 2432dfb92dd2489cb8ad3464316a42ebaa79657c
2019-04-04 11:29:50 -07:00
Mark Thomas
fc9106e076 dirstate: add checkoutidentifier to identify and correlate checkouts
Summary:
When the user checks out a new commit (either by updating to it, by
creating a new commit, or by amending or rebasing the current commit), create a
unique identifier for that checkout.

Log this identifier at the start and end of command processing, and allow other
tools to also query and log the identifier.

This allows both Mercurial commands and other commands that log the identifier
to be correlated with a particular checkout.

Reviewed By: quark-zju

Differential Revision: D14648523

fbshipit-source-id: 2fad79c3010f5fad1a0e180e3d3d6d9c0a7f8e85
2019-04-04 11:29:49 -07:00
Mark Thomas
528a5b064e util: extract makerandomidentifier from clienttelemetry
Summary: Extract the `makerandomidentifier` function from the `clienttelemetry` extension so that we can use it elsewhere.

Reviewed By: quark-zju

Differential Revision: D14725866

fbshipit-source-id: 0b3ed2e8c9698e892ad0f524f6dde7bf7337f85c
2019-04-04 11:29:49 -07:00
Mark Thomas
9cf99b9293 sampling: log working directory parents before and after commands
Reviewed By: quark-zju

Differential Revision: D14648522

fbshipit-source-id: 7c67ae3fa0542dd38fd87c5e2a2b421f73e4e12d
2019-04-04 11:29:49 -07:00
Arun Kulshreshtha
d5c9b17b05 bindings: turn off non_camel_case_types warnings
Summary: We're intentionally exporting Python classes with names that match Mercurials convention of `allonewordlowercase`, so we should turn off this lint.

Differential Revision: D14760996

fbshipit-source-id: cf79e8ebb6a01bd7bcfb062754cb034d94ac493b
2019-04-03 18:27:28 -07:00
Marla Azriel
39e4eb08af commands: help text for status, add, remove
Summary: Updated help text for hg status, hg add, hg remove

Differential Revision: D14627242

fbshipit-source-id: 83367838273e861b9ca6e73e588b175219dbe187
2019-04-02 14:26:03 -07:00
Arun Kulshreshtha
1472ff1efa edenapi: refactor Builder into Config
Summary:
Rather than having a `Builder` struct that knows how to build just one kind of Eden API client, let's have a common `Config` type that can be potentially passed to the constructor of several different client implementations.

This will allow the same config code to be re-used across different client types, as seen later in this stack.

Differential Revision: D14656757

fbshipit-source-id: 883ffd2dc0302ebe08960f079c113e2d0da2d2ca
2019-04-01 20:15:38 -07:00
Jun Wu
74bade4e9a progress: reduce overhead when a nested bar is used in a loop
Summary:
Before this change, the following command will redraw the progress bar
frequently:

  ./hg debugprogress  --sleep 1 100000 --config progress.refresh=1 --nested

After this change, the above command only redraws once per second.

This should reduce overhead in `repack.py:repacker.repackdata`.

Differential Revision: D14693924

fbshipit-source-id: baa281ba2e262d2ef8e83c2460f7edf5400db1af
2019-03-29 20:32:22 -07:00
Jun Wu
9cba88f929 debugprocess: add a --sleep parameter
Summary: This makes it easier to debug real world progress related issues.

Differential Revision: D14691592

fbshipit-source-id: 2a653f657b6ba9f9369f1551845949ac7e4d0b9d
2019-03-29 20:32:22 -07:00
Durham Goode
b5d29d31b4 pushrebase: fix pushrebase for treeonly lfs pushes
Summary:
When doing a pushrebase, the server needs to mount a bundle over the
exist repository to run hooks. With lfs enabled this uses changegroupv3, and
with a treeonly client no manifests are sent as part of the changegroup (they
are instead sent as a separate part).

The combination of these three things hits an edge cases where if there are no
manifests in a changegroupv3 bundle, the bundlerepo class may not skip the
entire manifest part, and therefore the bundle appears to have no files in it,
even though the data is there.

This only happens if the server is in treeonly mode, or during pushrebase hooks
where we fake treeonly mode briefly. Since we don't have any server repos that
are treeonly and lfs yet, this didn't break us, but it would have. We caught it
because some of our hooks are affected when they try to read file contents.

The fix is to account for the cgv3 case in the bundle manifest consuming code.
Eventually we can get rid of all of this logic once we get rid of revlogs and
changegroups.

Differential Revision: D14676674

fbshipit-source-id: 86ac1ff4a92e37c4da3767a66760b55b658c836f
2019-03-29 13:57:54 -07:00
Xavier Deguillard
9d7bf6b735 dispatch: SIGPIPE do not exist on Windows
Summary:
On Windows, SIGPIPE isn't present in the signal module. This caused the exit
code to raise an exception when trying to install a handler for it.

Reviewed By: DurhamG, strager

Differential Revision: D14655142

fbshipit-source-id: 68ddfc5250a4b706c5bc6a7ad1add37e1ccbe26e
2019-03-27 19:13:55 -07:00
Mark Thomas
4b3fe9d147 mutation: compute fate only for obsolete commits
Summary:
When changes are undone so that an earlier view of the repo is present, fate
should only be calculated for commits that are obsolete in the current view.

This makes smartlog look correct after `undo` commands have been used.

Reviewed By: quark-zju

Differential Revision: D14603198

fbshipit-source-id: 3adaad94b9fe80e8a622d469513c784b772ee235
2019-03-27 04:49:14 -07:00
Mark Thomas
f008868a63 mutation: cache obsolete computations
Reviewed By: quark-zju

Differential Revision: D14603197

fbshipit-source-id: b7f9dc099f5a26663cbda970b58dd7d3b65159a8
2019-03-27 04:49:13 -07:00
Mark Thomas
ab9eb302f2 mutation: record mutation entries inside transactions
Summary:
Record mutation entries inside transactions.  This ensures that they only get
written when the transaction completes.

Indexedlog doesn't have support for pending writes, so mutation entries are not
visible to hook scripts.

Reviewed By: quark-zju

Differential Revision: D14566781

fbshipit-source-id: eb4c7bbd3878df82e8e7096a69509525f9fb93c0
2019-03-27 04:49:13 -07:00
Mark Thomas
29b30257b2 mutation: remove mutationcache
Summary:
Remove the last parts of the mutationcache, relying directly on the indexedlog
indexes.

The set of obsolete commits is now computed on the fly - we will cache this
later.

Reviewed By: quark-zju

Differential Revision: D14566780

fbshipit-source-id: 770d0d9d507bed982e88518dcf63a4c2d6b46a69
2019-03-27 04:49:13 -07:00
Mark Thomas
161db7bd2f visibility: clear filteredrevcache when visibility changes
Summary:
When visibility changes, the cache of filtered revs is no longer valid and must
be cleared.

Reviewed By: quark-zju

Differential Revision: D14566777

fbshipit-source-id: 681a73c126f3258baa7f61157aba557ea8aceeca
2019-03-27 04:49:13 -07:00
Mark Thomas
1a57ee38e2 mutation: move store to localrepo unfilteredproperty
Summary:
To prepare for transaction support, we need to move the store out of the cache
object and into its own property on the localrepo.

Reviewed By: quark-zju

Differential Revision: D14566776

fbshipit-source-id: 8fff03a86953fb60ed06dbbdcdd0bffc379bd047
2019-03-27 04:49:13 -07:00
Mark Thomas
6d84ff8825 mutation: create mutation store entries for local commits
Summary:
Computing mutation entries for all local commits is expensive when there are
lots of local draft commits.  Ideally we would have an indexed changelog that
would make these lookups fast, but until we have that, put entries in the
mutation store for these commits to take advantage of the fast lookup there.

Reviewed By: quark-zju

Differential Revision: D14566782

fbshipit-source-id: cc3a05715337a510a65d8ff436c59d16d0f0447e
2019-03-27 04:49:12 -07:00
Mark Thomas
4cef0e2f38 mutation: remove instabilities revsets
Summary:
The computations for instabilities revsets (`orphan`, `contentdivergent` and
`phasedivergent`) are complex, and aren't really necessary for the way we use
mutation information.

The `orphan` revset can be implemented as an alias for `obsolete():: -
obsolete()`.  The other conditions can be detected on a case-by-case basis
later if we need them.

Reviewed By: quark-zju

Differential Revision: D14566784

fbshipit-source-id: 60b8443ad4c0c82d8250d8e9a10e73fae770daa8
2019-03-27 04:49:12 -07:00
Mark Thomas
d6cf315f8f mutation: prefix predecessor hashes with hashing scheme
Summary:
To support future alternate hashing schemes, predecessor identities should be
prefixed with the hashing scheme in use.

Currently there is only one hashing scheme: `hg`, which is the Mercurial
hashing scheme.

Reviewed By: quark-zju

Differential Revision: D14566778

fbshipit-source-id: baaaf2f078886a1cc7ac20d12923a63b4da09db6
2019-03-27 04:49:12 -07:00
Jun Wu
d03f2d26c2 manifest: drop manifestv2 support
Summary:
The upstream has removed it in https://phab.mercurial-scm.org/D2393. Do the
same.

The deleted C++ code seems to leak `Py_False` if `usemanifestv2` is not set.

Reviewed By: singhsrb

Differential Revision: D14611525

fbshipit-source-id: d828526c31aaa861d100a846bba79d1f5898e245
2019-03-26 13:32:45 -07:00
Jun Wu
f3d5b0e27e revlog: drop v0 and v2 support
Summary:
A user hit cryptic error message:

  File "revset.py", line 423, in ancestor
    ancestors = repo.changelog.index.ancestors
  AttributeError: 'list' object has no attribute 'ancestors'

That was because they have run `rm -rf` and the `.hg` directory was mostly
removed. `hg` falls back to revlog v0, and the code in question obviously
dislikes revlog v0.

Change the error message to just say repo corruption.

Since there are code depending on revlog v1, and we don't use v0 or v2. Remove
both of them.

Reviewed By: singhsrb

Differential Revision: D14610769

fbshipit-source-id: 9015b74989d8fa4ad50bc36ec48bca26a1faa361
2019-03-26 13:32:45 -07:00
Durham Goode
73683c048e tracing: add various tracing across the code base
Summary:
Now that we have perftracing infra, let's trace a bunch of likely
problem spots.

Reviewed By: sfilipco

Differential Revision: D14426367

fbshipit-source-id: 354a241aa9ac5d75d34062a9838d581b4f46746f
2019-03-25 19:31:13 -07:00
Jun Wu
077313f1af dispatch: move deferred to atexit handler
Summary:
See D14606986 for context. `repo.close` should be protected by not crashing on
stdout or stderr write errors (SIGPIPE or EPIPE). Move `deferred` to `atexit`
handler to get the protection.

Test changes are caused by ordering changes.

Differential Revision: D14607407

fbshipit-source-id: 5a42aefcec395f48b8ecb67426429ef2e41f5666
2019-03-25 18:33:05 -07:00
Jun Wu
7873db8242 ui: silent stdio write errors during atexit
Summary:
This is the first diff of an alternative fix of D14528603. See also D14603974
for context.

We'd like atexit handlers to not crash with EPIPE or SIGPIPE when writing to
stderr or stdout. Therefore disable SIGPIPE signal handler and patch ui methods
to do so.

Differential Revision: D14607159

fbshipit-source-id: 274c5174813d402a7e0b8b5be7c8fcb0524fcdb3
2019-03-25 18:33:05 -07:00
Jun Wu
a3c4fd17e8 Back out "[hg] ui: do not enable SIGPIPE when running the pager"
Summary:
akushner and I both hit an issue where `hg log` hangs for a long time after
exiting the pager by pressing `q`. That was caused by D14528603. Revert it to
fix it.

The root cause is apparently a bug in Python 2 (or C stdlib?):

  # a.py
  import signal, os
  signal.signal(signal.SIGPIPE, signal.SIG_IGN)
  out = os.fdopen(1, 'wb', 1)
  while True:
      out.write(b"a\n")
  # shell
  python2 a.py | head -n 1
  # hangs

Python 3 does not have the issue.

Reviewed By: singhsrb

Differential Revision: D14603974

fbshipit-source-id: 3b4d716133853632e56dfeb59b1858f926a2c146
2019-03-25 18:33:05 -07:00
Durham Goode
ce423933c3 tracing: log perftraces to the blackbox
Summary:
Now that we're recording perftraces, let's log their results to the
blackbox if the command exceeds a configurable threshold.

Reviewed By: sfilipco

Differential Revision: D14426366

fbshipit-source-id: 24f261aaa2b089dbc959d709e51de1c0359d976d
2019-03-25 17:12:42 -07:00
Durham Goode
f2b414c324 tracing: add tracing for command dispatch
Summary:
Adds tracing for the command dispatch.  All other traces will be a
child of this root level trace.

Reviewed By: sfilipco

Differential Revision: D14426369

fbshipit-source-id: 2b996e027a2d6b163162bdceba571a3ee2186f6b
2019-03-25 17:12:42 -07:00
Durham Goode
31934386ed tracing: add ascii rendering for perftrace module
Summary:
The previous diff added functions for collecting data. Now let's add a
way to render it to ascii.  Future renderers may render this to json or the
Chrome trace format.

Example output:
```
 0.0  hg rebase -d 'master~100' -s 8342640303e2 (43.4s)
 0.0    Repo Setup (0.0s; local)
 0.0    Rebase (42.5s; disk-fallback)
 0.0      --missing-- (8.0s)
 8.0      Calculate Updates (34.1s)
 8.1        Prefetch Files (0.0s)
   :          * Keys: 0
   :          * Missing Data: 0
 8.1          LFS Prefetch (0.0s)
 8.1        --missing-- (33.2s)
41.3        Prefetch Files (0.0s)
   :          * Keys: 2
   :          * Missing Data: 0
41.3          LFS Prefetch (0.0s)
41.3        Check Unknown Files (0.0s)
42.1        Status (0.0s)
   :          * A/M/R Files: 2
42.1        Prefetch Files (0.0s)
   :          * Keys: 1
   :          * Missing Data: 0
42.1          LFS Prefetch (0.0s)
42.1      Prefetch Files (0.0s)
   :        * Keys: 0
   :        * Missing Data: 0
42.1        LFS Prefetch (0.0s)
42.1      Apply Updates (0.1s)
   :        * Actions: 2
42.2      Status (0.0s)
   :        * A/M/R Files: 2
42.2      Prefetch Files (0.0s)
   :        * Keys: 1
   :        * Missing Data: 0
42.2        LFS Prefetch (0.0s)
43.4
```

Reviewed By: sfilipco

Differential Revision: D14426370

fbshipit-source-id: 338348297372874b2d8f08dd07b411b90d33a5fa
2019-03-25 17:12:42 -07:00
Durham Goode
cdaf9a1a18 tracing: add initial perftrace module
Summary:
Adds the initial perftracing infra. It's just a collection of functions
for starting and ending tracing and associating data with the traces.

Reviewed By: quark-zju

Differential Revision: D14426368

fbshipit-source-id: 72a2fad901ff52877f3958db2b924d95f45eeac7
2019-03-25 17:12:42 -07:00
Xavier Deguillard
b7c4ad771b eden: properly close repo in debugedenimporthelper
Summary:
Closing a repo is required to commit the pending transactions, or to run a
background repack when packfiles were downloaded. Usually, the close method is
called in dispatch after a command is run and a valid repository was passed via
-R. The debugedenimporthelper however may open the repository manually, and
since it doesn't close it, we may end up with a large number of packfiles.

Let's manually close it to avoid this issue.

Reviewed By: simpkins

Differential Revision: D14531514

fbshipit-source-id: 9b2d1648775e4a2c9eea4c232bf0ae4fee43297d
2019-03-25 10:27:48 -07:00
Jun Wu
45e726f245 ignore: revise debugignore
Summary:
Change debugignore to test directories properly (which, only affects sparse
repos in practise) and stop printing out the source ignore rule location, as we
no longer have that information in the gitignore world.

Reviewed By: markbt

Differential Revision: D14547049

fbshipit-source-id: e7c307b1e1f4a8dcd30d00bec1f3e7a84a14b47b
2019-03-22 08:18:24 -07:00
Durham Goode
1186282722 workers: flush mutable data before forking workers
Summary:
We encountered a bug where if a file descriptor was not flushed prior
to forking the process, then both processes would end up flushing the same data
to the file, resulting in duplicate data and a corrupt file.

The real fix is to stop using fork, but for now let's address the most visible
problem by flushing pack files before forking.

Reviewed By: kulshrax

Differential Revision: D14569005

fbshipit-source-id: e002abe72c8014cbe49ccffab6159f8372affdb0
2019-03-21 16:20:36 -07:00
Jun Wu
b40af5890c metrics: add metrics about fetching remote data
Summary: Log data about round-trip count, and object count for files, trees, and SSH calls.

Differential Revision: D14515776

fbshipit-source-id: cce416fd7dccdad3c73a9f1751a04ddac0d2c507
2019-03-20 22:49:18 -07:00
Jun Wu
ea16e76336 metrics: make ui.metrics.gauge log to the sampling extension
Summary:
Make it possible to use `ui.metrics.gauge` to collect metrics for a single
command, via the sampling extension.

Differential Revision: D14515775

fbshipit-source-id: e8a53549b00c1bc7b6509a5990a51d955d767d7e
2019-03-20 22:49:18 -07:00
Jun Wu
0dfbf77f04 extensions: always enable the sampling extension
Summary: This makes sure `ui.log` always runs through the sampling code path.

Differential Revision: D14515774

fbshipit-source-id: 585cd14eaecda12a9c2dd6ed003f0a457d67daf1
2019-03-20 22:49:18 -07:00
Jun Wu
6a4c2ea9b5 metrics: slightly change the API
Summary:
Before this patch, metrics was designed to send stats to a global counter. I'd
like to use it for stats local to the current command (ex. count of file
fetching, count of round-trips, etc).

Change the API so "entity=None" forbids stats from sending to a global counter.

Differential Revision: D14515779

fbshipit-source-id: b5b3b040d674c71f467153c308b56aa6f506eb0c
2019-03-20 22:49:18 -07:00
Jun Wu
d47e205e87 ignore: disable hgignore by default
Summary:
Disable parsing `.hgignore` and related fileset `hgignore()` by default. They can
still be enabled via configuration. The plan is to completely remove them
later.

A replacement for `hgignore()` fileset was added as `gitignore()`.

The `hgignore()` fileset seems to be only used by zertosh in the past 3 months.

Reviewed By: singhsrb

Differential Revision: D14543232

fbshipit-source-id: f2385062a0e816331f693239f62448979876078a
2019-03-20 22:32:58 -07:00
Xavier Deguillard
98dab40761 ui: do not enable SIGPIPE when running the pager
Summary:
SIGPIPE is a weird signal. It is sent to a process that tries to write to a
pipe (or socket) whose other end has been closed. On top of the signal being
sent, the write will also fails with EPIPE, and thus SIGPIPE is sometimes used
to avoid checking the return status of write (!!!) and to gracefully exit.

In Mercurial, the SIGPIPE is used to raise an exception to do exactly this, but
it also appears that the writes to stdout/stderr are already checking the
return value and doing the right thing, hence SIGPIPE is unecessary.

In the case of Mercurial, catching SIGPIPE has another interesting behavior.
The command `hg log -p` has a different behavior once the pager is killed
depending on whether HGPLAIN is set or not. When unset, `stderr` is also
redirected to the pipe, and thus any logs printed after the pipe is closed will
force Mercurial to quit. While this is the expected behavior in most cases,
it is not when the logs are happening during cleanup, as they will effectively
abort the teardown process.

Overall, it's better to just not install a SIGPIPE handler, so let's remove it.

Reviewed By: kulshrax

Differential Revision: D14528603

fbshipit-source-id: f51fb13016cc7b8d622e91c60d4c5286c7b404e5
2019-03-19 16:09:18 -07:00
Jun Wu
3039c8dbfb util: trust st_nlink for known filesystems
Summary:
The check was added to "distrust" st_nlink, to workaround issues on CIFS [1].
The check only works for filesystem supporting hardlinks.

If a filesystem is marked as "st_nlink cannot be trusted", then vfs.py will take
a conservative approach to break hardlinks when writing, by copying the file
followed by a rename.

Therefore, filesystems without hardlink support (esp. edenfs) would go through
the slow path - every file written via vfs.py would be copied unnecessarily.

Fix it by skipping the check for known filesystems, including edenfs.

[1]: https://bz.mercurial-scm.org/1866

Reviewed By: DurhamG

Differential Revision: D14527370

fbshipit-source-id: 579111f5c72fa3d016f98c248b29c96afdc59086
2019-03-19 15:39:19 -07:00
Harvey Hunt
9f82b1f8e8 hg: Add ability to check repo lock status from hgsql
Summary:
As part of the mononoke write path rollout we want to be
able to dynamically block writes to a repo. This is implemented as
a table in hgsql (repo_lock) that both hg and mononoke can read, but
will only be updated by scmadmin.

Expose a function that can be used by in-process hooks to check if a repo is
locked for mercurial.

Reviewed By: quark-zju

Differential Revision: D14279169

fbshipit-source-id: f8bb4afeeeda67796cf806ab7f3fe42f4089818f
2019-03-18 09:42:37 -07:00
Johan Schuijt-Li
3e436ef80b util: increase chunk size from 128KB to 2MB
Summary:
On connections that might experience higher latency the throughput for a clone
is easy to spike, raising the chunk size results in more consistent throughput.

Given that hardware these days has plenty of memory, this change shouldn't make
any significant difference either.

Reviewed By: farnz

Differential Revision: D14502443

fbshipit-source-id: 0e90f955304e9955df0ec69b5733db7c34b09e83
2019-03-18 07:30:23 -07:00
Jun Wu
3ca494b062 revset: optimize ancestor revset function
Summary:
Change `ancestor` to send 24 revs to the native ancestor logic at a time,
instead of 2 revs at a time.

This makes it much faster when calculating ancestor of many commits.

Before:

  quark@devvm33994 ~/fbcode/scm/hg % hg.real log -r 'ancestor(limit(draft(),6000))' -T '{node}\n' --time --hidden
  ca4beab06459e016ac1b4041400029165b701afa
  time: real 66.620 secs (user 44.800+0.010 sys 21.840+0.000)

After:

  quark@devvm33994 ~/fbcode/scm/hg % ./hg log -r 'ancestor(limit(draft(),6000))' -T '{node}\n' --time --hidden
  ca4beab06459e016ac1b4041400029165b701afa
  time: real 3.470 secs (user 2.380+0.000 sys 1.000+0.020)

This also affects `merge.preferancestor`. That's a dangerous config option and
seems fine to be ignored in the revset implementation.

Reviewed By: DurhamG

Differential Revision: D14461521

fbshipit-source-id: ec00921aece0adc6aaca49e5580bff52784c4ca5
2019-03-14 20:14:37 -07:00
Durham Goode
ee7f2e0275 archive: prefetch remotefilelog files before executing archive
Summary:
Currently archive is almost useless because it fetches each file
one-by-one. Let's add prefetching.

Differential Revision: D14460880

fbshipit-source-id: 1f06e1ac9d03aae3ab27d3064f9fe6141051be06
2019-03-14 14:57:50 -07:00