Commit Graph

1060 Commits

Author SHA1 Message Date
Durham Goode
7ab09f1e5f tests: fix broken test
Summary:
The push-pull test was broken by my recent change to make indexedlog
the default. It wasn't caught because the test is disabled in Python 3. It now
passes with Python 3 so let's enable it.

The repack-remove fix is just some flakiness I've seen lately.

Reviewed By: singhsrb

Differential Revision: D26412998

fbshipit-source-id: be4b648f31bd6dfbf6a6e5d2e382acb084461974
2021-02-12 11:38:43 -08:00
Adam Simpkins
8907208651 update dirsync to allow matching individual files
Summary:
Update the dirsync code to allow mirror and exclude rules to match individual
files rather than just directory prefixes.

This simply appends `/` to all filenames when looking for rule matches.  This
allows us to efficiently match individual filenames in addition to directory
prefixes.

Reviewed By: quark-zju

Differential Revision: D26294583

fbshipit-source-id: 83b283f344f6e0bc0fe53b9068e7e0170f53504b
2021-02-11 15:54:28 -08:00
Durham Goode
9c1b611dff indexedlog: make writing to indexedlog the default
Summary:
We've rolled both of these out to 100%. Let's make this the default so
we can delete those configs.

Reviewed By: quark-zju

Differential Revision: D26233645

fbshipit-source-id: cd7a08c404483f78ab714763870f5bf0fa801e7a
2021-02-11 09:34:55 -08:00
Durham Goode
8c08a42d22 dynamicconfig: introduce configs.allowedconfigs
Summary:
In our upcoming migration away from chef/static rc files, we'll be
marking certain files as "allowed". Our hope is that that list only includes
things like .hg/hgrc, ~/.hgrc, etc.

There are cases however where it's convienent to continue to use chef, for
instance when we condition on machine type. To support this, let's add an
allowed_config option, which will allow configs from non-supported locations.

This will also be useful when remediating issues that come up when we start
enforcing allow_location, without rolling back the entire thing.

Reviewed By: quark-zju

Differential Revision: D26233451

fbshipit-source-id: 71789e0361923a6f80de4aef7f012afc0269440d
2021-02-10 19:30:35 -08:00
Sean Kamath
ae5db40fdd Changing commit hash length to 9 in hg prompt
Summary:
Copied from D17312417 (e1f4dbeb3d), because that did what I needed done, but incremented by 1.

I would like to change the length of the displayed hash in scm-prompt
to 9. Why such an impactful diff? Because hg sl shows 9 characters, and I
always get confused when the hash in my prompt doesn't match hg sl

Reviewed By: kulshrax

Differential Revision: D25934253

fbshipit-source-id: 15f2bc8bc7d666de1a077d2bafd74ab3c9753341
2021-02-10 17:07:35 -08:00
Jun Wu
9579b11d7f tests: remove broken test-setdiscovery-t84623377.t
Summary:
The test wasn't meant to be committed. The feature it wants to test was not
easily testable (requires streamclone and pull to have different master,
which is true on Mononoke but false on local hg servers).

Reviewed By: sfilipco

Differential Revision: D26380544

fbshipit-source-id: 6fa720058df8b88ace704d186caa4213d9cd62c9
2021-02-10 14:42:39 -08:00
Jun Wu
334ff0a4ca setdiscovery: include tip in localheads if it's empty
Summary:
Previously we include tip in sample. But that is problematic for fast paths
like:

    if set(commonsample).issuperset(set(localheads) - {nullid}):
        ui.note(_("all local heads known remotely\n"))
        return localheads, True, remoteheads

If `localheads` is empty, then the returned "common heads" are empty, causing
downloading the entire repo inefficiently.

Fix the issue by moving `tip` from `sample` to `localheads` so the common
heads will include tip in the fast path.

Reviewed By: DurhamG

Differential Revision: D26374303

