Commit Graph

47028 Commits

Author SHA1 Message Date
Aleksei Kulikov
aaca5459b6 snapshot: add snapshot show command to view individual snapshots
Summary:
Need a cmd which is equivalent to `hg show <commit id>` for snapshots.
```
$ hg snapshot show <snapshot id>
<the regular patch message for commits>
  ? untrackedfile
  @@ -0,0 +1,1 @@  # diff-like content
  +fizz
  ! missingfile
  @@ -1,1 +0,0 @@  # diff-like content
  -foo
  ? .hg/merge/fc4ffdcb8ed23cecd44a0e11d23af83b445179b4
  @@ -0,0 +1,1 @@
  +b

  The snapshot is in an unfinished *merge* state.
```

Reviewed By: mitrandir77

Differential Revision: D17529050

fbshipit-source-id: 331c68f64a5ad71d6d77363a9dd1aed6e569efa5
2019-09-26 14:20:22 -07:00
Aleksei Kulikov
a829fee85c snapshot: show snapshots in smartlog
Summary:
Snapshots can be marked with letter `s`:
```
  s    changeset:   8:510948b1f172
  |\   parent:      7:fdf2c0326bba
  | |  parent:      6:55f800d93e34
  | |  user:        test
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
  | |  summary:     snapshot
  | |
  | @  changeset:   7:fdf2c0326bba
  | |  parent:      2:fa948fa73a59
  | |  user:        test
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
  | |  summary:     merge #2
  | |
  @ |  changeset:   6:55f800d93e34
  | |  user:        test
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
  | |  summary:     merge #1
  | |
  o |  changeset:   5:afed36f05817
  | |  user:        test
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
  | |  summary:     draft2
```

Reviewed By: mitrandir77

Differential Revision: D17533027

fbshipit-source-id: da22fef6c23933e2c91d6f5b4ff6d4adb2714e31
2019-09-26 14:20:22 -07:00
Jun Wu
a381eddae1 tests: add a script to translate tests to Python
Summary:
The script does:
- Run the Python translate script.
  - With `--verify` so the test will be disabled if it does not pass.
  - With `--black` so the test file is formatted.
  - With `--hgmv` so the test is marked as a "rename", and `hg log` on it can
    trace back to the old history.
- Make a commit, so the manual edits are easier to review.

Reviewed By: xavierd

Differential Revision: D17609337

fbshipit-source-id: 0ce61e8a2e1a1d4424b1d3f15426f44a6fcaa739
2019-09-26 13:23:29 -07:00
Jun Wu
6833cec26d test-obsmarker-template: remove use of getid
Summary:
Change `debugobsolete` to take revsets so we don't need to use the shell
substitution feature. This makes it easier to migrate the test to Python.

Reviewed By: singhsrb

Differential Revision: D17608329

fbshipit-source-id: 5f1201b8f16aebe39de14fdbda17a7bfc485dba2
2019-09-26 13:13:44 -07:00
Jun Wu
6d83c91c4d test-obsmarker-template: remove tests about cycles
Summary:
The cycle tests will break with an upcoming change. Our desired cycle
handling behavior is different from upstream, and our main 2nd-order
history storage is the mutation store, which has its own cycle tests
in test-mutation-loops.t. Therefore remove this test section.

Reviewed By: singhsrb

Differential Revision: D17608331

fbshipit-source-id: 658b04cf9c30811a12614cef822a1cdf80551e67
2019-09-26 13:13:44 -07:00
Mateusz Kwapich
114bc9d1aa xdiff: add a friendly wrapper for rust bindings (xdiff)
Summary:
This will make using xdiff much easier.

In the next diff I'm planning to also add a function that converts the output of this function to a textual diff (the one with `+`'s and `-`'s).

Reviewed By: quark-zju

Differential Revision: D17551184

