Commit Graph

1834 Commits

Author SHA1 Message Date
Jun Wu
66c0778db7 treemanifest: enable useruststore by default
Summary: It has been enabled for a long time in our production config.

Reviewed By: kulshrax

Differential Revision: D27953636

fbshipit-source-id: 428f6e8a3e7eae6d44c61970624a75d7d1ab3e36
2021-05-04 18:28:45 -07:00
Jun Wu
37404e7f64 treemanifest: enable ondemandfetch by default
Summary: It has been enabled for a long time in our production config.

Reviewed By: kulshrax

Differential Revision: D27953635

fbshipit-source-id: a351342fbc8cffccd16967bd0e7032ac3e4f35cf
2021-05-04 17:00:56 -07:00
Jun Wu
49e8c82d07 exchange: pull from EagerRepo without getbundle
Summary:
Add "getbundle" alternative "commitgraph" for pulling from a EagerRepo.
This avoids tech-debt like bundle2 or linkrev. It depends on a lazy
(text) changelog backend.

Reviewed By: kulshrax

Differential Revision: D27951620

fbshipit-source-id: f21119d37da6505e68c6c5f3b33b9bd1f65e4d9a
2021-05-04 17:00:56 -07:00
Jun Wu
199fba304a changelog2: allow migrating to lazy backend from an empty repo
Summary: It's okay to migrate to any backend if the repo is empty.

Reviewed By: kulshrax

Differential Revision: D27951626

fbshipit-source-id: 27c00c853bf73fa3c696d74f3c05eb620f35db0e
2021-05-04 17:00:56 -07:00
Jun Wu
494309f22a exchange: push to EagerRepo without unbundle
Summary:
Add "unbundle" alternative "addblobs" for pushing to a EagerRepo.
This avoids tech-debt like bundle2 and linkrev.

Reviewed By: kulshrax

Differential Revision: D27951628

fbshipit-source-id: 3315e0653ee12928993e4e9325fbe8e2c369307b
2021-05-04 17:00:56 -07:00
Jun Wu
abe4222df9 eagerepo: move url handling to Rust
Summary: So that we don't duplicate the URL handling in Python.

Reviewed By: andll

Differential Revision: D28006552

fbshipit-source-id: 2efda622fe86787373fa4ec5978537588defec28
2021-05-04 17:00:55 -07:00
Jun Wu
917e8f3e67 eagerpeer: add a new peer type backed by EagerRepo
Summary:
`peer` is the interface in hg to support push/pull. Implement it for EagerRepo.
Note: `getbundle` and `unbundle` are not implemented yet. Push / Pull are not
working yet. They will be made work later.

Reviewed By: kulshrax

Differential Revision: D27951621

fbshipit-source-id: 71f9c26713a532a0712460fa2aa34125b2b67e35
2021-05-04 17:00:55 -07:00
Pyre Bot Jr
99f17e57ed suppress errors in fbcode/eden - batch 1
Differential Revision: D28190108

fbshipit-source-id: 6d67de1cb21f6ec4400adae2f42811f1f3e5d155
2021-05-04 15:25:14 -07:00
Jun Wu
4c5d7c2123 ui: normalize foo://path to foo:path when finding name for url
Summary: This will affect upcoming changes.

Reviewed By: kulshrax

Differential Revision: D27951629

fbshipit-source-id: e1b24c187424962eb1f0e6c81370eca264eaa20a
2021-05-03 13:21:08 -07:00
Jun Wu
f31f5ebcd5 commands: update help text of log
Summary: It has been wrong since 2014 (tweakdefault).

Reviewed By: kulshrax

Differential Revision: D28122703

fbshipit-source-id: c83ddbac2c6162e36672649c60c2e7916dc7cbd2
2021-04-30 15:13:21 -07:00
Andrey Chursin
dd5909abe8 checkout: read native checkout concurrency from config
Summary:
This diff makes concurrency of native checkout to be configurable
This config can be used to reduce concurrency on platforms that are known to cause issues with watchman due to too many checkout operations

Reviewed By: quark-zju

Differential Revision: D28074993

