Commit Graph

51548 Commits

Author SHA1 Message Date
Jun Wu
c6c4baa07e dag: redefine Id::{MIN, MAX} using Group
Summary:
Redefine Id::{MIN, MAX} using Group so Id::MAX.group() is a valid group.
Previously Id::MAX has an invalid group.

Reviewed By: sfilipco

Differential Revision: D19154908

fbshipit-source-id: 6108f02da786eb228a7d1b772ca5134c1ebb6f6b
2020-01-08 18:46:07 -08:00
Jun Wu
c4cd7df3b2 dag: extract logic calculating universal commits to a method
Summary:
Address review feedback on D18670160.

This also fixes the definition of "universal" a bit - the new code no longer
assumes there are only one head in the master group.

Reviewed By: sfilipco

Differential Revision: D19154906

fbshipit-source-id: 4fbf080354318300ce09dc7fba2dcc5f942b6308
2020-01-08 18:46:07 -08:00
Jun Wu
bcaff9062c dag: rebuild non-master id and segments if needed
Summary:
Add utilities to rebuild non-master ids and segments if necessary.

The `NamedDag` structure ensures indexes have 1:1 mapping.

Reviewed By: sfilipco

Differential Revision: D18838995

fbshipit-source-id: 4a48b183c182bd5e6336a2ca4973c36091fbbfd8
2020-01-08 18:46:07 -08:00
Jun Wu
28380e0272 dag: fix logic about avoiding unnecessary high level segments
Summary:
The check of "is this high level segment necessary or not" should be done
before dropping the last segment. This fixes an issue discovered in D18838992.

Reviewed By: sfilipco

Differential Revision: D19154904

fbshipit-source-id: fb4c83c39d66215bae168ad98e5cf78de91cc5a3
2020-01-08 18:46:06 -08:00
Jun Wu
d4eddd6b11 dag: use NamedDag in tests
Summary:
NamedDag is the high-level interface that is more interesting to test.

High-level segments are changed subtly because NamedDag syncs them to disk
first.

Reviewed By: sfilipco

Differential Revision: D18838992

fbshipit-source-id: c6a557e0a44a1d24320ea4a9e4283262f6f30f67
2020-01-08 18:46:06 -08:00
Jun Wu
2b4095e3fb indexedlog: fix warnings on Windows
Summary: Those warnings are not seen on POSIX build.

Reviewed By: sfilipco

Differential Revision: D19320441

fbshipit-source-id: feddf728eb9627834559b87d83e20f0afd9080c8
2020-01-08 18:11:38 -08:00
Jun Wu
dd79207c32 indexedlog: fix benchmarks
Summary: The `rand` APIs had changed. Update the benchmark code accordingly.

Reviewed By: sfilipco

Differential Revision: D19320122

fbshipit-source-id: 44c376b17afea52ecc548d79b44cbb50f7e9e567
2020-01-08 18:11:37 -08:00
Jun Wu
cfe135737b indexedlog: fix clippy issues
Summary: Fix issues reported by clippy.

Reviewed By: sfilipco

Differential Revision: D19320121

fbshipit-source-id: 58f6402eb2a4f52914a760299bdfa72e5a63b2e6
2020-01-08 18:11:37 -08:00
Durham Goode
2ad1e0ad7e eden: automigrate during debugedenimporthelper
Summary:
We had eden-backing repos that were using formats from years ago
because they never ran pull to trigger the automigrate. Let's automigrate as
part of debugedenimporthelper to keep these repos up-to-date.

Reviewed By: quark-zju

Differential Revision: D19320510

fbshipit-source-id: 475a6acf8748677de3183dfb5d4c6df7caca606d
2020-01-08 17:31:59 -08:00
Durham Goode
42e6ae2b55 tests: update case collision test for tag deprecation
Summary: The case collision test broke when I disabled tags.

Reviewed By: singhsrb

Differential Revision: D19321272

fbshipit-source-id: d59a0ad38b80f35931bbb4fb52e400d714ebbf37
2020-01-08 17:00:42 -08:00
Chad Austin
bf4441ee86 use unicode micro symbol when logging thrift call durations
Summary: µ

Reviewed By: wez