fbshipit-source-id: cda332e817f733d7aa32aeeb7b2d312d971826dd
2019-09-26 11:01:09 -07:00
Mateusz Kwapich
02db823918 xdiff: add rust bindings (xdiff-sys)
Summary:
These are limited (not all features are exposed) bindings for xdiff - the diff library used by git and our version of hg. We need them to be able to generate diffs in Mononoke.

In the next diff I'll add more rust-friendly wrapper library.

Reviewed By: quark-zju

Differential Revision: D17548528

fbshipit-source-id: f23c8a65d11d2c5de8f0456d32883f16b19a98e2
2019-09-26 11:01:09 -07:00
Jun Wu
4afaf065fe indexedlog: add checks about the append-only property
Summary:
Both Index and Log requires their on-disk files to be append-only.
Detect non-append-only changes and return errors. This might help
us get better error messages if the case actually happens.

Reviewed By: markbt

Differential Revision: D17592914

fbshipit-source-id: b12791177ceb04f2373e93a679101e8b96e2bc98
2019-09-26 10:19:44 -07:00
Jeffrey Dunn
727359cd30 Add hash binary config option for hg diff
Summary:
When there's a change in a binary file, it's useful for it to appear
in the output of hg diff in some format. The options today are just to get
a text message saying that there is a change or a large binary blob of the
change. This introduces a middleground where we see the hash of the final
binary.

Reviewed By: quark-zju

Differential Revision: D17579217

fbshipit-source-id: ca204bb0ee28bfef327d57eea8236d7421bf933f
2019-09-26 09:22:18 -07:00
Aleksei Kulikov
08cdcd0ea2 snapshot: store a list of snapshots instead of set
Summary:
Storing nodes in a `set` does not make much sense because of possible aliases etc.
It is possible to remove duplicates via `util.removeduplicates` function.
List, on the other hand, preserves order and there will be less conversions during sync (later in the stack).

Differential Revision: D17397594

fbshipit-source-id: ba76e0a1f53516544f055355356d0beaf1c8bfa8
2019-09-26 04:50:18 -07:00
Aleksei Kulikov
83708239f0 snapshot: store hex nodes of the snapshots
Differential Revision: D17397473

fbshipit-source-id: 36e956fa3031bbc2eb92a75a0c3a18d312df5ef6
2019-09-26 04:50:17 -07:00
Aleksei Kulikov
14d3872615 snapshot: make the snapshots invisible after pull
Summary:
Right now `hg pull -r REV` marks all pulled revs as visible.
This makes sense for regular commits (if they exist in the cloud, then they are not hidden).
For snapshots, it is wrong, thus we need not to mark snapshots as visible when pulling.

Differential Revision: D17289438

fbshipit-source-id: d16237b9e471f49bb44317104bc445472bedc16c
2019-09-26 04:50:17 -07:00
Henri Verroken
836347bf1b sparse: warn when enabling non-existing profile
Summary:
Add a warning when a user enables a sparse profile on the command line that does not exist.

Triggering the check from multiple places, to not have to clutter the `_config` function. The `_config` function is called from other places as well (eg cloning a sparse repo) and I didn't want to add another guard parameter to it for such a benign functionality.

Besides the `_checknonexistingprofiles` function is only called in 3 situtations:

1. `hg sparse {enable|enableprofile}`
2. `hg sparse --enable-profile` (which is actually deprecated)
3. `hg clone --enable-profile`

Special care has been taken when cloning a sparse repo to do the check after the clone.

Reviewed By: markbt

Differential Revision: D17571442

fbshipit-source-id: 882dbe8b142bf192754dd17d0729d1bb0b472a83
2019-09-26 02:23:09 -07:00
Xavier Deguillard
26b38fdee3 tests: fix test-hook.t
Summary: The test recently broke.

Reviewed By: quark-zju

Differential Revision: D17590628