fbshipit-source-id: 0a09fcf3ae48d08cead36da56c06b546aecd16b4
2021-04-30 13:04:57 -07:00
Jun Wu
d3de89f62c changelog: do not consider integers revs for shortest
Summary:
After D27144492 (48cd15ab14) we disabled revision number resolution. There is no need to
consider it when calculating shortest prefix.

Reviewed By: DurhamG

Differential Revision: D28072997

fbshipit-source-id: 832017c7b626265eb8cd2dd78946a03c4e7228f6
2021-04-29 13:39:31 -07:00
Jun Wu
9bf34fe364 remotenames: pass list to pushop.remote.known
Summary:
The "known" API is expected to accept a list with ordering guarantees.
Avoid passing `set` to it. This also stabilizes debug outputs in (upcoming)
tests.

Update `setdiscovery` to pass a list with stable order too.

Reviewed By: kulshrax

Differential Revision: D27951627

fbshipit-source-id: a2718e4380f80584fc8afc35d14e524ab428f9bd
2021-04-28 12:28:28 -07:00
Andrey Chursin
11eb0eb74e debugdryup: handle sparse profiles
Summary: This makes use of plan calculation logic in merge.py

Reviewed By: quark-zju

Differential Revision: D28045174

fbshipit-source-id: f2bfd1104ba2d010c2b911aa6c643b057e4cb91d
2021-04-28 12:26:08 -07:00
Andrey Chursin
9e05b5f6f2 checkout: factor out plan calculation in merge.py
Summary: This factors out native checkout plan calculation (including handling sparse profiles) into separate fn

Reviewed By: quark-zju

Differential Revision: D28045175

fbshipit-source-id: cd034b2c335496e5e2c6994795dd5c40d3388238
2021-04-28 12:26:08 -07:00
Johan Schuijt-Li
c66bd43f3f allow auth_proxy settings to come from local
Summary: Ensure these settings are available in mononokepeer.

Reviewed By: mitrandir77

Differential Revision: D28061520

fbshipit-source-id: 68cbe9f427d4a1528a4c9968b3f1f9dcd2541004
2021-04-28 12:12:47 -07:00
Andrey Chursin
9c0304b1e1 checkout: introduce debugdryup command
Summary:
This command executes native checkout dry run code for updating between specificed revisions
Command tests network and storage perf, without actually affecting working copy

Examples of usages:
1) User reports that when updating between revisions multiple times, they see unexpected fetches, even though they expected that all data should already be in cache. Running this command shows that update between those revs fetches more data then a cache size, so repating fetches are not a surprise

2) People working on storage/network layer optimizations can utilize this command to test performance without messing with their working copy

This command understands nativecheckout.usescmstore config, same way it is used in actual native checkout

Differential Revision: D28040641

fbshipit-source-id: e5454f3110ade11f3227d6adc804a22176f530b9
2021-04-28 02:14:44 -07:00
Andrey Chursin
735da3f688 util: introduce util.formattime
Summary: This fn can be use to format time using human readable units.

Differential Revision: D28042138

fbshipit-source-id: 8b1eb6fa892754ee1008b529477fd555bd41c692
2021-04-28 02:14:44 -07:00
Andrey Chursin
3d01cbc5d9 checkout: use native checkout on dirty copy
Summary: For now this does not work with --clean flag(fallback to regular checkout in that case)

Reviewed By: quark-zju

Differential Revision: D27953967

fbshipit-source-id: 71c097cf1e395ff2cba2f4ee528145d3b2c83c23
2021-04-27 13:33:25 -07:00
Andrey Chursin
3a0ed3f7ab checkout: separate native checkout code in merge.py into separate function
Reviewed By: quark-zju

Differential Revision: D27953968

fbshipit-source-id: 0bc80f0851d02795a02cc24344d878e4d4a6400c
2021-04-27 13:33:25 -07:00
Jun Wu
ad6b424474 config: enable selectivepull by default
Summary:
It turns out during the initial clone, we're not using selectivepull for some
tiers that do not have the non-repo selectivepull config.

We've been using selectivepull for devservers and corp (and it's effective
during clone) for a long time. Let's just enable it by default so even if
dynamicconfig does not set it properly, we can still use selectivepull clone
to avoid pulling 10k+ remote bookmarks (which triggers auto bookmark cleanups
as logged in hgfeatures).

There are too many incompatible tests so I'm not migrating them for now.