Differential Revision: D19191188

fbshipit-source-id: 287d208808d782179ce9e70c323f8dd45e5168c3
2020-01-08 14:43:25 -08:00
Chad Austin
91eda6e3e3 fix cmake build
Summary:
D19135344 broke EdenFS's cmake builds, and our macOS releases haven't
been going out. Rather than pass the same streaming options to the
Thrift compiler in the CMake build, remove deprecated_server_streams
from both builds.

Reviewed By: simpkins

Differential Revision: D19204397

fbshipit-source-id: c22e634ded82a683daff5c92182c8a1eb1ed4d21
2020-01-08 14:08:34 -08:00
Durham Goode
27e9ca5317 telemetry: truncate fullcommand to 256 bytes
Summary:
If users or automation invoke a bunch of really long commands, it can
occupy a lot of space in our logs. The full command for really long commands is
unlikely to be useful, so let's truncate them to 256 bytes.

Reviewed By: ikostia

Differential Revision: D19317932

fbshipit-source-id: 428479a18dd7e5a7ae4d8f862cf26c02c15b1fcb
2020-01-08 12:58:44 -08:00
Xavier Deguillard
83d46c7c3b pyrevisionstore: remove to_pyerr
Summary:
Python errors wrapped in a Rust Error would be incorrectly changed into a
RuntimeError instead of the original one. The map_pyerr method does the right
thing, and is also shorter, let's use it.

Reviewed By: quark-zju

Differential Revision: D19313883

fbshipit-source-id: 1ecb41a8eef9d41618905d6d00f199252d373f96
2020-01-08 12:52:43 -08:00
Durham Goode
d8663cb534 treestate: backout making it a hard requirement
Summary:
It turns out some old repos are still using the legacy treedirstate
format, which broke when I made this a hard requirement. Let's roll this back
for now.

Reviewed By: singhsrb

Differential Revision: D19313773

fbshipit-source-id: ded78be033cb04323a2e1d237059947dee509df9
2020-01-08 11:33:28 -08:00
Mark Thomas
43550ca5bb commitcloud: fix ordering and workspace handling for cloud sl history
Summary:
Interactive smartlog history relies on the order from the server, which has
changed, and so is now incorrect.  Sort the versions from the server so
we can be sure they're always in the right order.

Interactive smartlog history also ignores the workspace parameters to specify
the workspace.  Fix that.

Reviewed By: farnz

Differential Revision: D19309253

fbshipit-source-id: 9fc1b443e72557331e22d0987c73286f5c64e16d
2020-01-08 05:30:17 -08:00
Durham Goode
9778811573 tags: remove tags feature
Summary:
We no longer user tags in any of our repositories, so let's delete all
the code and remove some tech debt.

Previously drawdag was our last remaining use of tags, but in a previous diff I
switched that to use bookmarks.

Reviewed By: quark-zju

Differential Revision: D19042226

fbshipit-source-id: d7871c71c1026599aa70fdd806418347ea214a8a
2020-01-07 12:31:10 -08:00
svcscm
a47038bb11 Updating submodules
Summary:
GitHub commits:

db29e6c802

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 2322976e8aa76d00cc8b7799876f0d98326eb6cf
2020-01-07 04:46:43 -08:00
Durham Goode
898149fa37 treestate: make treestate a hard requirement
Summary:
We want to delete all the non-treestate dirstate implementations. Let's
start throwing an exception if treestate is not enabled. We temporarily have a
bypass in case we break an important usecase in the process.

This also sets the standard new repo to be created in treestate mode, but adding
treestate to newreporequirements.

Reviewed By: quark-zju

Differential Revision: D19204621

fbshipit-source-id: 61c0c69ce6e559615ef570d2343bea78c1b5d5ee
2020-01-06 21:37:05 -08:00
svcscm
a7aeb5d7a6 Updating submodules
Summary:
GitHub commits:

f1a7e54d21

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c168ede42e357dd589c65febf836101d387c9780
2020-01-06 21:37:04 -08:00
svcscm
38e71613fa Updating submodules
Summary:
GitHub commits:

590ef44087
348bc38c60
19d2ae67d8
6a4c8fb730
f2dc903e30
1b55068dff

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 5b8c830dafd947501bc76f7b24496a8fbb2af285
2020-01-06 17:10:22 -08:00
Durham Goode
7286630863 rebase: prevent fast-foward rebases with conflicting changes
Summary:
Tweakdefaults adds the ability for `hg rebase -d` to simply fastforward
the user if the destination is a descendant of the current working copy parent.
If the working copy is dirty, it merged the files, potentially leaving the
working copy with merge conflicts that are hard to recover from.

A normal hg update disallows merges that would result in potential conflicts.
Let's update the rebase code to use the same merge logic, so fast forward
rebases simply abort if there are potential conflicts.

Reviewed By: quark-zju

Differential Revision: D19204198

fbshipit-source-id: 1b0c2c0fdab909eebe74d1a211dbfb2d780058cd
2020-01-06 15:06:50 -08:00
Mark Thomas
2158e4c531 commitcloud: add Rust rendering of cloud smartlog
Summary:
Allow rendering of cloud smartlogs using renderdag.  Use the ability of renderdag
to reserve columns to provide the smartlog-like indentation of draft stacks.

Reviewed By: quark-zju

Differential Revision: D19272577

fbshipit-source-id: 3311d83511b0d5347b45f33c282ce26b8133d047
2020-01-06 15:00:08 -08:00
Mark Thomas
8e28741a8b smartlog: add Rust rendering of graphs
Summary: Allow rendering of smartlog graphs using renderdag.

Reviewed By: quark-zju

Differential Revision: D19272578

fbshipit-source-id: 1cd19753781c58e49038d72f12c8f5ebf3bad6f9
2020-01-06 15:00:08 -08:00
Mark Thomas
da3d898cd4 cmdutil: add Rust rendering of graphs
Summary:
Allow rendering of graphs using renderdag by setting `experimental.graph.renderer` to `ascii`, `ascii-large` or `lines`.

The minimum height of each row can be set using `experimental.graph.min-row-height`.

Reviewed By: quark-zju

Differential Revision: D19272580

fbshipit-source-id: ac5eff8446bd3c09d07624a193195b4224055ffc
2020-01-06 15:00:07 -08:00
Mark Thomas
0822231d79 pyrenderdag: add python bindings for renderdag
Reviewed By: quark-zju

Differential Revision: D19272576

fbshipit-source-id: f79019d3506efe03675f49b9ad728582b22bd205
2020-01-06 15:00:06 -08:00
Mark Thomas
e91c6ffa7c renderdag: make test fixtures common
Summary:
Move the test fixtures into a common module, so that they don't need to be
repeated in each test.  Since each fixtures is now a struct, this also makes it
clearer what each of the items are.

Reviewed By: quark-zju

Differential Revision: D19288290

fbshipit-source-id: 394805c652592177f11ccb096b8e5e95361456e4
2020-01-06 15:00:06 -08:00
Mark Thomas
cdd0f39805 renderdag: add test case for long messages
Reviewed By: quark-zju

Differential Revision: D19288289

fbshipit-source-id: d7d7023900d4f7c8d1ed14d15217548875a349c6
2020-01-06 15:00:05 -08:00
Mark Thomas
693ca3ff6a renderdag: Use builder pattern for output renderers
Summary:
Generalize construction of output renderers (renderers that render to `String`)
to avoid duplication of options.  At the moment there is only one, but later we
may add new options.

This also allows us to construct output renderers from any renderer that
renders to `GraphRow`, which means we can create adapters that modify or
re-order the rows of the graph.

Reviewed By: quark-zju

Differential Revision: D19286350

fbshipit-source-id: a5649ca2f48e263ee24584339179655fb612d3d1
2020-01-06 15:00:05 -08:00
Mark Thomas
213b3f086c renderdag: add a DAG rendering crate
Summary:
A new implementation for rendering DAGs.

This new crate implements a generic DAG renderer, that can convert a
topologically sorted sequence of DAG nodes into a sequence of strings suitable
for rendering to a terminal.

The new renderer differs from the old renderer in a few important ways:

* It prioritizes keeping commits linear, and will allow gaps to form if
  that will allow the history of the commits to be kept in a straight
  line.  This makes it easier to track long parallel histories.