fbshipit-source-id: 2c4a6e911fa6ee268e2c434ade50672f489b398e
2019-09-25 19:17:43 -07:00
Jun Wu
11b6baa066 indexedlog: stresstest RotateLog multi-thread writes
Summary:
Similar to Log, this somehow stress tests RotateLog behavior in a multi-thread
environment.

Reviewed By: xavierd

Differential Revision: D17542324

fbshipit-source-id: 35ea358157cf141bec3802b959c9f921eca3143a
2019-09-25 18:59:39 -07:00
Jun Wu
e0ac732667 indexedlog: stresstest multi-thread sync()
Summary:
Add a simple stresstest that calls sync() in multiple threads. This should
give us some confidence that `sync()` has expected behavior when called in
an multi-thread environment.

Reviewed By: xavierd

Differential Revision: D17538980

fbshipit-source-id: 1793a3f871f0377c452807efa466d65d0da4b1f6
2019-09-25 18:59:39 -07:00
Jun Wu
10aa5196c2 revlogindex: do not allocate parentrevs
Summary:
Getting "parents" in revlogindex is used in a very hot loop. So avoiding
allocation matters. With this patch, it's roughly 5x faster, and matches
C code doing whole changelog scan.

Before:

  In [3]: %time cl.index2.headsancestors([1,len(cl)-1])
  CPU times: user 330 ms, sys: 68 µs, total: 330 ms
  Wall time: 330 ms
  Out[3]: [5584666]

After:

  In [3]: %time cl.index2.headsancestors([1,len(cl)-1])
  CPU times: user 52.9 ms, sys: 0 ns, total: 52.9 ms
  Wall time: 53 ms
  Out[3]: [5584665]

C code doing whole changelog scan:

  In [5]: %time cl.index.clearcaches(); cl.index.headrevs(); 1
  CPU times: user 54.2 ms, sys: 187 µs, total: 54.4 ms
  Wall time: 54.4 ms

`smallvec` was not used, as it has extra overhead tracking whether it's
stack or heap allocated, which makes it 2x slower than this diff.

Reviewed By: sfilipco

Differential Revision: D17581248

fbshipit-source-id: cf6e36e0000759f41410f1e3a1d252920711fb79
2019-09-25 18:44:42 -07:00
Jun Wu
f8761b6cc7 dispatch: make it possible to enter ipdb automatically for uncaught exceptions
Summary:
Add a config option, `devel.debugger`. If set, enter ipdb session automatically for
uncaught exceptions.

The motivation is to debug issues that cannot be easily reproduced (so running the
same command again with `--debugger` is not a choice).

Reviewed By: xavierd

Differential Revision: D17578249

fbshipit-source-id: 253eea6cfd2324f485152a28ed922eb499d560cd
2019-09-25 17:46:08 -07:00
Jun Wu
3dab26fb41 test-visibility-cloudsync: enable narrow heads
Summary: Enable narrow-heads for this test.

Reviewed By: sfilipco

Differential Revision: D17199840

fbshipit-source-id: e91e17aa41a9056654711eca0f91a5584a9739f9
2019-09-25 17:22:53 -07:00
Jun Wu
d2fbf92c1d test-visibility-bundle: use narrow-heads
Summary: Make the test use the modern features.

Reviewed By: sfilipco

Differential Revision: D17199835

fbshipit-source-id: 7301b6178e20b6286d765f12ffadb111bb348113
2019-09-25 17:22:53 -07:00
Jun Wu
c7e4d733f3 undo: support visibility + narrow-heads directly
Summary:
With visibility and narrow-heads, undo can just track visible heads and replace
visible heads without messing up with mutation records. This diff implements
that.

Support for `--branch` is dropped. If it is actually used, we can implement a
visible head-based version in the future.

Reviewed By: sfilipco

Differential Revision: D17244563

fbshipit-source-id: 55b62a277018f456fa88903d9cc7c0edc9f7006b
2019-09-25 17:22:53 -07:00
Jun Wu
b7c816c7a5 test-undo-narrow-heads: fork test-undo with modern configs
Summary:
Copy the test with modern configs: visibility, mutation, remotenames, and
narrow-heads.