Reviewed By: DurhamG

Differential Revision: D28006488

fbshipit-source-id: f0dc000156abde530fd8881bd26b4642a36167be
2021-04-27 10:10:07 -07:00
CodemodService Bot
da5ae9e8f4 Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D28024201

fbshipit-source-id: 8b9d7978c82f8a6c39eb7d9875ab86d0d9404793
2021-04-27 03:58:23 -07:00
Jun Wu
f09500ec1f scmutil: handle int in revrange correctly
Summary:
It's rare (only seem to be used by chistedit) but if revrange got an int, the
expected behavior is to treat it as a revision number.

Reviewed By: kulshrax

Differential Revision: D27983989

fbshipit-source-id: f9f8d9cb39af4ec1de7ed8ca69f7f1879b4a4614
2021-04-26 17:42:43 -07:00
Durham Goode
a77f847eab clone: add UX to hint for users to use 'hg checkout --continue'
Summary:
Adds a message for users to use 'hg checkout --continue' if there's a
.hg/updatestate file (indicating an aborted checkout) and if they're on the null
rev (indicating they likely just cloned).

Also adds support for 'hg checkout --continue' to work with non-merge commits.
Note, it really only currently works when checking out from null, since
otherwise there will be a lot of modified files in the way. Once native checkout
is more mature, we can teach it to ignore modified files that match the desired
checkout destination.

Reviewed By: quark-zju

Differential Revision: D26967976

fbshipit-source-id: 7397c5fe82027e22bf1b4db0f14bb180239fae25
2021-04-26 16:49:53 -07:00
Durham Goode
02d29166bb checkout: move VFS to live on CheckoutPlan
Summary:
Every function on CheckoutPlan required the VFS already, and the
CheckoutProgress is storing the VFS and living on the CheckoutPlan, so it makes
sense to just store the VFS on the CheckoutPlan.

Reviewed By: andll

Differential Revision: D27825088

fbshipit-source-id: 3d063fdfd1a50983b60d00a3992a893e71732f94
2021-04-26 16:49:53 -07:00
Durham Goode
0d4ac034ed checkout: move CheckoutProgress onto CheckoutPlan
Summary:
Now that CheckoutPlan can look for untracked files, it breaks the
ability to continue a checkout since those untracked files are considered dirty.
In a later diff we'll use the CheckoutProgress to inspect the dirty files and
determine which are actually dirty and which can be overwritten. To do so
though, we need access to the CheckoutProgress earlier. So let's just store it
on the CheckoutPlan.

This is a little awkward because we're passing the root VFS to the constructor
so CheckoutProgress can be instantiated, but then also passing it to every
CheckoutPlan function as well. We should probably just store the vfs on the
CheckoutPlan. If others agree, I can make a diff to do that.

Reviewed By: andll

Differential Revision: D27804720

fbshipit-source-id: e819c27fa8580c82a8cf8f0baf22ac1ea707ee54
2021-04-26 16:49:53 -07:00
Durham Goode
d7e46dd195 py3: fix Windows interactive subprocess launching
Summary:
Python on Windows has a couple bugs around passing stdin/out/err to
subprocesses. In Python 2 we patched our Python to fix one of the bugs. With
Python 3 we're using the vanilla Python distribution, so we'd rather not patch
it.

Instead, let's fix it by passing stdin/out/err explicitly.

See D15764537 (b8c747b6d5) for the details of the bug.

Reviewed By: kulshrax

Differential Revision: D28010523

fbshipit-source-id: d88f789a8100b04da996271de7dfe566c0f715df
2021-04-26 16:33:25 -07:00
Durham Goode
ce9d5a2f0f py3: fix conflict resolution case handling
Summary: In python 3 these strings are already unicode, so let's just .upper() them. Otherwise it crashes with 'no decode() on str'. This only impacts eden checkouts, since non-eden uses treestate which doesn't use this codepath.

Reviewed By: quark-zju

Differential Revision: D27978369

fbshipit-source-id: a298c1b455fdb8aa09db0ac667bd97b8e419bbe8
2021-04-23 18:04:11 -07:00
Durham Goode
423e5ee12d commitcloud: don't crash pull if there are no commitcloud certs
Summary:
During pull, commitcloud may try to auto join a cloud workspace. If
there are no certs, the join will fail and will cause the overall pull to exit
non-zero. Let's just print a warning instead and allow the pull to succeed.

