Commit Graph

1105 Commits

Author SHA1 Message Date
Jun Wu
2a4db136e5 mergetools: add new conflict marker format with diffs in
Summary:
Written by Martin von Zweigbergk at https://phab.mercurial-scm.org/D9551,
or https://www.mercurial-scm.org/repo/hg/rev/bdc2bf68f19e.
He suggested it and it's a useful feature. I did minor compatibility changes
(encoding, avoid rev numbers, foo_bar -> foobar).

Original commit message:

I use 3-way conflict markers. Often when I resolve them, I manually
compare one the base with one side and apply the differences to the
other side. That can be hard when the conflict marker is large. This
patch introduces a new type of conflict marker, which I'm hoping will
make it easier to resolve conflicts.

The new format uses `<<<<<<<` and `>>>>>>>` to open and close the
markers, just like our existing 2-way and 3-way conflict
markers. Instead of having 2 or 3 snapshots (left+right or
left+base+right), it has a sequence of diffs. A diff looks like this:

```
------- base
+++++++ left
 a
-b
+c
 d
```

A diff that adds one side ("diff from nothing") has a `=======` header
instead and does not have have `+` prefixed on its lines. A regular
3-way merge can be viewed as adding one side plus a diff between the
base and the other side. It thus has two ways of being represented,
depending on which side is being diffed:

```
<<<<<<<
======= left
contents
on
left
------- base
+++++++ right
 contents
 on
-left
+right
>>>>>>>
```
or
```
<<<<<<<
------- base
+++++++ left
 contents
 on
-right
+left
======= right
contents
on
right
>>>>>>>
```

I've made it so the new merge tool tries to pick a version that has
the most common lines (no difference in the example above).

I've called the new tool "mergediff" to stick to the convention of
starting with "merge" if the tool tries a regular 3-way merge.

The idea came from my pet VCS (placeholder name `jj`), which has
support for octopus merges and other ways of ending up with merges of
more than 3 versions. I wanted to be able to represent such conflicts
in the working copy and therefore thought of this format (although I
have not yet implemented it in my VCS). I then attended a meeting with
Larry McVoy, who said BitKeeper has an option (`bk smerge -g`) for
showing a similar format, which reminded me to actually attempt this
in Mercurial.

Reviewed By: DurhamG

Differential Revision: D26947920

fbshipit-source-id: 8b4446862897ff9a6dfdf5a2e35617d4db09e883
2021-03-10 17:29:18 -08:00
Jun Wu
33b28a117e smartlog: limit commits to show
Summary:
There are a report of slow smartlog that tries to show 8M nodes in `draft()`.
That is an issue after the automatic bookmark clean up, and the visible heads
incorrectly make large amount of commits draft.

Reviewed By: kulshrax

Differential Revision: D26934644

fbshipit-source-id: 0c0890f8eaf1422dab9c03159a419800ae7247ca
2021-03-10 15:24:39 -08:00
Jun Wu
a22c4883f3 context: make memctx.mirror copy mutinfo and loginfo
Summary: Those were previously ignored incorrectly.

Reviewed By: kulshrax

Differential Revision: D26957315

fbshipit-source-id: 5366460c1368ab9a83471d092bb860cc85fb64c3
2021-03-10 15:20:14 -08:00
Jun Wu
b1547cad1a bookmarks: clean up visibleheads if remotenames are removed
Summary:
Visible heads can overlap with scratch remote bookmarks, and in bad cases
(before D26792731 (7a759b6075)), overlap with public remotenames.

When we remove remotenames we need to remove referred nodes in visibleheads
too so we don't end up with massive draft commits.

Reviewed By: DurhamG

Differential Revision: D26954215

fbshipit-source-id: 91010e6608d0150ecf374ce31705e97712154b27
2021-03-10 11:55:53 -08:00
Jun Wu
3fdd766b65 bookmarks: clean up scratch remotenames
Summary:
Scratch remote bookmarks are considered draft() and were not cleaned up.
Practically there are users with 100+ scratch remote bookmarks. Let's
clean them up too.