fbshipit-source-id: 45a2a44e4db4c4ec2a341522a257d46a62b058d5
2021-02-10 14:08:16 -08:00
Jun Wu
bc803f49de tests: fix test-fb-hgext-treemanifest-prefetch.t
Summary:
The test is broken in master.  I might be using a stale binary running that
test in D26245424 (1392673a95). Revert the test to before D26245424 (1392673a95) fixes it.

Reviewed By: sfilipco

Differential Revision: D26321855

fbshipit-source-id: 4ada61211d3b354ae6f94f7fc8364f4550e9aeb8
2021-02-08 13:09:33 -08:00
Meyer Jacobs
ef00b68647 newstore: minimal proof of concept trait & edenapi implementation
Summary: Introduce a minimal version of an async, typed `ReadStore` trait and corresponding `EdenApi` implementation, along with a debug command, `debugnewstore` to exercise it.

Reviewed By: DurhamG

Differential Revision: D26050641

fbshipit-source-id: 2c14c3715e7067f9ecd1e649e6ca146a1ce249bf
2021-02-08 10:39:31 -08:00
Liubov Dmitrieva
a6c8d12c47 do not print warning about repo locking if the wait below the default threshold
Summary:
The warning is noisy if the wait is short and can make users dislike commit cloud.

Make sure we don't print the warning earlier than defaultlockwaitwarntimeout.

This is a follow up on D25587459 (18b8c66439) that doesn't fully work if warntimeout is passed equal to zero.

The default threshold has been introduced earlier in D25587459 (18b8c66439). This is just a fix.

A new test has been added. Also, the api should allow to pass value 0 meaning to show the warning always.

Reviewed By: quark-zju

Differential Revision: D26251321

fbshipit-source-id: c3beb5fec6a65f1816f667df70c1a39dd65ef083
2021-02-08 03:16:55 -08:00
Jun Wu
01b0122b0b revset: optimize x~n using Rust fast path
Summary:
Optimize the `x~n` revset function using Rust.

Note: This changes the behavior a bit, `x~n` no longer returns `null`.

Reviewed By: sfilipco

Differential Revision: D26142683

fbshipit-source-id: d6a45b7e67352d74986274e52002a769bbae772e
2021-02-05 11:37:51 -08:00
Jun Wu
1392673a95 smartset: add nameset fast paths
Summary:
For `nameset OP baseset` or `baseset OP nameset`, convert baseset to nameset
automatically for fast paths. This is motivated by a slow query in pushrebase:

    # pushrebase/__init__.py:validaterevset
    if onto != donotrebasemarker and onto in repo:
        rebased = list(repo.set("(successors(%r) & ::%s) - %r", revset, onto, revset))
        if rebased:
            raise error.Abort(
                _("commits already rebased to destination as %s")
                % ", ".join(str(c) for c in rebased)
            )

Depending on the complexity of `revset`, `successors(revset) & ::onto` might
generate a filterset that is very inefficient - iterating through a large set `::%s`.

Optimize them by using the Rust nameset for calculations.

Before:

  In [4]: repo.revs("(successors(1001) & ::1000) - 1000")
  Out[4]: <filteredset <filteredset <baseset+ [1001]>, <nameset- <spans [06b96ec2a8b60d984606f36c30d3dbc899d804df:e890940eb1c34a06967bb9e38a0317ad7a0eb518+0:1000]>>>, <not <baseset [1000]>>>

After:

  In [1]: repo.revs("(successors(1001) & ::1000) - 1000")
  Out[1]: <nameset+ <spans []>>

This can change the ordering of sets. Therefore some test changes.

Reviewed By: DurhamG

Differential Revision: D26245424

fbshipit-source-id: 2e3ab891c586bb80cf947fff4bbdcd453c01ae70
2021-02-05 10:50:14 -08:00
Liubov Dmitrieva
9deba0b16e introduce temporarily workaround to filter public heads from visible heads in CC code
Summary: The function is used in many places and I noticed there are some issues with commit cloud due to the bug that visible heads can contain public commit.

Reviewed By: quark-zju