Reviewed By: sfilipco

Differential Revision: D27928397

fbshipit-source-id: 432ee589438bb5af9f47f7aaa735bbbb5a17ad6b
2021-04-23 17:01:21 -07:00
Andrey Chursin
e81ae0f900 vfs: add VFS::case_sensitive
Summary: This diff adds flag to VFS to detect whether FS is case sensitive. The logic in this code losely follows similar logic in Python

Reviewed By: quark-zju

Differential Revision: D27926952

fbshipit-source-id: 36fdf4187ae513b25346f704050c64f9a1a4ec74
2021-04-22 15:56:49 -07:00
Andrey Chursin
b2db768f21 rebase: try resolving conflicts with 3-way text merge during native rebase
Summary:
This handles large chunk of cases where tree merge returns conflict, but the conflict can be trivialy resolved by textual merge.
No markers are left in file, if merge yields conflicts we simple abort to on-disk merge, same as with existing code

Reviewed By: quark-zju

Differential Revision: D27752771

fbshipit-source-id: ff8d4bbc88b48812150327cae6e31991a30236c9
2021-04-22 10:18:24 -07:00
Andrey Chursin
320119ac2f rebase: bypass merge.py for in-memory rebase
Summary:
This diff modifies rebase flow(based on config) and attempts to create commit wihthout using merge.py:update

This currently passes some test cases, but not all.
This implementaiton currently does not attempt to resolve conflicts and fallbacks to on-disk merge if they are encountered.
This fails some test cases, because they expect some trivial conflicts to be resolved by in-memory merge.

There are also certain rebase flags that currently are not handled

Reviewed By: DurhamG

Differential Revision: D27639394

fbshipit-source-id: d8f71e955930e3a8a64d7d95a0cf184d9b4ccadc
2021-04-22 10:18:24 -07:00
Liubov Dmitrieva
e5b00fae7a disable phases exchange if narrow heads is enabled
Summary:
phases calculation could be expensive on the server and it should be a perf win to disable it if not needed

It shouldn't be needed if narrow heads are enabled

Reviewed By: quark-zju

Differential Revision: D27908691

fbshipit-source-id: 7000fb23f9332d58c2c488ffbef14d73af4ac532
2021-04-22 05:26:10 -07:00
Jun Wu
d1413bbbad clone: add an emergency clone mode
Summary:
In case the Mononoke server cannot provide the commit graph, and we need to
checkout and push changes. Let's add an emergency mode where the commit graph
only contains a single commit: master.

This can be used using `--config unsafe.emergency-clone=1`:

  ~/hg % lhg clone --shallow -U mononoke://mononoke.internal.tfbnw.net/fbsource ~/tmp/c1 --config unsafe.emergency-clone=1 --configfile /data/users/quark/.eden-backing-repos/fbs-lazy/.hg/hgrc.dynamic
  connected to <remote host> session yyvXqQlHnMYQMEfw
  warning: cloning as emergency commit+push use-case only! accessing older commits is broken!
  resolving master
  connected to <remote host> session ODc4PPiJ21L6r4Sn
  added master: 248bd246f4467a2d4d0cacc09c5e55131ada9919
  warning: this repo was cloned for emergency commit+push use-case only! accessing older commits is broken!

Smartlog:

  ~/hg % cd ~/tmp/c1
  ~/tmp/c1 % lhg sl
  warning: this repo was cloned for emergency commit+push use-case only! accessing older commits is broken!
  o  248bd246f  25 seconds ago  remote/master

Pull:

  ~/tmp/c1 % lhg pull
  warning: this repo was cloned for emergency commit+push use-case only! accessing older commits is broken!
  pulling from ssh://hg.vip.facebook.com//data/scm/fbsource?stage1_read
  connected to twshared1103.03.prn6.facebook.com session L4sDKzLm093aLUbo
  searching for changes
  adding commits
  adding manifests
  adding file changes
  added 8 commits with 0 changes to 0 files