It does not pass right now, which will be fixed by upcoming diffs.

Reviewed By: sfilipco

Differential Revision: D17244559

fbshipit-source-id: 178a105d28dd6064ea040b2baba303493c700e25
2019-09-25 17:22:52 -07:00
Jun Wu
9adf723d40 test-mutation-infinitepush: enable narrow heads
Summary: Enable narrow-heads for this test.

Reviewed By: sfilipco

Differential Revision: D17199836

fbshipit-source-id: 312bf6591e89a370a7a79add7fb730258a3711c9
2019-09-25 17:22:52 -07:00
Jun Wu
37ac464e35 test-mutation-pushrebase: use narrow heads
Summary:
`tip` and `default` are changed to `master` (bookmark) to make it more
explicit. `log --hidden` was changed to `log -r predecessors(all())`.

I didn't investigate why `(+1 heads)` message get missing. I think we
should probably just remove the message.

Reviewed By: sfilipco

Differential Revision: D17199838

fbshipit-source-id: 0dbe982300f4c4c5e7429c0bf017e0cc97af6872
2019-09-25 17:22:52 -07:00
Jun Wu
abe72eab0a test-mutation-loops: use narrow-heads
Summary:
Use narrow-heads for the test so we get some confidence that it works with our
production setup.

Some test changes:
- `predecessors()` revset now shows all commits regardless of "hidden" or not.

Reviewed By: sfilipco

Differential Revision: D17244564

fbshipit-source-id: 9053adbbb913c28d1e7b421155e6325c15790fc5
2019-09-25 17:22:52 -07:00
Jun Wu
96eb1c3d1f test-commitcloud-sync-race: use narrow-heads
Summary:
Use narrow-heads for the test so we get some confidence that it works with our
production setup.

A `master` bookmark was added to mark commit public on the server repo.

Reviewed By: sfilipco

Differential Revision: D17244551

fbshipit-source-id: bf65c3aaf0a2fb46c9e7f1af36cc845ae40f44c6
2019-09-25 17:22:51 -07:00
Jun Wu
965fc49d52 mutation: use new way to test if successors are visible or not
Summary:
If `narrow-heads` is turned on, there are no "filtered revs", and `cl.hasnode`
returns Ture for previously "filtered revs". By definition, `cl.hasnode` should
check `::head()`.

I looked at users of `cl.hasnode` and other users seem to be unaffected. This
diff changes mutation's usecases of `cl.hasnode` to use `::head()` instead.
`::head()` is practically `draft() + public()`. The phases revsets are
pre-calculated. Therefore use them to speed up the calculation.

Reviewed By: sfilipco

Differential Revision: D17264381

fbshipit-source-id: a1bef495d74ade8f074855c149748c999ad246f6
2019-09-25 17:22:51 -07:00
Jun Wu
4653d17650 visibility: implement --hidden using allheads
Summary:
To preserve the `--hidden` behavior, make `cl.headrevs` return all heads ever
tracked. Besides, phase revsets like `draft()` also requires extra calculation
if `--hidden` is set.

Reviewed By: sfilipco

Differential Revision: D17264380

fbshipit-source-id: 3590e993f745dce8b1718af4fb12308b2fbf1549
2019-09-25 17:22:51 -07:00
Jun Wu
ca89f70871 visibility: track all (hidden) heads
Summary:
This will be used to preserve the `--hidden` behavior by using a more complete
list of heads.

A test introduced by 6563438219
was removed as it does not make sense to me to force changing read size from 65536 to 1.
That commit itself does not have useful commit message, and I cannot find email review thread for it.

Reviewed By: sfilipco

Differential Revision: D17264382

