Commit Graph

20432 Commits

Author SHA1 Message Date
Jun Wu
453b043043 revlog: do not use delta for lfs revisions
Summary:
This is similar to what we have done for changegroups, but for non-changegroup
(addrawrevision) case. This is needed to make sure the delta application code
path can assume deltas are always against vanilla (non-LFS) rawtext so the next
fix becomes possible.

Reviewed By: DurhamG

Differential Revision: D6906202

fbshipit-source-id: a7d62dfed4206d45b42299f1dabf013620ae52b3
2018-04-13 21:51:05 -07:00
Jun Wu
07042a2157 changegroup: do not delta lfs revisions
Summary:
There is no way to distinguish whether a delta base is LFS or non-LFS.

If the delta is against LFS rawtext, and the client trying to apply it has the
base revision stored as fulltext, the delta (aka. bundle) will fail to apply.

This patch forbids using delta on LFS revisions.

Note: this does not solve the problem entirely. Since the problem could also be
a client with base file revision being LFS tries to apply a non-LFS delta
(bundle).

Reviewed By: DurhamG

Differential Revision: D6878326

fbshipit-source-id: 9c3951e4673b8de61aae73a51e1bfff422f38d0f
2018-04-13 21:51:05 -07:00
Jun Wu
381158f7df test-lfs-bundle: new test testing lfs bundle exchanging behavior
Summary: This test covers bundle application between repos.

Reviewed By: DurhamG

Differential Revision: D6906245