Note the commit still remain visible, which will be fixed in upcoming
diffs.

Reviewed By: DurhamG

Differential Revision: D26954216

fbshipit-source-id: e84f99e4e914f0c5169583fc9f60084f23664e02
2021-03-10 11:55:53 -08:00
Jun Wu
cac01986ae debugreseteads: command to reset heads to a fresh state
Summary: This is intended to be used in Sandcastle / OnDemand use-cases to provide a cleaner state.

Reviewed By: DurhamG

Differential Revision: D26924711

fbshipit-source-id: a37d24a10c99d953e2af842f729ef634cbb2e2f9
2021-03-10 10:44:44 -08:00
Jun Wu
846050ea0f changelog: disable migrating backend for hgsql repos
Summary: hgsql can only use traditional revlog. Disable changelog migration for it.

Reviewed By: kulshrax

Differential Revision: D26891252

fbshipit-source-id: 36c5a448d4fcad15b3415e4534448a945f6d0b4b
2021-03-08 15:58:36 -08:00
Arun Kulshreshtha
c94dfbcc38 clidispatch: pass repo path to config contructor in from_raw_path
Summary: We weren't passing a repo path when initially loading the repo's config in `clidispatch`. This meant that the resulting `ConfigSet` didn't contain values from the shared-repo `.hgrc.dynamic`. Evidently, some other code path in Python would eventually add these values, but this meant that pure-Rust commands could not see config values set via dynamicconfig. Passing the path fixes the problem.

Reviewed By: DurhamG

Differential Revision: D26508980

fbshipit-source-id: 65f187d18098a08c81325e78cb02a8ed854c739a
2021-03-08 13:31:10 -08:00
Jun Wu
02ff6e200c remotenames: clean up bookmarks that are ancestors of master
Summary:
See the previous diff for motivation. This removes bookmarks that are
ancestor of master, too. This is important in practice.

Reviewed By: DurhamG

Differential Revision: D26889412

fbshipit-source-id: 255722ed5b486e88ef56e7e378fae3f1113d5fbe
2021-03-08 11:28:40 -08:00
Jun Wu
2e353eb4ce tests: add a test showing release bookmarks aren't automatically cleaned up
Summary:
The auto cleanup was conservative. It keeps `::draft()`. But that means
ancestors of public commits are not cleaned up. Not all release branches
branch off the master branch.

Reviewed By: DurhamG

Differential Revision: D26889413

fbshipit-source-id: c6a8e3f32cf1f7d2ffe74b7ecd183f4e583949bb
2021-03-08 11:28:40 -08:00
Jun Wu
4afd737525 hide: cleanup non-essential remote bookmarks automatically
Summary: Trigger the cleanup logic automatically if there are too many remote bookmarks.

Reviewed By: sfilipco

Differential Revision: D26802251

fbshipit-source-id: 1ab40c7be98c507865ea17001dc9775b6edf4446
2021-03-03 18:30:08 -08:00
Jun Wu
01035df3a4 hide: make --cleanup remove non-essential remote bookmarks
Summary: This is handy to make the `sl` output cleaner.

Reviewed By: sfilipco

Differential Revision: D26802250

fbshipit-source-id: 1b74f3d9a42ab6b0780f07bec59b03a5cd0ea6a9
2021-03-03 18:30:08 -08:00
Jun Wu
e33255b67d remotenames: add a command to clean up remote bookmarks
Summary: Add API and command to remove non-essential remote bookmarks

Reviewed By: sfilipco

Differential Revision: D26802252

fbshipit-source-id: bf715905f146f31aac19dccb90022bea31392323
2021-03-03 18:30:07 -08:00
Jun Wu
4abfeb66e8 remotenames: raise if key bookmarks point to unknown commits
Summary:
Previously remotenames pointing to unknown commits are just ignored.
If key remotename like master is ignored, it can cause very slow operations
in pull, etc. Let's just raise an exception in this case.

Reviewed By: DurhamG

Differential Revision: D26800236

