Commit Graph

2 Commits

Author SHA1 Message Date
Jun Wu
66f2e5f45e branch: disable branchcache and drop all branches other than "default"
Summary:
This hardcodes several perftweaks configs that have been enabled for major FB
repos for months:

  [perftweaks]
  disablebranchcache = True
  disablebranchcache2 = True
  disableresolvingbranches = True
  disableupdatebranchcacheoncommit = True

Practically, this means the branchmap is now just `{'default': heads}`. (i.e.
there are no named branches other than `default`), and branchcache is removed
(i.e. `.hg/cache` does not exist without clindex or in-repo tags).

This diff only makes easy-to-verify logic changes by assuming the configs and
removing dead code. Things can be further cleaned up. They will be done by
upcoming changes.

Most test changes are due to the fact that `.hg/cache` is no longer created.

Reviewed By: singhsrb

Differential Revision: D14179858

fbshipit-source-id: 479f7427168eb1d9614a973e273a229e50f5620a
2019-02-22 21:02:41 -08:00
Jun Wu
e1e3cc79e7 filecommit: add a fast path to reuse raw revision data
Summary:
This is a resend of https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097693.html,
with Yuya's comments addressed and some additional comments.

The original commit message is:

> The high-level idea is similar to metadataonlyctx.
> If filelog parents and metadata match, then raw revision data (rawtext,
> rawflags, hash) could be reused. This saves time calculating hash or going
> through flag processors.

Note in the original patch, the amend operation is not using the fast path.
But it uses the fast path today. That's because singhsrb's D636 change
(cmdutil: remove the redundant commit during amend):

```
                    # If the file being considered is not amongst the files
                    # to be amended, we should return the file context from the
                    # old changeset. This avoids issues when only some files in
                    # the working copy are being amended but there are also
                    # changes to other files from the old changeset.
                    if path not in filestoamend:
                        return old.filectx(path)
```

Reviewed By: DurhamG

Differential Revision: D8986780

fbshipit-source-id: 7d18957a713f90eafb786446972020f7939c3671
2018-07-27 20:06:07 -07:00