fbshipit-source-id: cc17e98eef4a4743e5207795a7054db59aa71fc0
2019-09-25 17:22:50 -07:00
Jun Wu
ecbd4029e1 test-upgrade-repo: remove the test
Summary:
This test is causing trouble in upcoming changes. We don't really care about
the code path - they are migrating *ancient* formats to some formats that we've
been using for years.

For modern migration, like flat dirstate -> tree dirstate, we have seperate
code paths and seperate tests.

Reviewed By: sfilipco

Differential Revision: D17581267

fbshipit-source-id: 7154489ccf46bb4add1c1ec882eafae507af94d3
2019-09-25 17:22:50 -07:00
Jun Wu
ab3da9107c blackbox: do not inherit session_id if pid has changed
Summary:
D17429691 made blackbox reuse session_id unconditionally. That has an
undesirable side effect that chg processes are all logged as a same session id.
Fix that by detecting pid change and avoid reusing session_id in that case.

Reviewed By: singhsrb

Differential Revision: D17532555

fbshipit-source-id: cf11bb66f7d7242429b90ab5e5ea85ca307f92c3
2019-09-25 17:17:40 -07:00
Xavier Deguillard
7db4a13b5f remotefilelog: ignore corrupted packs during python repack
Summary:
Sandcastle folks have recently seen the number of unhealthy host going up due
to `hg repack` failing when a corrupted packfile is present on disk. When a
corrupted packfile is detected, let's simply ignore the failure.

Reviewed By: DurhamG

Differential Revision: D17582128

fbshipit-source-id: 64a589a165605791d207e4029cccb93a8bcd3c24
2019-09-25 16:16:25 -07:00
Jun Wu
bf2ff65093 indexedlog: add more context to some errors
Summary:
Add some context around "invalid read offset" to make errors slightly more
useful.

Reviewed By: xavierd

Differential Revision: D17577202

fbshipit-source-id: d51ba30abf6c462102be8bec1b60668ee66e07f2
2019-09-25 14:08:19 -07:00
Jun Wu
71b243f3f8 revisionstore: keep error'd indexedlog files for debugging
Summary:
Instead of removing them unconditionally, keep one copy that failed to `open`
so we can have a look later.

Reviewed By: xavierd

Differential Revision: D17576432

fbshipit-source-id: 4f967d61aa602e6d3cac90d411e1971893c162bd
2019-09-25 14:08:19 -07:00
Jun Wu
e7a21f8b44 indexedlog: revise error handling in RotateLog::open
Summary:
Revise some error handling details so it covers corner cases more acurately and
provides more detailed error messages.

Since D16554090, RotateLog::open unconditionally attempts to create an empty
log at 0/ and reset latest to 0 if read_latest_and_log fails. That could be
undesirable if latest can be read but logs cannot, since it can silently reset
latest to 0 and might cause trouble in the future (For example, failed to
create an empty log at 1/ because it already exits).

This diff splits read_latest_and_log to read_latest and read_logs and handles
their errors individually.

The table summaries changes:

  | latest  | logs     | old behavior | new behavior        |
  | okay    | okay     | return both  | return both         |
  | okay    | error    | create log 0 | create log latest+1 |
  | missing | whatever | create log 0 | create log 0        |
  | error   | whatever | create log 0 | error               |

Reviewed By: xavierd

Differential Revision: D17576431

fbshipit-source-id: c9ab1fca5fb60eecf9e326baf90dfa98560a2b32
2019-09-25 14:08:19 -07:00
Jun Wu
457010fbe2 repo: reuse manifest node if manifest write returns None
Summary:
It's possible for a file to appear in the `added` list but is not actually
changed. In that case the Rust manifest has a different behavior that returns
None that breaks the code. Fix it by "correcting" to p1 manifest node.

Reviewed By: sfilipco

Differential Revision: D17512350