fbshipit-source-id: 13be4af5499da1b9098b4ff1a6ef41c54092824a
2021-03-03 18:20:05 -08:00
Jun Wu
7a759b6075 visibility: remove public heads
Summary:
Remove public heads when using Rust changelog backends. This should address
some issues seen in commit cloud sync.

This is done at the metalog commit time so we get the latest "remotenames" data for
accurate "public()" set calculation.

Reviewed By: singhsrb

Differential Revision: D26792731

fbshipit-source-id: 00b894fee9804740d664dad0ac47be564820da33
2021-03-03 18:06:08 -08:00
Jun Wu
7f2e472696 dirsync: add a test about in-memory rebase
Summary: Now dirsync works with IMM rebase. Add a test for it.

Reviewed By: DurhamG

Differential Revision: D26726478

fbshipit-source-id: 6712538d7e903ddb0e3c3df44f7dde638276e99d
2021-03-02 18:12:35 -08:00
Jun Wu
82b71b144c dirsync: add a test about absorb
Summary: Now dirsync works with absorb. Add a test for it.

Reviewed By: DurhamG

Differential Revision: D26726477

fbshipit-source-id: 4505ad6c1e1fd03bfb2cf12b46bd07c98f2bcc2b
2021-03-02 18:12:35 -08:00
Jun Wu
5ceeb5311d dirsync: improve in-memory commit compatibility
Summary:
Previously, dirsync wraps `repo.commit`, requires an on-disk working copy,
and dirstate to work properly. This diff updates dirsync to wrap
`repo.commitctx` instead, do commit edits purely in memory, then sync the
commit back to disk. It makes dirsync compatible with absorb and in-memory
rebase (and potentially other things like drawdag, if drawdag's context APIs
are improved).

To sync the changes made in-memory back to the filesystem, a dirstate callback
is added to write back mirrored files from commit to disk. This works for both
amend and absorb so the special wrapper about amend is dropped. It is
also optimal for absorb, because it only writes the mirrored files once for
the "final" commit, instead of writing the files for each commit in the stack.

Some `O(N^2)`s (N: len(status)) complexities were avoided:
- `applytomirrors` was called N times.
- `allchanges = set(status.modified + status.removed + status.added)` in
  `applytomirrors` was O(N).
- `sourcepath in status.removed` in `applytomirrors` was O(N).
- `mirrorpath in status.removed` in `applytomirrors` was O(N).

Note there is still a suboptimal complexity of `getmirrors` called per changed
path, `O(N*M)` (N: len(status), M: len(dirsync_conig)). That will be addressed
in a later diff.

Reviewed By: DurhamG

Differential Revision: D26726479

fbshipit-source-id: 482c6c830ab65cc0d9cd569a51ec610a1dac49cc
2021-03-02 18:12:34 -08:00
Durham Goode
752c5ccff5 tests: remove test environment when running system hg
Summary:
dynamicconfig has logic to avoid loading remote configs during tests,
by checking the TESTTMP variable. Unfortunately, the tests currently run system
hg with that environment set, which causes it to generate incorrect
configuration for the real repository (i.e. fbsource).

Let's get rid of all test specific environment variables when running the system
hg. There's a comment in the code saying this breaks some tests (from 2017
03a31be593db), but as far as I can see they still work.

Reviewed By: quark-zju

Differential Revision: D26758364

fbshipit-source-id: 945cbd36f7eccc98149772a42421cbc51b157c5b
2021-03-02 12:53:57 -08:00
Durham Goode
6451219968 tests: fix test-doctor.t on OSX
Summary:
The new test case failed on Mac because it didn't want to copy over a
symlink or something. Didn't dig too deep because 'rm -rf' works around it.

Reviewed By: sfilipco

Differential Revision: D26758985

fbshipit-source-id: 22ad7e23813bd6bfe86b91535d46c21ee59dfcd1
2021-03-02 11:47:30 -08:00
Durham Goode
2fc16ce279 tests: fix test-unicode-inputs-t.py on Windows
Summary: This was broken by D26702166 (373d9ade0a).