Differential Revision: D26250556

fbshipit-source-id: e57e447dee803719fcf38cf376ad5af569d8020d
2021-02-05 02:23:08 -08:00
Jun Wu
e4c5f94935 discovery: reduce exchanged heads
Summary:
Reduce local heads from unfiltered raw heads to visible heads.  Reduce remote
heads from all heads to selected heads, plus those explicitly specified via
`-r`, `-B`, or via `repo.pull`.

This should speed up both pull and push for repos with lots of heads (ex.
fbsource), and make fastdiscovery less necessary.

Reviewed By: DurhamG

Differential Revision: D26207588

fbshipit-source-id: b64485566e0651ad47a5d1ee47e68301ba371e57
2021-02-03 20:32:43 -08:00
Jun Wu
98547dd626 remotenames: do not list all bookmarks for --to, --delete check
Summary:
Previously, remotenames lists all server-side bookmarks to check flags
like --delete, --create, --non-forward-move. That is inefficient. This
diff makes it use the listkeyspatterns API to reduce overhead.

Reviewed By: DurhamG

Differential Revision: D26213969

fbshipit-source-id: 2e51433829e80ebe685755049339c2dc03158717
2021-02-03 20:32:42 -08:00
Jun Wu
5ba3eac2a4 discovery: add debug message for size of initial heads
Summary: This makes it easier to reason about changes in reducing heads exchanged.

Reviewed By: DurhamG

Differential Revision: D26207589

fbshipit-source-id: 49c0c0dc25355a321c1aa4c9edfb5c43d2f23fd8
2021-02-03 20:32:42 -08:00
Durham Goode
88900aaf93 dynamicconfig: remove legacylist and disallowedlist deprecation logic
Summary:
The original migration strategy with dynamicconfig was to fix configs
one by one until the dynamicconfig values matched the chef/static ones, then we
can turn off chef/static configs. This looks to be too much work, so we're going
to try a different strategy of just turning off all chef/static configs on a
small number of hosts and seeing what breaks.

The legacylist and disallowlist configs were part of the old strategy, and they
make it more complicated to fix dynamicconfig mismatches, so let's get rid of
them.

Reviewed By: quark-zju

Differential Revision: D26208548

fbshipit-source-id: 63171f1f16aa0498c0eefa994dffaeb8e0cc0d72
2021-02-03 09:53:00 -08:00
Jun Wu
855122ad66 gracefully ignore invalid JSON in app_samples data
Summary: This would allow us to ignore bogus data and still get something useful for logging.

Reviewed By: DurhamG

Differential Revision: D20343844

fbshipit-source-id: 763d294bc44bb203c1f206ca80e0839396e8de6e
2021-02-02 16:28:21 -08:00
Durham Goode
13de9f801a doctor: repair treemanifest indexedlogs as well
Summary: Previously we only repaired the file indexedlogs.

Reviewed By: xavierd

Differential Revision: D26202423

fbshipit-source-id: b1c673ae69a357d66ab2baf5c36985a3b0597427
2021-02-02 16:21:01 -08:00
Jun Wu
59f4d938b4 revset: remove branchpoint()
Summary:
It is already broken with segmented changelog (it assumes 0..len(repo) are
valid revs). It is super slow and cannot be optimized efficiently. The _only_
non-zero-exit-code usage in the past month is like:

  hg log -r 'reverse(children(ancestors(remote/master) and branchpoint()) and draft() and age("<4d"))'

which takes 40 to 100s and can be rewritten using more efficient queries like `parents(roots(draft()))`.

Reviewed By: singhsrb

Differential Revision: D26158011

fbshipit-source-id: 7957710f27af8a83920021a228e4fa00439b6f3d
2021-01-29 20:21:29 -08:00
Jun Wu
358466ee0f transaction: record transaction name to metalog
Summary:
For `repo.transaction("tr-name")`, this records `Transaction: tr-name` to
metalog commit description.

It can be helpful to narrow things down for commands with multiple
transactions.