fbshipit-source-id: 7c74ffb4e73ed1af5378fe509ed4f06a512995ae
2019-09-25 12:16:35 -07:00
Carolyn Busch
537419bcea Workingcopy: Remove matcher reference
Summary:
Walker should own matcher instead of storing a reference, so the walker can be
stored as a member of a struct by itself

Reviewed By: xavierd

Differential Revision: D17511588

fbshipit-source-id: 039c6c3cced7feec4e9141c31e5333c43879484a
2019-09-25 11:00:05 -07:00
Aleksei Kulikov
fe325e6d93 snapshot: make snapshotlist cacheable in localrepo
Summary: It will be needed to sync snapshots while bypassing the `sync` transaction.

Reviewed By: markbt

Differential Revision: D17571650

fbshipit-source-id: ff6c0382a1b1e763c3e37610d188f5bbfb382510
2019-09-25 08:29:22 -07:00
Jun Wu
31ec755dd0 indexedlog: fix a race condition creating "lock" file on Windows
Summary:
The current way of opening the lock file and creating it on demand is racy.
Fix it by making it one operation.

Reviewed By: singhsrb

Differential Revision: D17552687

fbshipit-source-id: 5469862902ccab2d317f2c0ac61867c365e22aba
2019-09-24 17:47:25 -07:00
Michael Devine
0a3442c04a Prototype: repo-hg converter plugin
Summary:
AR/VR Engineering does AOSP development using Git and Google Repo. This is rough at times because FB Dev Infra doesn't support these tools in a lot of critical use cases. This commit contains a very rough prototype of a hg convert extension to support Google Repo as a source.

What this commit does:
1. Finds all of the heads in all of the git projects in the Grepo and imports their commit histories into mercurial.
2. Merges those commits into a single commit history that represents the default manifest in the current branch.

What this commit doesn't do:
1. Explore the space of all manifests that have ever existed in the manifest project and update directory branches based on those.

Reviewed By: tchebb

Differential Revision: D14944252

fbshipit-source-id: b292025ccac06d02b347e35839215eedfd151a5d
2019-09-24 14:38:31 -07:00
Aleksei Kulikov
d598f1f954 setup: add (cbor)utils to setup.py
Reviewed By: markbt

Differential Revision: D17551753

fbshipit-source-id: 872045200ad3930551a9feac60ca97282744ed59
2019-09-24 12:50:53 -07:00
Stefan Filip
6e9cdfe56c manifest: fix finalize to not eagerly fetch directories
Summary:
Finalize is asking the cursor to traverse into directories that haven't changed.
This is bug introduced when updating finalize to support being called on
"Durable" nodes. Until then directories would always be traversed if they were
in the processing path. The path would only be chosen for "Ephemeral"
directories which we knew were different from a parent that is assumed to be
"Durable". I later learned that `finalize` is expected to return the manifests
that are directly fetched from storage. The update meant that we would skip
the directory that is processed if the "Node" (hash) is present and matches a
parent. The problem is that didn't update the point at which the parent cursor
is advanced.

Reviewed By: xavierd

Differential Revision: D17537448

fbshipit-source-id: 9c71a8f8f5a70c600031bc9d32535e59f2f32700
2019-09-24 10:13:38 -07:00
Zeyi (Rice) Fan
681d2dc782 phabstatus: add diffusion signal status to ssl
Summary:
Now we can show test status of a diff in super-smartlog!

Users can customize this by tweaking their `.hgrc`:

For example, if the want to use Emojis (and their terminal supports it), they can add the following lines to their `.hgrc`:

```
[templatealias]
sl_signal_warning = "⚠️"
sl_signal_in_progress = "️"
```

{F211469447}