Checkout:

  ~/tmp/c1 % lhg sparse include .gitignore
  warning: this repo was cloned for emergency commit+push use-case only! accessing older commits is broken!
  ~/tmp/c1 % lhg up master
  warning: this repo was cloned for emergency commit+push use-case only! accessing older commits is broken!
  19 files updated, 0 files merged, 0 files removed, 0 files unresolved

Commit:

  ~/tmp/c1 % vim .gitignore
  ~/tmp/c1 % lhg c -m gitignorewarning: this repo was cloned for emergency commit+push use-case only! accessing older commits is broken!

Smartlog:

  ~/tmp/c1 % lhg sl
  warning: this repo was cloned for emergency commit+push use-case only! accessing older commits is broken!
    @  cc43f0e5b (Backup pending)  4 seconds ago  quark
  ╭─╯  gitignore
  │
  o  10ef2879e  5 minutes ago  remote/master
  │
  ~

Reviewed By: andll

Differential Revision: D27897892

fbshipit-source-id: f1770482455968dac217c9c6ee34ec0a20e5f432
2021-04-21 19:30:15 -07:00
Jun Wu
2d06b826c1 clone: log reasons we use legacy clone code path
Summary:
I found that there are still lots of (automation) users use the legacy clone
code path but it's unclear why (not having selectivepull?). Let's log the
reasons why the legacy path is used.

Reviewed By: sfilipco

Differential Revision: D27913616

fbshipit-source-id: b83f15e42a4afa94164b68bc9a91b4f0c022260c
2021-04-21 19:30:15 -07:00
Jun Wu
0973a82e2f config: drop experimental.new-clone-path
Summary: The config is True everywhere for a long time.

Reviewed By: sfilipco

Differential Revision: D27913615

fbshipit-source-id: f2af34323c38f11db6bf3137652adea0bf38e858
2021-04-21 19:30:15 -07:00
Jun Wu
185a057eb0 remotefilelog: move edenapi to localrepo
Summary:
Non-remotefilelog logic might want to use edenapi too. So let's move it to
core.

It might make sense to make the `None` case an explicit error saying
`edenapi.url` is not set. For now I just keep it for compatibility.

The edenapi module is added so one can construct the edenapi client
without using a repo.

Reviewed By: kulshrax

Differential Revision: D27897889

fbshipit-source-id: 2a1fdf4c68464873f294ac1423d2348c1e526d5f
2021-04-21 19:30:15 -07:00
Jun Wu
cbd6366e9a clienttelemetry: move correlator to ui
Summary:
Expose the correlator to core. This also reduces the lifetime of correlator
from global (process lifetime) to ui (dispatch.request/command), which
makes more sense and is more compatible with a multi-command per
process world (not using it by default yet).

This is needed to move edenapi to core.

Reviewed By: kulshrax

Differential Revision: D27897891

fbshipit-source-id: 7bd7e422c15e09a82e726436f92d4315ae876d94
2021-04-21 19:30:15 -07:00
Jun Wu
dcb7775096 changelog: remove Python zstore support
Summary:
The zstore for commit messages are now handled by Rust entirely. There is no
need to keep the Python zstore around, except for migration and doctor
use-cases.

Reviewed By: andll

Differential Revision: D27897893

fbshipit-source-id: 21b10596af28c45425f6f102fd13f0421d1e8373
2021-04-21 19:30:15 -07:00
Jun Wu
86f08f9ab8 clone: rename shallowclone to revlogclone
Summary:
The `shallowclone` method uses (legacy) revlog. We'll add more APIs that clone
in different ways but all of them use "shallow" (or remotefilelog).  Name it to
clarify.

Reviewed By: andll

Differential Revision: D27897890

fbshipit-source-id: 2397a9621d3b207c394c995dff54deda4016e6fa
2021-04-21 18:40:03 -07:00
Jun Wu
fe816910b1 changelog: optionally record tracebacks of rev and node
Summary:
This will be used to figure out suboptimal fetches.