fbshipit-source-id: 827b49eec49f1ffaac6363e38783705d0c399c45
2018-04-13 21:51:05 -07:00
Jun Wu
6529990478 debugfilerevision: add a new debug command
Summary:
This is similar to `debugdata`, but instead of taking a file revision (or
file node in remotefilelog's case), it takes a revset.

This is more useful practically, since the user would know commit hashes
easily but file nodes are hidden from the UI.

This is intended to make it easier to investigate LFS contents.

Reviewed By: DurhamG, ryanmce

Differential Revision: D6891770

fbshipit-source-id: 415da9b773c30830a48c09eda9f1854c416e3222
2018-04-13 21:51:05 -07:00
Jordi Llull Chavarria
cd33b0b3af Preserve order of revisions after hg pullbackup
Summary:
This diff fixes hg pullbackup so it retrieves commits in the same order that there were pushed. This was caused by commits being stored in sets and dictionare which are by unorered types. These have been replaced by OrderedDict to mantain the order.

**Description of the task:**
Infinitepush is a mercurial extension that allows sharing commits easily. Among other things it also backs up all local commites that were made on devservers and laptops. That means that we always have up-to-date backup You can read more about it here - https://our.intern.facebook.com/intern/dex/mercurial-workflow/infinitepush/ .

Backup is triggered whenever mercurial transaction is triggered i.e. during commit, rebase or any other operation that changes mercurial repo. `hg pullbackup` is the way to pull backed up commits.

There is a problem. Let's say host A has this repo:

` o`
` |`
` o  C1`
` |  /`
` |   C2`
` |  /`
` o`

So we have two draft commits: C1 and C2. C2 is probably an older commit. But if we restore it on another host we can get another output:

` o`
` |`
` o  C2`
` |  /`
` |   C1`
` |  /`
` o `

This happens because `hg sl` orders commits by it's revision number in revlog - https://www.mercurial-scm.org/wiki/Revlog .

The point of the task is to make sure commits are ordered by their creation date.

Link to comment: http://www.facebook.com/groups/scm/permalink/1504906422892306/?comment_id=1505017576214524&reply_comment_id=1506426179406997

Reviewed By: StanislavGlebik

Differential Revision: D6884670

fbshipit-source-id: 3281dbc1e25e24662a4b6ba78b96b85d5bae78c9
2018-04-13 21:51:05 -07:00
Jun Wu
2090a611ca config: change default debugger to ipdb
Summary: ipdb/ipython is more friendly than the default.

Reviewed By: phillco

Differential Revision: D6767252

fbshipit-source-id: 50028a9681965c868f2bcd5a025debe0f1130dbc
2018-04-13 21:51:04 -07:00
Phil Cohen
0584f5d23f hg: fastverify: unify and fold into core
Summary: `fastverifier` was sometimes being overriden by `shallowverifier` when remotefilelog was enabled. Since the latter is a subset of the former, let's just fold both into the core verifier code backed by a config, `verify.skipmanifests`, that we can default to true.

Reviewed By: DurhamG

Differential Revision: D6882222

fbshipit-source-id: 9f337ca031a070425ccdc9ee02f6765e68436da9
2018-04-13 21:51:03 -07:00
Jun Wu
5678d60890 buck: add mercurial.interpreter emulating python interpreter
Summary:
A lot of tests rely on `python` interpreter being able to do
things like `import mercurial`. This becomes tricker if hg is
built as a single binary by buck.

Therefore also add a interpreter target that can be used as
a drop-in replacement of `python` in tests.

Reviewed By: DurhamG

Differential Revision: D6879868

fbshipit-source-id: 2b1d2b6306e74ceff86750d1f86387b9fa493f9a
2018-04-13 21:51:02 -07:00
Jun Wu
f623fe9d3c main: add mercurial.main as an entry point
Summary:
The old mercurial.dispatch entry point works, except it breaks
extensions wrapping `dispatch.*` (ex. `dispatch.runcommand`).

That is because things happen in this order:
- Buck's python wrapper imports `mercurial.dispatch` as mod1.
- hgdemandimport is enabled.
- An extension imports `mercurial.dispatch` and it got mod2.
- mod2 != mod1. So any changes to mod2 won't be used.

Using a separate module (`mercurial.main`) as the entry point
solves the problem.

Reviewed By: DurhamG

Differential Revision: D6879873

fbshipit-source-id: 9779edac64bbeb53dd98dfab1b21575c3a60af01
2018-04-13 21:51:02 -07:00
Jun Wu
d0f9b4315d hgsubversion: move its help text to mercurial/help
Summary:
So the use of `os.path.dirname(__file__)` which won't work in buck
python binary can be removed.

Reviewed By: DurhamG

Differential Revision: D6881306

fbshipit-source-id: b6504beaf07fe9853abff08b9721a17b31ac7515
2018-04-13 21:51:02 -07:00
Jun Wu
52139b2825 util: set datapath dynamically using HGDATAPATH
Summary:
This allows `HGDATAPATH` to override where to look for data files
like builtin configs, templates, help texts.

It'll be useful for running tests with a packed hg binary.

Reviewed By: DurhamG

Differential Revision: D6879865

fbshipit-source-id: 4638a9eff62a5fab088215cbeb72740bb67cac04
2018-04-13 21:51:02 -07:00
Jun Wu
32aac9256d lazymanifest: do not read uninitialized memory
Summary:
Backported from https://phab.mercurial-scm.org/D1948.
Discovered by clang UBSAN.

Reviewed By: DurhamG, phillco

Differential Revision: D6879871

fbshipit-source-id: c068bdcf5b250c6586515960ef7ed9d0af3a2c59
2018-04-13 21:51:01 -07:00
Kostia Balytskyi
84129009ee hg: log time spent waiting for the pager
Summary:
Let's collect how long we wait for a pager so that we can later subtract it
from the elapsed time.
Currently, it's impossible to compute `elapsed - pager - editor - stdio`, which
would include startup time.

Reviewed By: quark-zju

Differential Revision: D6875447

fbshipit-source-id: d055e4ba5bf1ab7ee9e567c99b6708321ab7705b
2018-04-13 21:51:01 -07:00
Liubov Dmitrieva
b5b151319c backout: use only first line of commit message for backout default message
Summary: backout: use only first line of original commit message (title) for backout default message.

Reviewed By: phillco

Differential Revision: D6846109

fbshipit-source-id: 68efbff9db698599a12cef45de7ab4af96cf184f
2018-04-13 21:51:00 -07:00
Durham Goode
0e21c4e1ab hg: fix treeonly prepushrebase python hooks for treeonly pushes
Summary:
When pushing a treeonly commit to a tree+flat hybrid server, the server
needs to execute the hooks in treeonly mode so we never try to access the flat
manifests. Previously we did this for shell hooks by setting some environment
variables, but we didn't do it for python hooks that ran in process.

This diff makes the python hooks run against a bundle repo that is instantiated
in treeonly mode. No changes to any hooks are required, as the repo object they
are given is already in the correct mode.

Reviewed By: quark-zju

Differential Revision: D6840971

fbshipit-source-id: 9fcb97d972076911b35bccf3f79b60972bcafc33
2018-04-13 21:51:00 -07:00
Jun Wu
96a9afa2a5 drawdag: inline drawdag
Summary:
Since we have `debugbuilddag` as a builtin command, and `drawdag` is
pretty useful for writing clean test cases. Let's inline it. This would
simplify many tests since `drawdag=..." is no longer needed.

Reviewed By: DurhamG

Differential Revision: D6827925

fbshipit-source-id: b749f57fd5c55b2cb000dd2da2c2f9bc2386a519
2018-04-13 21:50:59 -07:00
Durham Goode
1f577c8417 hg: remove version check from crecord
Summary:
crecord locked out the amend functionality to older versions of
Mercurial. Since it's packaged in core now, let's always enable it.

Reviewed By: quark-zju

Differential Revision: D6837724

fbshipit-source-id: 2a0dae2e03346734f7d8298e5a073f776849005e
2018-04-13 21:50:59 -07:00
Durham Goode
210bd25b94 hg: fix check code errors
Summary: These snuck in.

Reviewed By: phillco

Differential Revision: D6821043

fbshipit-source-id: bd4d83e2460bebdb2061dfbf84bed0139d1b72e1
2018-04-13 21:50:58 -07:00
Liubov Dmitrieva
68ac2c6418 Improve backout default message
Summary: [backout] Improve backout default message

Reviewed By: phillco

Differential Revision: D6818834

fbshipit-source-id: 3dc2465f64e37ff4bc96eff512ae991cf2a2f96d
2018-04-13 21:50:58 -07:00
Simon Farnsworth
30e993a160 template: add functions to truncate blocks and lines
Summary:
smartlog, among other places, would benefit from being able to
strictly limit the size of text output to the terminal. Provide two functions:
one truncates long lines in a filled block, the other limits the number of
lines of output. Both can optionally add a truncation marker.

Reviewed By: markbt

Differential Revision: D6819153

fbshipit-source-id: d95b654f4a6fef49ad4840f26ef74a18c370bdd8
2018-04-13 21:50:58 -07:00
Mark Thomas
4b7dab149a hg: improve perf interactions with treedirstate
Summary:
There are a couple of ways that dirstate and fsmonitor interact with
treedirstate that are sub-optimal.

When iterating over all files in the dirstate map, use the iterator of keys
(`__iter__` rather than `iteritems`) to hit the treedirstate fastpath that
doesn't build the dirstate tuples.

Use `__getitem__` and catch the `KeyError` rather than `__contains__` followed
by `__getitem__`, as the latter involves two look-ups in the tree.

Skip the indirect call to `hastrackedfile` and `hasremovedfile` as these add
noticable overhead when called many times.

Also fix up the `test-check-code` failure for treedirstate.

Reviewed By: ryanmce

Differential Revision: D6818952

fbshipit-source-id: d49907c282a1b97c66a3d24257bdf54800d7da70
2018-04-13 21:50:58 -07:00
Jun Wu
d942f5a88e hg: basic support for building hg using buck
Summary:
Adds some basic building blocks to build hg using buck.

Header files are cleaned up, so they are relative to the project root.

Some minor changes to C code are made to remove clang build
warnings.

Rust dependencies, fb-hgext C/Python dependencies (ex. cstore,
mysql-connector), and 3rd-party dependencies like python-lz4
are not built yet. But the built hg binary should be able to run
most tests just fine.

Reviewed By: wez

Differential Revision: D6814686

fbshipit-source-id: 59eefd5a3ad86db2ad1c821ed824c9f1878c93e4
2018-04-13 21:50:58 -07:00
Durham Goode
3b2cabfe55 hg: fix extensions-default
Summary:
Suggesting disabled extensions uses extensions.loadpath, which is no
longer supported for core extensions. Since this test is just testing that the
extension can be disabled, let's not worry about the exact output.

Reviewed By: phillco

Differential Revision: D6802719

fbshipit-source-id: 2a602e086f4809676ef8dd36ffc30f021b3186fc
2018-04-13 21:50:57 -07:00
Durham Goode
16270db464 hg: fix check execute
Summary:
check-execute was failing because the filesets are too slow (about 45+s
each). This fixes the performance by optimizing some internal fileset logic, and
by fixing a fileset to be scoped to the current working directory instead of the
whole repo.

Unfortunately the fileset implementation optimization needs to be deployed
before the test can benefit from it (since the test runs the system hg), so we
need to leave the test disabled until the fix rolls out.

Reviewed By: quark-zju

Differential Revision: D6802078

fbshipit-source-id: 26767c989e15b6d0ae5f5d9560309dafa5c380ff
2018-04-13 21:50:57 -07:00
Phil Cohen
45c4a072f9 hgext: use relative imports wherever possible
Summary:
Port of D6798134 to fbsource. It eliminates module-import failures as well as errors like this:

```
mercurial.error.ForeignImportError: hgext.extlib.treedirstate: /home/phillco/.local/lib/python2.7/site-packages/hgext/extlib/treedirstate.so lives outside /..../hg
```

....that block other tests, like test-help.t

(Note: this ignores all push blocking failures!)

Reviewed By: quark-zju

Differential Revision: D6799259

fbshipit-source-id: b77d1b565dbf52165e0847002be498648658e064
2018-04-13 21:50:56 -07:00
Phil Cohen
265c2610c7 simplecache: enable by default
Summary: Default-on this moderately hard extension.

Reviewed By: DurhamG, quark-zju

Differential Revision: D6792641

fbshipit-source-id: 475135f4f4f295a4e6356443405bd6eb185c310a
2018-04-13 21:50:55 -07:00
Phil Cohen
5cae81a643 extensions: default-on conflictinfo, errorredirect, ...
Summary: ...mergedriver, and progressfile.

Reviewed By: quark-zju, singhsrb

Differential Revision: D6765952

fbshipit-source-id: 8eddcdeffa5d6532f737f45f7e1071c1a563a3cd
2018-04-13 21:50:54 -07:00
Durham Goode
3666ccd6b2 clindex: disable by default for now
fbshipit-source-id: b1af6f49eebfbada4bf9637ea4935c618b0e7bb6
2018-04-13 21:50:53 -07:00
Phil Cohen
0900d9a168 extensions: add --excludedefault to hg debugextensions
Summary: Otherwise this test will fill up with default-on tests that will be a pain to filter manually. Plus it's a sensible flag to have.

Differential Revision: D6760553

fbshipit-source-id: 083cb2d8a7cffe28eef812edad2f4c5d997db981
2018-04-13 21:50:53 -07:00
Phil Cohen
02d588a3bc extensions: fix reposetup() not getting called for DEFAULT_EXTENSIONS
Summary:
`_peerorrepo` calls `extensions.extensions()` to figure out on which modules to run reposetup. This uses a slightly
different code path than that patched by D6716674 and double-checks if an extension is enabled. So we need to patch here too.

Reviewed By: quark-zju

Differential Revision: D6758486

fbshipit-source-id: b5bfe2d11e5e2aeb2d3a0ee7c9d6e3e2c213233d
2018-04-13 21:50:53 -07:00
Phil Cohen
c7ff97160f share: fix hg unshare
Summary:
This was blocking us default-enabling `fbsparse`; however, this function is actually incredibly fragile and can break with a variety of extensions enabled (even blackbox).

E.g., try this on the latest release and you'll get an exception!

```
cd $(mktemp -d); hg init a; hg share a b; cd b; hg unshare
```

That particular breakage is called by blackbox trying to look at `repo[None]` to do some logging, but anything that tries to read `repo.dirstate` after this will print the exception. The root cause is this line which is trying to override `repo.root`:

```
repo.unfiltered().__init__(repo.baseui, repo.root)
```

It's trying to update the repo's path to indicate that it is independent and no longer shared. But, the initializer isn't really designed to be called twice, AFAICT, and doing so here leaves the property caches out of sync with properties of the repo (namely `_filecache`).

Durham's suggestion was just to nuke `hg unshare`. This patch works around it for now, though, in case we want to keep it alive.

Reviewed By: quark-zju

Differential Revision: D6758397

fbshipit-source-id: 90d3773d9340f2a5b2e6e900a2194d8b931f410d
2018-04-13 21:50:53 -07:00
Phil Cohen
c71baa2944 debugextensions: list default-on extensions as '(default)'
Summary:
...instead of '(untested!)'.

Partly this is necessitated by the `hg debugextensions` call in test-extension.t (post
D6758486). But it also seems like the right thing to do.

Reviewed By: ryanmce

Differential Revision: D6758599

fbshipit-source-id: 3ecfa52b0c9c1a028201d2eda0eaa706d80225c0
2018-04-13 21:50:53 -07:00
Jun Wu
97dfe79221 perftweaks: fold isgooddelta tweak into core
Summary:
The isgooddelta tweak was introduced in D2693043 (perftweaks: change revlog
delta heuristic, 2015-11-24).  Comparing with the existing version, the only
change is that we removed `dist > maxdist` check.

Note that the upstream commit 895ecec31 (revlog: add an experimental option
to mitigated delta issues (issue5480), 2017-06-23) also introduces a config
option to override `maxdist` to make the condition fail, which basically does
a same thing.

Instead of introducing new config options or adding more "if"s to the
codebase to make it more obscure, let's just simplify it by disabling the
check entirely, and removing the `dist` concept, removing two config
options: `experimental.maxdeltachainspan` and `perftweaks.preferdeltas`.

The `chainlen > self._maxchainlen` check should be enough for keeping
delta chain length bounded.

Reviewed By: DurhamG

Differential Revision: D6752529

fbshipit-source-id: e8fd8ec39240191db5fb274190fc661e97087a78
2018-04-13 21:50:53 -07:00
Jun Wu
07522dbb4e clindex: enable by default
Summary:
This enables clindex for its nodemap. Verification is turned off by default
for the performance win since we have been running verification in
production for a while.

Reviewed By: phillco

Differential Revision: D6751412

fbshipit-source-id: bc3e87df86e86a758392bdd4aef3e282f397fe04
2018-04-13 21:50:52 -07:00
Jun Wu
7fa918cefd perftweaks: move commit head detection removal logic to core
Summary: Also change the internal API so it no longer accepts the "heads" argument.

Reviewed By: ryanmce

Differential Revision: D6745865

fbshipit-source-id: 368742be49b192f7630421003552d0a10eb0b76d
2018-04-13 21:50:52 -07:00
Jun Wu
fe0a348d39 perftweaks: move effectflag removal logic to core
Summary: This removes the effectflag logic from both core and perftweaks.

Reviewed By: ryanmce

Differential Revision: D6745769

fbshipit-source-id: 55ed1676e7117bca358471c256805ded7bc83f3c
2018-04-13 21:50:52 -07:00
Jun Wu
9e139f9716 log: optimize "log -f FILE"
Summary:
Previously it's `:. & follow(FILE)` and there is a Python loop iterating
`:.`. This patch makes it `follow(FILE) & :.`.

In the common case, `_logrevs` returns a large revset in desc order. So it
makes sense to put it at the right side of `&` operator. The only exception is
when `_logrevs` uses user-specified revset (`-r`), whose order needs to be
respected and size is unknown.

Test Plan:
Ran all tests.

Facebook:
This reduces `hg log FILE` from ~3 seconds to ~0.5 seconds.

```
# Before
% time hg log cmd_util.py --pager=off --config extensions.fastlog=! -T'{oneline}\n'
11e9d4 D5997870 mbolin Use --home-dir to compute the config dir, if specified.  2017-10-06
5041e2 D4888633 simpkins [eden] move eden/fs/cli to eden/cli  2017-04-14
7dc2bd D4760528 simpkins [eden] an "eden debug" CLI command and thrift APIs to support it  2017-04-03
hg log cmd_util.py --pager=off --config extensions.fastlog=! -T='{oneline}\n'  2.88s user 0.09s system 99% cpu 2.975 total

# After
% time hg log cmd_util.py --pager=off --config extensions.fastlog=! -T'{oneline}\n'
7dc2bd D4760528 simpkins [eden] an "eden debug" CLI command and thrift APIs to support it  2017-04-03
5041e2 D4888633 simpkins [eden] move eden/fs/cli to eden/cli  2017-04-14
11e9d4 D5997870 mbolin Use --home-dir to compute the config dir, if specified.  2017-10-06
hg log cmd_util.py --pager=off --config extensions.fastlog=! -T='{oneline}\n'  0.42s user 0.03s system 98% cpu 0.456 total
```

Fastlog is disabled since a network request makes the time less stable.
Logging a single file is answered locally by remotefilelog ancestor handling.

Reviewers: durham, #mercurial

Reviewed By: durham

Subscribers: durham

Differential Revision: https://phabricator.intern.facebook.com/D6735007

Signature: 6735007:1516163080:0d7ddae9f24933d795ba7aaa4461916c7fdd2309
2018-01-16 18:37:49 -08:00
Jun Wu
19cda85a3a debugshell: enable it by default
Summary:
It's pretty handy. The implementation is simple and clean. So move it from
contrib and enable it by default. "import"s are adjusted to make the module
checker happy.

Security and UX wise, since we have `--debugger` already, adding another
REPL seems fine.

Test Plan: Ran all tests

Reviewers: phillco, #mercurial

Reviewed By: phillco

Differential Revision: https://phabricator.intern.facebook.com/D6741283

Signature: 6741283:1516225662:ddc19a663e7ecef2a1fdaa5041f308dc838a8471
2018-01-17 12:54:24 -08:00
Phil Cohen
740831270a context: fix a truthy check in overlayworkingctx.data()
Summary:
This if statement is testing whether we ever set any data, not whether the data is truthy.

This can cause a bug where rebasing an empty file can cause IMM to fail and restart.

Test Plan: ./run-tests.py

Reviewers: durham, #mercurial

Reviewed By: durham

Differential Revision: https://phabricator.intern.facebook.com/D6687459

Signature: 6687459:1515535581:c2018237f3ca9daed6a0cb2f5a1475d1dc8e4865
2018-01-16 17:24:23 -08:00
Phil Cohen
d252e1a488 merge: only abort in IMM if files are actually marked as driver-resolved
Summary:
Before, we would raise whenever the `usemergedriver` condition was set when merging in-memory,
which equated to "any merge with (cd, dc, or m) actions in a repo with a mergedriver script".
This was done to be as conservative as possible.

However, a better solution is to run the preprocess() script and only raise if any files are
marked to actually be driver-resolved. That way we only restart the merge if we absolutely need
to.

Since some of our preprocess() scripts aren't ready yet, I also added
experimental.inmemory.nomergedriver in a previous change so we can deploy this in a build before the preprocess scripts are good to go.

Test Plan: ./run-tests.py

Reviewers: quark, #sourcecontrol

Reviewed By: quark

Subscribers: durham

Differential Revision: https://phabricator.intern.facebook.com/D6668426

Signature: 6668426:1515185050:a640208454caf053f8213b831d0f8e645ebe682c
2018-01-16 17:24:16 -08:00
Phil Cohen
24f40237ba filemerge: fix backing up an in-memory file to a custom location
If the user specifies a ui.origbackuppath, we used to always copy the file
there, but if the source file is in memory we must write it instead of copying.

Differential Revision: https://phab.mercurial-scm.org/D1806
2018-01-16 17:23:40 -08:00
Phil Cohen
a1c1d5e38d merge: fix default value for experimental.inmemorydisallowedpaths 2018-01-16 17:23:22 -08:00
Phil Cohen
8a4473f1d0 merge: log which files were driver-resolved to scuba
Summary: Log whichever paths were driver-resolved but not in experimental.inmemorydisallowedpaths, so we can update experimental.inmemorydisallowedpaths and keep the experience of rebasing with IMM and
mergedriver a pleasant one.

Test Plan: .

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6656159
2018-01-16 17:23:15 -08:00
Kevin O'Sullivan
fa38fee98f Using a set() for names to remove duplicates before calling bookmarks.delete
Summary: Fixing a bug that causes a fatal crash when a user attempts to delete a bookmark by inputting it's name twice, for example:

# hg bookmark --delete name name
Test Plan: The following test has been added in the test/test-bookmarks.t file
https://pxl.cl/bmTf
 to test the new functionality:

~~~
kosullivan-mbp:hg-crew kosullivan$ hg diff tests/test-bookmarks.t
diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
--- a/tests/test-bookmarks.t
+++ b/tests/test-bookmarks.t
@@ -288,6 +288,10 @@
   abort: bookmark 'A' does not exist
   [255]

+ensure bookmark names are deduplicated before deleting
+  $ hg book delete-me
+  $ hg book -d delete-me delete-me
+
 bookmark name with spaces should be stripped

   $ hg bookmark ' x  y '
~~~
Reviewers: rmcelroy,rafeca
Subscribers: suiting
Tags: python,bootcamp,source_control
Tasks: 22525999
Differential Revision: https://phabricator.intern.facebook.com/D6711774
2018-01-16 15:20:21 +00:00
Phil Cohen
72085d2e96 testdir: fix test-extension.t for DEFAULT_EXTENSIONS
Differential Revision: https://phabricator.intern.facebook.com/D6718663
2018-01-14 14:53:52 -08:00
Phil Cohen
6095f32f96 extensions: enable githelp by default
Summary:
Demonstrate the full power of this batte station with the first extension to be default-enabled, `githelp.py`. This also lets us write a test for `DEFAULT_EXTENSIONS`
(`test-extensions-default.t`)

All other test changes are actual fallout from enabling the githelp extension.

Test Plan: Added a test.

Differential Revision: https://phabricator.intern.facebook.com/D6717098
2018-01-12 16:45:54 -08:00
Phil Cohen
051f25cfd3 extensions: add a list of always-on extensions
Summary:
Based on in-person discussion in the warroom, we think this is the right path forward to "upstream" certain extensions without actually folding them into the mercurial/ codebase.

Enabling extensions by default achieves most of our goals (testing _everything_ in tests, reducing configuration permutations) without having to pay an up-front cost of fixing all the code today or accepting subpar code in mercurial/.

Test Plan: ./run-tests.py.

Reviewers: quark, #mercurial

Reviewed By: quark

Subscribers: quark

Differential Revision: https://phabricator.intern.facebook.com/D6716674

Signature: 6716674:1515803845:a209ec288341e4de8e79fd3759250e834a3573e3
2018-01-12 16:45:54 -08:00
Phil Cohen
c097dde0b9 READMEs: tweaks based on feedback
Summary: Based on feedback to D6687860.

Test Plan: n/a

Reviewers: durham, #mercurial

Reviewed By: durham

Differential Revision: https://phabricator.intern.facebook.com/D6714211

Signature: 6714211:1515788399:386b8f7330f343349234d1f317e5ac0a594142cf
2018-01-12 12:35:52 -08:00
Jun Wu
5c05ef8327 extensions: forbid "foo=" from importing foreign mercurial modules
Summary: This avoids issues where a wrong (outside the repo) extension was used.

Test Plan: Ran all tests

Reviewers: durham, #mercurial

Reviewed By: durham

Subscribers: durham

Differential Revision: https://phabricator.intern.facebook.com/D6690534

Signature: 6690534:1515632034:1353c9272650cf925dd299d252592afd52970e98
2018-01-09 17:06:09 -08:00
Phil Cohen
bf8527e7a9 lib: add READMEs to lib, extlib, cext 2018-01-09 15:20:46 -08:00