In the future we might want to attach more data to the logging (ex. what the
commit cloud local, remote states at the time of syncing). However I didn't
do it now since metalog is designed to hold repository data, not too much
logging data. With a better logging infra we might want to move `config` out
from metalog, associated with metalog root ids.

Reviewed By: DurhamG

Differential Revision: D25984805

fbshipit-source-id: 59c074272cff555c6ff11dd755f7e3ce9a292eb6
2021-01-29 12:36:08 -08:00
Durham Goode
7f555d2d06 http: improve error messages from http failures
Summary:
Currently the data layer eats all errors from remote stores and treats
them as KeyErrors. This hides connection issues from users behind obscure
KeyErrors. Let's make it so that any non-key error reported by the remote store
is propagated up as a legitimate error.

This diff makes Http errors from EdenApi show up with a nicer error message,
suggesting that the user run fixmyserver.

Further fixes will probably be necessary to categorize other errors from the
remote store more nicely.

Reviewed By: quark-zju

Differential Revision: D26117726

fbshipit-source-id: 7d7dee6ec101c6a1d226185bb27423d977096050
2021-01-29 09:40:19 -08:00
Liubov Dmitrieva
339788a95e fix tests
Summary: Fix tests broken by the deprecation notice D26073439 (14a0d96b04)

Reviewed By: johansglock

Differential Revision: D26099594

fbshipit-source-id: 65b973c4f1dcc7a032e747c12ce59a1d0c04091e
2021-01-27 05:12:09 -08:00
Liubov Dmitrieva
14a0d96b04 add deprecation notice for pullbackup related set of commands
Summary:
this is needed to remind users to use the commands related to the Commit Cloud Workspaces

This is also needed to avoid confusion - the current error is not very informative:

```
connected to twshared9522.24.frc3.facebook.com session Wfq9tGuoPSBJH8nc
abort: 'listkeyspatterns' command is not supported for the server ssh://hg.vip.facebook.com//data/scm/fbsource?infinitepush_write
```

Reviewed By: markbt

Differential Revision: D26073439

fbshipit-source-id: 58ee477bc021a0796e22cc18610225ee003e06be
2021-01-26 08:21:07 -08:00
Liubov Dmitrieva
2c15a29f0f fix unit test that was broken by D19803760
Summary: fix unit test that was broken by D19803760 (8e35bcc49d) to unblock release

Reviewed By: krallin

Differential Revision: D26073002

fbshipit-source-id: 88da60f5806ef5cb2f832922e503309836542e09
2021-01-26 04:33:47 -08:00
Jan Mazur
d1b291d72a flush stream to always print out interactive prompt
Summary: Suddenly prompt stopped appearing for me. Flush the stream to be sure that it's printed out.

Reviewed By: HarveyHunt

Differential Revision: D25956018

fbshipit-source-id: 83419037fa6ce672e203385b71f1403a738d0c90
2021-01-22 07:46:11 -08:00
Liubov Dmitrieva
a1dd7229e6 dynamic config: remove unnecessary option from the dynamic config
Summary: this infinitepush option is true by default

Reviewed By: DurhamG

Differential Revision: D25995928

fbshipit-source-id: 0c1d50a96dc16ee4d8c45da4f4a213baa49bb8a4
2021-01-22 06:24:23 -08:00
Liubov Dmitrieva
9bd3235f3f deprecate owner_team option in favour of ui.supportcontact
Summary:
The both options have basically the same value.

This is my next step for resolving mismatches between CC dynamic config and the current configuration and generally improving CC configuration.

Reviewed By: DurhamG

Differential Revision: D25973556

fbshipit-source-id: aae21efcd5174ed58efcb9e5d8c85831d35777ea
2021-01-20 14:15:54 -08:00
Jun Wu
f11d555a3a fsmonitor: add threshold of nonnormal files to update
Summary:
Previously, the fsmonitor state update logic will skip updating treestate if the wlock
cannot be obtained. D17468790 (8d4d0a66a2) made it wait for wlock for the painful "watchman fresh
instance" case. But things can still suck if it's not a "fresh instance" but there are just
too many nonnormal files.