(Unfortunately my set up does not handle some of the Emojis properly :( This is the best I can get)

If they dislike fancy Unicode characters, they can switch back to plan old text as well:

```
[templatealias]
sl_signal_okay = "Okay"
sl_signal_failed = "Failed"
sl_signal_warning = "Warning"
sl_signal_in_progress = "In Progress"
```

Reviewed By: quark-zju

Differential Revision: D17540182

fbshipit-source-id: fdaf87f2f4e0977ca0b171c0b48514e764c57553
2019-09-24 09:22:08 -07:00
Thomas Orozco
0f73742898 readauthforuri: allow for multiple matches
Summary:
This updates readauthforuri to allow for multiple credentials for the same
host, with a preference for credentials that do exist on the filesystem, and
otherwise a fallback to configurable priorities.

Reviewed By: farnz

Differential Revision: D17528631

fbshipit-source-id: 0b8f255572415b9f60c1aa687728282451f637c4
2019-09-24 09:10:23 -07:00
Jun Wu
84da0f1df3 localrepo: make 'ignoring unknown working parent' a hard error
Summary:
By ignoring unknown working parent, and treating working parent as `null`,
various operations wouold be painfully slow, because `status` would return the
entire working copyp as "untracked".

I hit it today due to some transaction related issues. What I did:

- `hg commit` from one terminal, keeping the editor
- `hg revert -i` from another terminal, waiting for lock
- `hg commit` completed
- `hg revert -i` appears to have loaded the updated dirstate, but not the
  updated changelog. So it cannot find the new commit and prints the `ignoring
  unknown working parent` message.

It's very hard to reason about the current related code.  We'll probably get a
better transaction model to make this less likely to happen.  So I didn't write
a test for the legacy code.

Reviewed By: xavierd

Differential Revision: D17532554

fbshipit-source-id: a06b56d78ef4cc129ee7d302c179668747881a69
2019-09-23 18:59:43 -07:00
Xavier Deguillard
c33468798a copytrace: properly detect when gdbm is absent
Summary:
The `import gdbm` statement may or may not be enough to detect missing
modules, let's try to access the `open` method to force load it.

Reviewed By: quark-zju, singhsrb

Differential Revision: D17539167

fbshipit-source-id: be0271224b28afb5f0a525d86420c1a12994c0d2
2019-09-23 17:37:46 -07:00
Jun Wu
aa8e29b5a7 nodemap: add nodeset structure
Summary: This will be used to store "invisible heads".

Reviewed By: sfilipco

Differential Revision: D17264837

fbshipit-source-id: a450b5c10cc961d43ec8eb852cb2fb22849a8c00
2019-09-23 17:11:23 -07:00
Jun Wu
35e6c2f7f2 serve: disable narrow-heads for serve commands
Summary:
The new `narrow-heads` feature only makes sense for new clients. The hg servers
have hard dependency on revlog (because of hgsql) and cannot be migrated to any
fancier changelog structure easily. Therefore just unconditionally disable
`narrow-heads` for them. This makes it easier to change tests.

Reviewed By: sfilipco

Differential Revision: D17244554

fbshipit-source-id: ee6e7e8cab726ccb27814683447ea6271e41cc3e
2019-09-23 17:11:23 -07:00
Jun Wu
478f472eff remotenames: add a debug command to write remotenames
Summary:
Phases are going to be defined by remote names. That means `hg phase -f` no
longer works. To workaround it, add a debug command to mangle remote names.

Reviewed By: sfilipco

Differential Revision: D17244553

fbshipit-source-id: efca1be22f5ab2ff9f39965ed0e98712cc944d1c
2019-09-23 17:11:23 -07:00
Jun Wu
226553d20a log: use 'all()' instead of spanset for default revs
Summary:
`hg log` without arguments are used frequently in tests. Use `all()` to hide
invisible commits.

Note: this does not change end-user behavior, since tweakdefaults adds `-f`
and `log` without arguments will be logging `:.` instead (which, should
probably be changed to log `::.`).

Reviewed By: sfilipco

Differential Revision: D17244555

fbshipit-source-id: d5a0da0355ece850f4969cb244f4ebf23da040d1
2019-09-23 17:11:22 -07:00