For example, `EDENSCM_LOG=edenscm::mercurial=trace lhg log archival.py`:

  Callsites for node:
   118 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4214 > streams:28 > util:4985 > smartset:101,1059 > dagop:131,150,160 > context:809 > util:984 > remotefilectx:471,471,288,98
   113 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4214 > streams:28 > util:4985 > smartset:102,1059 > localrepo:1189 > context:405
   4 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:414,1034,362,479,1506,1506,1507 > templatefilters:405 > templater:463,362,479 > templatekw:860 > context:590,226 > localrepo:96 > scmutil:1207 > localrepo:1061 > phases:347,332,212 > localrepo:2805
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2969 > localrepo:1257 > revset:1271,363,106,2824 > fastlog:224 > revset:1254,1254 > context:982 > remotefilectx:471,471,288,173
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:414,1034,362,479,1506,1506,1507 > templatefilters:405 > templater:463,362,479 > templatekw:860 > context:590,226 > localrepo:96 > scmutil:1207 > localrepo:1061 > phases:346,332,212 > localrepo:2805

  Callsites for rev:
   118 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4214 > streams:28 > util:4985 > smartset:101,1059 > dagop:131,150,160 > context:809 > util:984 > remotefilectx:100
   113 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4214 > streams:28 > util:4985 > smartset:1061 > context:92,205
   113 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4217 > context:92,205
   113 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:414,1034,362,479,1506,1506,1507 > templatefilters:405 > templater:463,362,479 > templatekw:860 > context:92,590,226
   113 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:463,362,367,395,426,927,1506,1507,1506,1507,1506,1507 > templatekw:872 > scmutil:518 > context:92,205
   113 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1924 > context:92,205
   113 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4236 > cmdutil:1898 > context:92,205
   2 blackbox:184 > context:257 > util:984 > context:1632 > dirstate:393 > localrepo:1177
   2 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:414,1034,362,479,1506,1506,1507 > templatefilters:405 > templater:463,362,479 > templatekw:860 > context:590,226 > localrepo:96 > scmutil:1207 > localrepo:1061 > phases:346,332,212 > localrepo:2738,2778,2789,2804 > dirstate:393 > localrepo:1177
   2 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:414,1034,362,479,1506,1506,1507 > templatefilters:405 > templater:463,362,479 > templatekw:860 > context:590,226 > localrepo:96 > scmutil:1207 > localrepo:1061 > phases:347,332,212 > localrepo:2738,2778,2789,2804 > dirstate:393 > localrepo:1177
   2 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:414,1034,362,479,1506,1506,1507 > templatefilters:405 > templater:463,362,479 > templatekw:860 > context:590,226 > localrepo:96 > scmutil:1207 > localrepo:1061 > phases:347,332,212 > localrepo:2746,2778,2789,2804 > dirstate:393 > localrepo:1177
   1 blackbox:184 > context:257 > util:984 > context:414,1635 > dirstate:397 > localrepo:1177
   1 blackbox:184 > context:257 > util:984 > context:417,1635 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2791,2960 > context:1624 > dirstate:372 > eden_dirstate_map:125,111 > localrepo:1189 > context:417 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2957 > sparse:463 > cmdutil:2899 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2957 > sparse:463 > cmdutil:2902 > localrepo:1257 > revset:194,106,223,106,2203,362,106,2824 > localrepo:1189 > context:417 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2957 > sparse:463 > cmdutil:2902 > localrepo:1257 > revset:194,106,223,106,2203,362,106,2824 > scmutil:518 > context:92,205
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2969 > localrepo:1257 > revset:1271,363,106,2824 > fastlog:182 > context:92,205
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2969 > localrepo:1257 > revset:1271,363,106,2824 > fastlog:182 > localrepo:1189 > context:417 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2969 > localrepo:1257 > revset:1271,363,106,2824 > fastlog:224 > revset:1232 > localrepo:1189 > context:417 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2969 > localrepo:1257 > revset:1271,363,106,2824 > fastlog:224 > revset:1254,1254 > context:982 > remotefilectx:170 > context:809 > util:984 > remotefilectx:93 > context:92,205
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4183 > cmdutil:2969 > localrepo:1257 > revset:1271,363,106,2824 > fastlog:224 > revset:1254,1254 > context:982 > remotefilectx:175
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:1162,1176,362,367,918,1506,1507,1506,1507,1506,1507 > revset:2730,2778,2738 > localrepo:1189,1199 > context:417 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:1162,1176,362,367,918,1506,1507,1506,1507,1506,1507 > revset:2761,2738 > revsetlang:513,576 > parser:39,90 > revsetlang:99,99 > localrepo:1189,1199 > context:417 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:1165,1176,362,367,918,1506,1507,1506,1507,1506,1507 > revset:194,106,2824 > localrepo:1189 > context:417 > dirstate:397 > localrepo:1177
   1 remotenames:629 > tweakdefaults:648 > remotefilelog:890 > commands:4234 > cmdutil:1923 > extensions:569 > smartlog:82 > cmdutil:2252 > templatefilters:422 > util:1078 > templater:1165,1176,362,367,918,1506,1507,1506,1507,1506,1507 > revset:194,106,2824 > scmutil:518 > context:92,205