* It supports octopus merges (nodes with more than two parents).  Even
  though Mercurial doesn't support octopus merge commits, summary DAGs
  with omitted nodes can still end up with logical octopus merges.

* It supports reservation of columns for specific nodes.  This can be
  used to support smartlog-style indentation of draft stacks without
  needing to hack around it by creating fake nodes.

* It separates out forming the graph from generating the lines.  This
  allows multiple back-ends for generating different styles of graph.

There are three back-ends implemented:

`AsciiRenderer` renders similar to the old graph renderer, using ASCII
characters.  For example:

```
  o  F
  |
  | o  E
  | |
  | | o  D
.-----'
o | |  C
+---'
o |  B
:/
o  A
```

`AsciiLargeRenderer` uses larger ASCII blocks to give a clearer picture of
complex graphs.  For example:

```
   o   F
   |
   |
   |  o   E
   |  |
   |  |
   |  |  o   D
  ______/
 / |  |
o  |  |   C
| ___/
|/ |
o  |      B
: /
:/
o   A
```

`BoxDrawingRenderer` uses Unicode box drawing characters to give a more
continuous rendering of the graph, however requires support for these
characters in the terminal font.  For example:

```
  o  F
  │
  │ o  E
  │ │
  │ │ o  D
╭─────╯
o │ │  C
├───╯
o │  B
├─╯
o  A
│
~
```

Reviewed By: quark-zju

Differential Revision: D19272579

fbshipit-source-id: bb6fa4685c965544cc3b6b9261df3a3ec161b41f
2020-01-06 15:00:04 -08:00
Jun Wu
8e3a606106 graphql: do not error out if signal_summary is None
Summary:
This can happen for "Reserved" diffs.

Reported By: hyr

Differential Revision: D19270860

fbshipit-source-id: 24e9b8c08fc16e3089e0dc3f8064a5e9671d9ace
2020-01-06 14:27:43 -08:00
svcscm
ffdc02c183 Updating submodules
Summary:
GitHub commits:

efc66e197a

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: b4e1ff8d4409400d89031a8aa6943db5b2a573bc
2020-01-06 12:59:54 -08:00
Genevieve Helsel
a03dac0a83 reactivate test_abort_split_with_pending_add
Reviewed By: chadaustin

Differential Revision: D19167578

fbshipit-source-id: fa2c848a4e157bcf9c466b4b65132168201e4d97
2020-01-06 08:52:27 -08:00
Genevieve Helsel
26f4427200 add eden debug parents
Summary: adds a cli debug command to inspect the working copy parent. by default just returns eden's snapshot contents, but adds optional --hg flag to print Mercurial's dirstate information

Reviewed By: chadaustin

Differential Revision: D19167518

fbshipit-source-id: b65e112df6abe4e0e7a8a528a90b2e3d17297e66
2020-01-06 08:52:27 -08:00
svcscm
3a5f7cd348 Updating submodules
Summary:
GitHub commits:

9f739b3865

Reviewed By: zpao

fbshipit-source-id: f4c4ed231764c93c7ac45a84064f3735c797fbed
2020-01-06 08:52:27 -08:00
svcscm
354a856e13 Updating submodules
Summary:
GitHub commits:

ca78b4cec2
25f36d9487
8d6dad4233
23add38cf9
879d0b4d3d

Reviewed By: zpao

fbshipit-source-id: 9f1d21d12f45142939a38d598edac08727545369
2020-01-05 22:22:10 -08:00
svcscm
edf5f7d718 Updating submodules
Summary:
GitHub commits:

f2a603d2df
323a2bc3e5
04c07965ef
c179d38294
6fac956f22

Reviewed By: zpao

fbshipit-source-id: 558f35dbf1adb3b45179629c61d77488e441d4e3
2020-01-05 16:22:33 -08:00
svcscm
694ffecfc9 Updating submodules
Summary:
GitHub commits:

72178dba37

Reviewed By: zpao

fbshipit-source-id: 293b782d0ed2758e236220912a322214e7191414
2020-01-04 17:25:47 -08:00
svcscm
e7a3a9e49f Updating submodules
Summary:
GitHub commits:

8c7c0e201e
b84db9a971
0524fa0b36
2df7b2ba54
80553514ed
4eb66bc7aa

Reviewed By: zpao

fbshipit-source-id: 97d0605beabcfc15236038215208acf034f8eba4
2020-01-03 17:06:25 -08:00
Jon Maltiel Swenson
cc1a7ddcde Kill rsocket server stack
Summary: This stack is deprecated in favor of the rocket stack.

Reviewed By: rhodo

Differential Revision: D18123600

fbshipit-source-id: db6e3bf4add9c49cf8f1d2f12f97b207e87c7302
2020-01-03 15:53:10 -08:00
svcscm
95b8dde266 Updating submodules
Summary:
GitHub commits:

94e22ff147
d818f91cc6
411e289794
f8995818ce
34b6dfdf8f
83957dc510
95578decbf
19808a511d

Reviewed By: zpao

fbshipit-source-id: 51d1c1bb4b17a302b4fe1be0b36f9f29b25d017a
2020-01-03 14:36:44 -08:00
Jun Wu
a97842c8c2 fbscmquery: fix globalrev graphql query
Summary: `"globalrev"` is invalid. Use `GLOBAL_REV` instead.

Reviewed By: singhsrb

Differential Revision: D19271059

fbshipit-source-id: c26347b92b1b92a5f958f2f71dbdfdf3635a0876
2020-01-03 12:40:04 -08:00
svcscm
cce18eb482 Updating submodules
Summary:
GitHub commits:

a5048c8f19

Reviewed By: zpao

fbshipit-source-id: c6960b011747963548caae6275fdd9c070b783fc
2020-01-03 10:29:19 -08:00
svcscm
7e24f0f737 Updating submodules
Summary:
GitHub commits:

212c6d0aaa
ed1fe9f267

Reviewed By: zpao

fbshipit-source-id: 8520bfadc1ae1a8b007f9363e61c1a4aef617890
2020-01-03 10:29:19 -08:00
svcscm
f9eb69f100 Updating submodules
Summary:
GitHub commits:

3fb718407d
09634ef57a
8f520a0228
7c98d71567
36e454b275
b1cc91a499
603238265c

Reviewed By: zpao

fbshipit-source-id: 4b8a80327e1e62b7f507d3ea38023dac22921926
2020-01-02 18:52:20 -08:00
svcscm
51eea50c8a Updating submodules
Summary:
GitHub commits:

123ae291fc
b9e9d4f7d9
86ea03e727
1cd1bfb668
917504ac42
06cc652030
e63819cbe3
6d21d8cfd3
b636829d55
19d0faece2
9860344e10

Reviewed By: zpao

fbshipit-source-id: 1de7509af788dc7861cfc779936fbc9e0146a5a5
2020-01-02 18:52:19 -08:00
svcscm
e348dbd6be Updating submodules
Summary:
GitHub commits:

c3da1769aa
dc5d27c6b2
6f6f6fdd20
99642ef23b
506f80638d
267ff5b58e
0d9f8b35f8
4cac5847b4
cbf71eab61

Reviewed By: zpao

fbshipit-source-id: 10e4e08f4a0cfb473d81336d5040bc18515bc35d
2020-01-02 12:51:34 -08:00
Lukas Piatkowski
0e13cf88dc rust-shed: move stats to the shed
Summary: This change also introduces a dummy no-op stats implementation for non-fbcode builds.

Reviewed By: farnz

Differential Revision: D19193954

fbshipit-source-id: f513368a2387987bf129ddf935217c90b7c84f2a
2020-01-02 11:10:59 -08:00
svcscm
5cb6809133 Updating submodules
Summary:
GitHub commits:

96c62e344d

Reviewed By: zpao

fbshipit-source-id: a1ccbee192f5528b479caa34f89192198a6cc73f
2020-01-02 11:10:59 -08:00
svcscm
7a095941a6 Updating submodules
Summary:
GitHub commits:

f9956e1c40
0952dd21c4

Reviewed By: zpao

fbshipit-source-id: 8b64c48584529c36b944ad7009d17f269c3888d9
2020-01-01 17:22:24 -08:00