Reviewed By: sfilipco

Differential Revision: D26736392

fbshipit-source-id: 8bae1599922c05193eba529d7f74c585f20d6f91
2021-03-01 22:23:14 -08:00
Andrey Chursin
c8871fd796 checkout: support sparse profile update in python binding
Summary:
This diff integrates CheckoutPlan::with_sparse_profile_change into python code
It also updates test-update-over-sparse-profile-change.t to use native checkout, as this test now passes

Reviewed By: DurhamG

Differential Revision: D26670414

fbshipit-source-id: 73011217b4a0d80ef643b778cdaf75bbada5dcf2
2021-03-01 20:25:17 -08:00
Andrey Chursin
340f8b70f0 checkout: support fixed sparse profile
Summary:
This diff introduces support for fixed sparse profile into native checkout.
Sparse profile change is not yet supported.
This also updates test-sparse.t to use native checkout

Reviewed By: DurhamG

Differential Revision: D26648490

fbshipit-source-id: 516308dba096189e4657715214ad2a5b61816c49
2021-03-01 20:25:17 -08:00
Jun Wu
bb8212e827 tests: fix test-import-merge.t
Summary:
With Rust IO, `hg` is more willing to report "broken pipe" issues:

       $ hg export 'desc(2)' | head -7 > ../a.patch
    +  abort: The pipe is being closed. (os error 232)
       $ hg export tip > out

Fix the test by using a temporary file.

Reviewed By: sfilipco

Differential Revision: D26730868

fbshipit-source-id: 8446528cad72713329b173eaa10ee109e8dfa956
2021-03-01 11:49:57 -08:00
Andrey Chursin
88712f0cd5 tests: switch test-update-{reverse, issue1456}.t to use native checkout
Summary: Switching couple more .t tests to use native checkout

Reviewed By: quark-zju

Differential Revision: D26621668

fbshipit-source-id: 029513fb3b1807e55e1d17769edd6beea5c3db41
2021-03-01 10:41:07 -08:00
Jun Wu
deafa7e539 doctor: fix master pointing to unknown commit
Summary: This should fix issues where master points to an unknown commit somehow.

Reviewed By: DurhamG

Differential Revision: D26648623

fbshipit-source-id: 63f7a4b834bf19a7849a1c3771921e6b1e5919d3
2021-02-26 18:05:08 -08:00
Durham Goode
373d9ade0a py3: fix hg status with unicode characters in OSX
Summary:
hg status was throwing an error on Py3 OSX because a fallback path
returned bytes instead of string. This fixes that.

Reviewed By: sfilipco, singhsrb

Differential Revision: D26702166

fbshipit-source-id: fa32e5b312377a899b6af16f40bca051f44ed6c3
2021-02-26 16:31:45 -08:00
generatedunixname89002005287564
cb2cc4ddb1 Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D26686094

fbshipit-source-id: e382675ff1c32f63467d464bce28f54024af35b9
2021-02-26 03:57:20 -08:00
Durham Goode
5ad8e5d836 py3: fix Windows tests
Summary:
Windows tests were failing to execute hg clone ssh://user@dummy/... lines because setconfig ui.ssh=C:/foo/bar was being translated to ui.ssh=c;c:\\foo\\bar by mingw, since it detected /foo/bar as a unix-style path. This seems to be caused by this one line reversing the slashes. I'm not sure why it exists, but deleting it makes the tests pass.

My guess is this has been broken for about a year.

Reviewed By: quark-zju

Differential Revision: D26639206

fbshipit-source-id: d89cae1ea3dd055b90ec6ee8f7cdbee2ae08b228
2021-02-25 09:59:55 -08:00
generatedunixname89002005287564
dafcfcd0bf Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D26660579

fbshipit-source-id: 2a6f2ff37e6509a59f4927ad5dfa2a84f3d4dc15
2021-02-25 04:29:50 -08:00
Mark Juggurnauth-Thomas
03301d0d96 templates: add case expressions
Summary:
Add case expressions to the templating language that allow selection of a value based on
a single determinator.  The expression `case(expr, case1, then1, case2, then2, else)`
will expand to `then1` if `expr` matches `case1`, etc.  If it matches none of the cases
then it expands to `else`.