Reviewed By: andll

Differential Revision: D27867671

fbshipit-source-id: d85c41c7335850eb6114413c63187e673a13c214
2021-04-21 09:41:31 -07:00
Jun Wu
9cd55d6a53 util: add recordcallsites
Summary: Added an API to record Python tracebacks to figure out 1-by-1 fetches.

Reviewed By: andll

Differential Revision: D27867670

fbshipit-source-id: d6941dd385db6eb2f810d97815056b660b970032
2021-04-21 09:41:31 -07:00
Jun Wu
3ded4caf6a util: add shorttraceback
Summary:
`shorttraceback` returns a shorter version of the "traceback". It will be used
to figure out (frequent) callsite that triggers suboptimal 1-by-1 fetches.

Reviewed By: andll

Differential Revision: D27867673

fbshipit-source-id: 8f1f823007c2c94e1f62e72d816f03cbb4c8bc59
2021-04-21 09:41:31 -07:00
Jun Wu
a98340bd8d util: move frame extraction to a function
Summary: Split `smarttraceback` so the frame extraction logic can be reused.

Reviewed By: andll

Differential Revision: D27867669

fbshipit-source-id: 0e198f5400df5c1841926f9fac30f70ae74e8108
2021-04-21 09:25:49 -07:00
Jun Wu
abe821055e tracing: add isenabled
Summary: Expose Rust APIs to test if a callsite is enabled or not.

Reviewed By: andll

Differential Revision: D27867674

fbshipit-source-id: 0734b5ad6a65040f41a6f8b1bfc1e9a9109b9a8d
2021-04-21 09:25:49 -07:00
Liubov Dmitrieva
0ca356f0de Fix for reading infinitepush.wantsunhydratedcommits and lfs.wantslfspointers config options in client telemetry
Summary:
hg.py has a hard coded list of what configs it will copy from the source repo to the remote repo object (hg.py remoteui())
we use one of lfs and one of infinitepush option in edenscm/hgext/clienttelemetry.py where the remote repo object is used

Reviewed By: ahornby

Differential Revision: D27906275

fbshipit-source-id: d551934437126fdd0b920354bf4c51a6e09bafb2
2021-04-21 04:20:13 -07:00
Jun Wu
c903e63463 hgsql: revs('%s', rev) -> revs('%d', rev)
Summary: `%s` with a rev number is not accepted in the current codebase. Use `%d` instead.

Reviewed By: ikostia

Differential Revision: D27874102

fbshipit-source-id: b83c40b7182da8639e82bea7bd00a036be4120c4
2021-04-20 08:51:29 -07:00
Jun Wu
d37f462b17 remotefilelog: revs('%s', rev) -> revs('%d', rev)
Summary: `%s` with a rev number is not accepted in the current codebase. Use `%d` instead.

Reviewed By: ikostia

Differential Revision: D27873899

fbshipit-source-id: b34eb0b80f0789c9e06af366bfdaa884c5c69357
2021-04-20 08:51:29 -07:00
Jun Wu
6eb9c2b59e drop: reduce rev number usage
Summary: `%s` with `revid` is not accepted in the current codebase.

Reviewed By: ikostia

Differential Revision: D27873898

fbshipit-source-id: e3790855892d3b07e1e5ea6bd92a14738bf6c100
2021-04-20 08:51:29 -07:00
Jun Wu
e006af173d debugresetheads: remove local bookmarks too
Summary:
`debugresetheads` is expected to remove all non-essential heads. That
includes bookmarks.

Reviewed By: kulshrax

Differential Revision: D27861548

fbshipit-source-id: 045976a5a9e27e7eee7ee48448c44552da439983
2021-04-19 15:19:41 -07:00