This diff makes it that exceeding a threshold of nonnormal files will trigger a fsmonitor
state write as an attempt to to reduce the number of nonnormal files. In additional,
`--debug` was changed to print more internal states for debugging.

This would hopefully address issues where people have a large "nonnormal"
treestate, suffers from the bad performance issue and cannot recover from it
automatically.

Reviewed By: DurhamG

Differential Revision: D25794083

fbshipit-source-id: 741426cf31484d9318f9cfcab11d38da33ab5067
2021-01-12 16:26:48 -08:00
Stefan Filip
a9a2610cf8 tests: remove test-hgext-repogenerator.t
Summary: Unstable test.

Reviewed By: quark-zju

Differential Revision: D25879146

fbshipit-source-id: 09e41fc1e43644bba50f713a095e8a4b8c4f520a
2021-01-11 17:58:02 -08:00
Jun Wu
027709fa36 pull: use the new repo.pull API if possible
Summary:
The `pull` commmand has a lot of tech debt (with issues like inefficiency, race
conditions, named branches, etc). The new `repo.pull` API isn't designed to
support all legacy usecases.

This diff switches a subset of `pull` command that the new API can support to
the new API. It should solve race condition or `visibility.add` inefficiency
issues (ex. 20s on addgroup, 187s on visibility.add - P154836357).

Logic related to remotenames was ported from the remotenames extension.
The selectivepull tests seem strong enough to check their behaviors.

The new pull API is used by commit cloud for many months. So I turned the
new code path on by default. It can be turned off by changing
`commands.new-pull`.

There are a few test changes. The new behavior seems more correct overall:
- test-commitcloud-switch-workspace.t
  - "M/F" swap is caused by rev number: both are correct
  - "S: public remote/stable" is more correct than "S: draft"
- test-commitcloud-sync-rb-deletion.t
  - "draft1: draft remote/scratch/draft1" is more correct because
    "remote/scratch/draft1" is listed in the "book --list-subs"
    command above.
- test-commitcloud-sync-rb-enabling.t
  - "public1: draft" not showing up is more correct.
- test-fb-hgext-remotefilelog-lfs-prefetch.t
  - Difference seems to be caused by rev order.

Reviewed By: markbt

Differential Revision: D25562089

fbshipit-source-id: ac22b2f0492ab53517d580d706dfbc823fd0e0cc
2021-01-11 13:28:15 -08:00
Thomas Orozco
9d7b0267dd revisionstore: pass client correlator
Summary:
We used to get those in the old (Python) LFS extension, but didn't have them in
the new one. However, this is helpful to correlate requests to LFS with data in
hg logs. It's also convenient to be able to identify whether a set of requests
are part of the same session or not.

This diffs threads the client correlator through to the LFS store from the
Python, similarly to how it's done in EdenAPI.

Reviewed By: DurhamG

Differential Revision: D25804930

fbshipit-source-id: a5d5508617fa4184344834bbd8e3423816aa7668
2021-01-11 10:46:20 -08:00
Mark Juggurnauth-Thomas
a7e8a2c5c2 crdump: add manifest_node to crdump output
Summary:
Add `manifest_node` to the crdump output, which is the root manifest node of the commit.

This is useful for detecting commits that have the same tree content but
different metadata (e.g. if only the commit message has been edited).

Reviewed By: singhsrb

Differential Revision: D25782674

fbshipit-source-id: dfdf426833533140b676eee82e123a0cba23c77a
2021-01-11 07:30:35 -08:00
Durham Goode
9c3d099697 tests: glob out times in tests
Summary: These globs were lost as part of D25315954 (ec0b533381).

Reviewed By: quark-zju

Differential Revision: D25814934