This can be used to simplify long `ifeq` chains in templates.

Reviewed By: quark-zju

Differential Revision: D26631539

fbshipit-source-id: 7543e6f7baa5599c96cac75da17db73e03b918f9
2021-02-25 02:56:17 -08:00
Stanislau Hlebik
ed2669e33f phrevset: allow specifying multiple callsigns
Reviewed By: DurhamG

Differential Revision: D26604669

fbshipit-source-id: 1bd0fa2b4715fd2de19658265ebf8a4bd960b21a
2021-02-24 00:46:01 -08:00
Jun Wu
62ba7447f6 ui: switch to Rust IO for default fout, ferr
Summary:
The Rust IO handles progress and streampager stuff. Switch to it so we don't
need to changing the `fout`, `ferr` when handling streampager in Python.

The chgserver logic is updated to just set raw fd 0, 1, 2 to update stdio,
since `fileno` is no longer exposed from Rust.

Manually tested the following commands, both without chg and with chg:
- lhg log -r . (no pager)
- lhg log (with streampager)
- lhg log --config pager.pager=less (with less pager)
- lhg commit (spawns pager)
- lhg debugprogress -s 100 --sleep 100 --with-output --pager=off (progress in stderr)
- lhg debugprogress -s 100 --sleep 100 --with-output --pager=on --config pager.interface=fullscreen (progress in streampager)
- lhg debugprogress -s 100 --sleep 100 --with-output --pager=on --config pager.pager='LESS= less' (progress is disabled with external pager)

Reviewed By: sfilipco

Differential Revision: D26612487

fbshipit-source-id: 8b4e36b614a0c080b93e41474f9a8fc33f890083
2021-02-23 22:33:48 -08:00
Jun Wu
a6e3b948c9 chgserver: replace the raw stdio fds (0, 1, 2) directly
Summary:
Previously those fds were obtained via `fp.fileno()`. We're going to replace
the `fp` with something backed by Rust that does not have `fileno()`. Update
chg to replace the raw fds (0, 1, 2) directly. This is enough to affect both
Python and Rust's stdio so there is no need to replace `ui.fout`, `ui.ferr`
again.

Reviewed By: sfilipco

Differential Revision: D26612484

fbshipit-source-id: 5cd89e5955a1dcaad3d3132730354ee67c016bf0
2021-02-23 22:33:48 -08:00
Genevieve Helsel
f2d6906665 fix dictionary changed size during iteration in run_tests.py
Summary:
We shouldn't delete from a dictionary while iterating over it, instead we should iterate over a copy and then delete from the original.
`.keys()` returns a view of the dict, while wrapping it in `list` makes a deep copy.

Reviewed By: StanislavGlebik

Differential Revision: D26618782

fbshipit-source-id: 234503aab0a0a2151ae0818282651b547f414016
2021-02-23 16:55:07 -08:00
Mark Juggurnauth-Thomas
0ef99947cc color: add combined effects in fallback chains
Summary:
Allow color effects to be joined with `+`, e.g. `blue+bold`.  Unlike effects
separated by spaces, these effects must all be available in order for the
effect to apply.  If any of the effects are not available, then the combined
effect is not valid.

This is useful in fallback chains, where some of the fallbacks are combined
effects, for example: `brightred:red+bold`.

Use these to improve the fallback chains for sparse profiles, so that the
profile names are not shown in black on 8 color terminals.

Reviewed By: quark-zju

Differential Revision: D26580365

fbshipit-source-id: 8e204c901566ac03fb4af066ab1a09142750a9fb
2021-02-23 04:47:01 -08:00
Johan Schuijt-Li
2c0b490179 fix tests
Summary: D26543635 (1536917be2) changed the output for some tests, update accordingly

Reviewed By: singhsrb

Differential Revision: D26580674

fbshipit-source-id: dc8062cf614268a71440f6e2fe3556339d168601
2021-02-22 14:16:14 -08:00
Liubov Dmitrieva
1ed10dd9c6 cleanup code
Summary: This code has been used to transfer an existing repo to remotenames. After D26460435 (84280e36c3) it doesn't work as designed and should be removed as well.

Reviewed By: quark-zju

Differential Revision: D26544739

fbshipit-source-id: 34c08d4b9997c0b1f298ee1ecd0e8af24f4d8a39
2021-02-22 06:15:48 -08:00
Liubov Dmitrieva
b2f442982b hide: support for scratch remote bookmarks
Summary:
Support for unsubscribing from a scratch remote bookmarks in `hg hide` command.

This is support if you hide via a revision. Hiding by its name will be another change.

Reviewed By: quark-zju

Differential Revision: D26544305

fbshipit-source-id: d10372513dda88903e2cc031ff16883a001c8e34
2021-02-22 06:15:47 -08:00
Mark Juggurnauth-Thomas
2b8d5ab75d undo: expand heuristics for uncommit/unamend hint
Summary:
The `commit` or `amend` command might not have been the first item in the
command list (e.g. there could have been a custom config option).  Expand the
heuristics for detecting the `commit` and `amend` cases to account for this.

Reviewed By: quark-zju

Differential Revision: D26545339

fbshipit-source-id: a5b1fc8ccc87989e742fce1fa79273266892ed79
2021-02-22 02:46:53 -08:00
Andrey Chursin
987e6426fc checkout: print removed cwd warning in nativecheckout
Summary:
This warning was printed by old checkout, keeping it in nativecheckout too
The warning tells user that current working directory was removed during checkout

This diff also makes test-update-names.t to use nativecheckout. Otherwise last test fails on remote repo, because pyworker does not emit the deleted cwd warning

Reviewed By: quark-zju

Differential Revision: D26558188

fbshipit-source-id: 1f6ea2ea1ac7358ce2f06fed25069656481b30e6
2021-02-20 01:29:11 -08:00
Andrey Chursin
d8e40c89a0 tests: test-update-names.t to use remoterepo
Summary: After this update, test-update-names.t tests are using native checkout when congfig is set

Reviewed By: quark-zju

Differential Revision: D26558186

fbshipit-source-id: f70f65344b5f2209f313e3edd5fd7f541318459a
2021-02-20 01:29:10 -08:00
Andrey Chursin
78f7bab434 tests: add newremoterepoto tinit.sh
Summary: Those shortcuts can be used to setup remote repo via single line

Reviewed By: quark-zju

Differential Revision: D26558187

fbshipit-source-id: c6fd48ed38cc4dbaad4db714c4dfd76ec26bf608
2021-02-20 01:29:10 -08:00
Liubov Dmitrieva
84280e36c3 remove accessed bookmarks feature
Summary:
Remove selectivepullaccessedbookmarks feature because it contains bugs and causes many undesired issues.

This was added to migrate existing repos to selective pull and is not needed anymore.

Main effects are:

* if you enable selectivepull for an existing repo, it won't reduce number of subscribed bookmarks.
* some operations like `hg push` or `hg pull -r` in their underlying implementation update all subscribed bookmarks, not just accessed like before.
This drives changes to the tests. Reminder, the bookmark has been marked as "accessed" if the repo has been ever updated to that bookmark.

All tests fixed accordingly.

Reviewed By: markbt

Differential Revision: D26460435

fbshipit-source-id: f839b9f207bfc478a0336ec807b720d35a0bb12e
2021-02-18 04:02:06 -08:00
Durham Goode
4b2ec1b3cc tests: fix test on osx
Summary:
Sort works differently on OSX. Let's set the locale in this case to get
consistent sorting across platforms.

Reviewed By: quark-zju

Differential Revision: D26438678

fbshipit-source-id: 80a5c758795fd9675b8b2b658521c0e9d6807366
2021-02-16 10:09:04 -08:00
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