fbshipit-source-id: b1896893e37e355a73eb136758f8966666e0ec05
2021-01-07 16:13:31 -08:00
Liubov Dmitrieva
676063f0f2 allow switching workspaces with uncommitted changes unless move to a public root is impossible
Summary:
Unless we can't update to a public root, there is nothing wrong with having local changes and switching workspaces feature.
Those are not related. Uncommited changes shouldn't impact switching workspaces.

Reviewed By: mitrandir77

Differential Revision: D25802406

fbshipit-source-id: 3fcb70864002bed11ad32621947294f643ca1fc3
2021-01-07 06:20:23 -08:00
Liubov Dmitrieva
713faa71cd allow hg cloud switch command to work for clean disconnected repos
Summary:
This was a request from users. Repo could go into a disconnected state, for example, if rejoin in fbclone fails due to some reason.
In this case it was confusing that `hg cloud switch` command doesn't work. Users have to run `hg cloud join` command first.

If the repo is disconnected but doesn't contain any relevant local changes for commit cloud, it should be fine to switch workspace.

Reviewed By: mitrandir77

Differential Revision: D25802193

fbshipit-source-id: 3216a10c3438463773602b2dfd13740866fb5908
2021-01-06 13:47:20 -08:00
Liubov Dmitrieva
19b20b43a1 enable switching from a draft commit possible for most of cases
Summary:
enable switching from a draft commit possible for most of the cases

make it possible if the public root of the current commit is an ancestor of the main bookmark

this condition we need because the remote bookmarks can be different for different workspaces and they define phases

I think it will cover most of workflows

Reviewed By: mitrandir77

Differential Revision: D25780999

fbshipit-source-id: b1c25b29a7668d51244ca43d6b0c30fa2fc068d9
2021-01-06 01:59:16 -08:00
Jun Wu
78005ae5a5 py3: fix test-run-tests.py
Summary:
When running `python3 run-tests.py test-run-tests.py`, some bytes were printed
with `b` prefix.  Convert them to `str`.

Reviewed By: DurhamG

Differential Revision: D25642164

fbshipit-source-id: f1103b24ad88d0d024f6be546bf632141f06ebd1
2020-12-18 10:38:19 -08:00
Durham Goode
cfd7ccc828 configs: add Python support for allowed_locations list
Summary:
configs.allowedlocations restricts what configs can be loaded to a
certain set of files. This will enable us to deprecate all old config locations.

This diff adds Python support and a high level test.

Reviewed By: quark-zju

Differential Revision: D25539736

fbshipit-source-id: fa2544379b65672227e0d9cf08dad7016d6bbac8
2020-12-17 06:37:54 -08:00
Jun Wu
63bb40f9c4 ui: move push/pull messages to stderr
Summary:
Those messages like "pulling from ...", "added n commits ..." belong to stderr.

This makes it possible for us to turn on verbose output for auto pull, without
breaking tools that parses stdout.

Reviewed By: sfilipco

Differential Revision: D25315955

fbshipit-source-id: 933f631610840eb5f603ad817f7560c78b19e4ad
2020-12-16 20:12:04 -08:00
Jun Wu
ec0b533381 ui: make ui.debug write to stderr
Summary:
Debug output belongs to stderr.

This makes it possible to turn on debug output without breaking programs
parsing stdout.

Reviewed By: singhsrb

Differential Revision: D25315954

fbshipit-source-id: c7813a824fbf6640cb5b80b5ed2d947e7059d53e
2020-12-15 12:07:47 -08:00
Jun Wu
d7f7bc0181 smartlog: always show "."
Summary:
With `collapse-obsolete`, `.` can be obsoleted and in the middle of a stack and
not shown up. That can be confusing. Make the smartlog revset always show the
`heads` passed in. If `.` is in `heads` (the default), then show it.

Reviewed By: DurhamG

Differential Revision: D24696595

fbshipit-source-id: 7deab109d0e0ae5e703928252bc63312d936955f
2020-12-15 11:52:02 -08:00
Jun Wu
1a1b3a3cb5 smartset: make repo required for baseset
Reviewed By: sfilipco

Differential Revision: D24365401

fbshipit-source-id: 4d0ee6d27717c1aa966086af68492295aa6ed372
2020-12-14 13:12:42 -08:00
Jun Wu
d55eae5fdb tests: remove test-extension.t
Summary:
The test is one of the most fragile tests (ex. it has traceback that is
fragile).  Since we don't support 3rd party extensions the test is less
meaningful. Let's remove it.

Reviewed By: singhsrb

Differential Revision: D25514727

fbshipit-source-id: cc3491597ba38ad84c4c2b69a275da6505ae2207
2020-12-14 13:12:41 -08:00
Jun Wu
90f40e79bd tests: mark test-atexit-epipe.t as chg incompatible
Summary:
It has a high chance of failing with:

```
   $ hg --config extensions.b=b.py --config 'pager.pager=head -1' init foo2
+  close failed in file object destructor:
+  IOError: [Errno 9] Bad file descriptor
   line1
```

when running with chg together with other tests.

Reviewed By: singhsrb

Differential Revision: D25514728

fbshipit-source-id: d9d2adea97bc6a436341be6f6d9aac43cb78c90a
2020-12-14 13:12:41 -08:00
Durham Goode
2333b25e75 tests: fix rust store test on windows
Summary: Looks like the permissions are different there. Let's glob it out.

Reviewed By: singhsrb

Differential Revision: D25507359

fbshipit-source-id: 6a5c19e41879798b829d9b6e79eba3009249c20c
2020-12-14 06:53:24 -08:00
Stanislau Hlebik
cbe07f0d17 infinitepush: select infinitepush path only for scratch bookmarks
Summary:
At the moment "hg pull -B bookmark" always fetches from infinitepush path even
if we do something like "hg pull -B master".

Let's fetch from infinitepush only if a bookmark matches scratch mather

Reviewed By: markbt

Differential Revision: D25460577

fbshipit-source-id: 6563dcd3423c6a7a70ea1c1f7acdaf5db5e21875
2020-12-13 23:48:22 -08:00
Durham Goode
d7af02abb1 revisionstore: fix paths for local indexedlog
Summary:
There was a bug with local-data indexedlog storage where it
wasn't applying the appropriate suffix, so tree data was being stored in
.hg/store/indexedlogdatastore just like file data. Let's fix that and add a
test.

Reviewed By: quark-zju

Differential Revision: D25469917

fbshipit-source-id: 731252f924f9a8014867fc077a7ef10ac9870170
2020-12-11 06:58:27 -08:00
Jun Wu
2e7f12ab4c template: fix ifcontains(rev, revset('.'), ...) compatibility with f64 compatibility
Summary:
The f64 compatibility added by D25079001 (e91552fefe) changes the `{rev}` template output.
However, the revset object is not aware of the rev mapping so the following
pattern will stop working:

  ifcontains(rev, revset('.'), '@', 'o')
  # rev: mapped, but not contains in `revset('.')`

Fix it by teaching `ifcontains(a, b, ...)` to disable f64 compatibility when
evaluating `a`, since `a` is not going to be printed out.

This fixes an issue in VSCode ISL that "You are here" is missing on non-master
commits.

Reviewed By: singhsrb

Differential Revision: D25404673

fbshipit-source-id: 3e53a2ce1f135f8825c195c5a3061dad0359c4b2
2020-12-09 10:36:28 -08:00
Xavier Deguillard
77f3f239a2 store: replace use of ctreemanifest with small manifest parser
Summary:
The code still took a dependency on Mercurial's old manifest code to parse
manifests. It turns out the manifests have a very simple format that we could
parse directly.

This avoids various copies, conversions, std::list, removes ~1k lines of code,
at the expense of adding ~100 lines of code (some of them being C++
boilerplate).

Reviewed By: fanzeyi

Differential Revision: D25385018

fbshipit-source-id: 90d4cda2b7797584bc48c086d5592a7ecaa05dfc
2020-12-09 08:40:38 -08:00