Commit Graph

6579 Commits

Author SHA1 Message Date
Kostia Balytskyi
88396f2bb1 fastannotate: drop the short version of --no-content
Summary:
`test-duplicateoptions` complains about `-h` being a duplicate, since it's a default help option.

Depends on D6683248

Test Plan: - run the test, see the mention of this option disappear

Reviewers: stash, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6683266
2018-01-09 06:52:59 -08:00
Kostia Balytskyi
925e76d0c6 smartlog: do not specify -T twice
Summary:
`formatteropts` already give us the `-T`.
Depends on D6683245

Test Plan: - run `test-duplicateoptions`, see this particular thing disappear

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6683248
2018-01-09 06:48:08 -08:00
Kostia Balytskyi
8fcdc5f35c extensions: drop the core sparse.py extension
Summary:
We have our fbsparse, which we are using. We can rename it later when configs
are in the same repo as the extension files.

Test Plan: - run tests, see only the failures related to the other commits in the stack

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6683245
2018-01-09 06:47:00 -08:00
Ryan McElroy
66bd74e558 hggit: internalize extension
Test Plan: run-tests-.py

Reviewers: mitrandir, #mercurial

Reviewed By: mitrandir

Subscribers: ps, terrelln

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

Tasks: T24908724

Signature: 6675896:1515448382:df8d80cd7356ae8f5fb04586dc4a0a651bc498fd
2018-01-09 06:08:01 -08:00
Ryan McElroy
dc858619e0 help: improve extension help messages
Test Plan: run-tests.py

Reviewers: ikostia, #mercurial

Reviewed By: ikostia

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

Signature: 6683060:1515505954:91bdc8841c2168bf93e7448cb0fa4d136d7a6e2f
2018-01-09 05:52:58 -08:00
Ryan McElroy
49de7f00d1 absorb: avoid object as default argument
Summary: This fixes a test-check issue and makes the code safer.

Test Plan: run-tests.py

Reviewers: ikostia, #mercurial

Reviewed By: ikostia

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

Signature: 6682545:1515505853:0e9f81c33bbf4c2579ec16f14153fab5fea832fd
2018-01-09 05:52:50 -08:00
Kostia Balytskyi
0e4d95b67e fb-hgext: fix gendoc-related issues
Summary:
These fixes are related to documentation-related check-style tests.

Depends on D6675344

Test Plan: - more tests pass

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675351
2018-01-09 03:44:33 -08:00
Kostia Balytskyi
e75b9fc1b1 fb-hgext: move most of hgext3rd and related tests to core
Summary:
This commit moves most of the stuff in hgext3rd and related tests to
hg-crew/hgext and hg-crew/test respectively.

The things that are not moved are the ones which require some more complex
imports.


Depends on D6675309

Test Plan: - tests are failing at this commit, fixes are in the following commits

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675329
2018-01-09 03:03:59 -08:00
Durham Goode
fe980ff373 remotefilelog: move to hgext/
Summary:
Moves the remotefilelog extension into hgext/ and it's tests into
tests/.

I did not fix up all the check-module errors, since it's a ton of work for
very little impact at this point.

Test Plan: make local && ./run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6680030
2018-01-08 18:58:08 -08:00
Durham Goode
228e6a901e cstore: move to hgext/extlib/
Summary: Moves cstore to hgext/extlib/ and makes it build.

Test Plan: make local && run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6678852
2018-01-08 17:55:53 -08:00
Durham Goode
3ae4bd8cf5 ctreemanifest: move to hgext/extlib/
Summary:
Moves ctreemanifest into hgext/extlib/. It will be built in a later
step when we add cstore to the build.

Test Plan: make local && cd tests && ./run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6678844
2018-01-08 17:55:53 -08:00
Jun Wu
0e18bfbbfa absorb: move to hgext
Summary: Move absorb to hgext.

Test Plan: `run-tests.py -l` with empty `PYTHONPATH`.

Reviewers: durham, #mercurial

Reviewed By: durham

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

Signature: 6678562:1515455701:8778bc0ce54ec017483f6826a9792bebcb9464d7
2018-01-08 13:57:01 -08:00
Mark Thomas
2e81565606 fb-hgext: integrate rust libraries and extensions with setup.py
Summary:
Move the rust libraries and extensions to their new locations, and integrate
them with the hg-crew setup.py.

Test Plan: Run `python setup.py build` and verify rust extensions are built.

Reviewers: durham, #mercurial

Reviewed By: durham

Subscribers: fried, jsgf, mitrandir

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

Tasks: T24908724

Signature: 6677251:1515450235:920faf40babbce9b09e3283ff9ca328d1c5c51e6
2018-01-08 15:26:24 -08:00
Mark Thomas
742cd624f7 hgsql: integrate with hg-crew
Summary:
Move hgsql into the hgext directory, and the tests to tests/test-hgsql-*.

Update the tests to refer to the new places for things.

Test Plan: Run the hgsql tests and make sure they pass.

Reviewers: #sourcecontrol

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

Tasks: T24908724
2018-01-04 07:22:19 -08:00
Ryan McElroy
c86a557cb1 lz4revlog: internalize extension and test 2018-01-03 07:15:33 -08:00
Stanislau Hlebik
95a1b2464e remotenames: move extension into hgext 2018-01-03 06:15:47 -08:00
Phil Cohen
a7e9f6521d rebase: turn off IMM if any rebased paths match a config
Differential Revision: https://phab.mercurial-scm.org/D1787
2018-01-03 05:35:56 -08:00
Phil Cohen
cf148d3eae rebase: extract _shoulddisableimm for clarity
Differential Revision: https://phab.mercurial-scm.org/D1786
2018-01-03 05:35:56 -08:00
Phil Cohen
e7ec8549b1 rebase: log why we didn't use IMM
In preparation for adding more conditions that will disable IMM, let's make
this framework more extensible and log the reason IMM wasn't used.

The `whynotimm` variable name matches the `why_not_eden` name in
`hg/eden/__init__.py`.

Differential Revision: https://phab.mercurial-scm.org/D1785
2018-01-03 05:35:56 -08:00
Phil Cohen
770a1c2093 rebase: include the exception message when restarting IMM
This makes the underlying condition, like merge driver vs. merge tool, easier
to understand.
2018-01-03 05:35:56 -08:00
Phil Cohen
a9f9b3b3db rebase: don't take out a dirstate guard for in-memory rebase
Since IMM doesn't affect the dirstate, it's not needed, and might be faster.

Differential Revision: https://phab.mercurial-scm.org/D1745
2018-01-03 05:35:56 -08:00
Phil Cohen
f52575e3db rebase: don't run IMM if running rebase in a transaction
Some callers to rebase.rebase(), like `_moverelative` in `fbamend/movement.py`,
wrap the entire rebase call in a transaction. This raises havoc when IMM tries
to retry the rebase when it hits merge conflicts, because the abort will fail
the whole transaction, not the subset. It also fails at the end, losing any
conflict resolution, as @sid0 noticed.

The right long-term fix that @quark and I have discussed is to change the
restarting logic such that it doesn't abort at all, but simply switches between
IMM and non-IMM fluidly for each commit, which has other nice properties. In
the meantime this will do for now.

Differential Revision: https://phab.mercurial-scm.org/D1782
2018-01-03 05:35:56 -08:00
Phil Cohen
6a6ee9a8bd rebase: add trailing newline to experimental.inmemorywarning 2018-01-03 05:35:56 -08:00
Phil Cohen
acc8749802 histedit: add ui.log for action count
Differential Revision: https://phab.mercurial-scm.org/D1751
2018-01-03 05:35:56 -08:00
Phil Cohen
e2d69b3598 rebase: print experimental.inmemorywarning when rebasing IMM
Also add a metrics log that I missed.

Differential Revision: https://phab.mercurial-scm.org/D1744
2018-01-03 05:35:56 -08:00
Jun Wu
ffd3befda7 journal: use pager
journal output is long and should use a pager.

Differential Revision: https://phab.mercurial-scm.org/D1740
2018-01-03 05:35:56 -08:00
Phil Cohen
4dae6fcb4e rebase: switch ui.log calls to common style
The old style was incompatibe with the sampling extension, I think.
2018-01-03 05:35:56 -08:00
Jun Wu
25d57c4aa8 unamend: backout the core version
We need hash-preserving unamend. Therefore remove the core version.
(grafted from 86e055fbb0c974e041dbd72cd95df6e3b37a0f6b)
(grafted from 129f15c3acd81d4390212430ea6b500412bc74ab)
(grafted from fbb42eb996d5bcddac4ba4e86a915a3bc62b3e16)
2018-01-03 05:35:56 -08:00
Jun Wu
bf8f10f537 lfs: fix committing deleted files caused by 02c30db0443d
02c30db0443d (lfs: add a repo requirement for this extension once an lfs
file is committed) introduced a regression that prevents committing file
deletion.  This patch fixes that.

Differential Revision: https://phab.mercurial-scm.org/D1717
2017-12-18 14:37:00 -08:00
Matt Harbison
7164edcf32 lfs: add an experimental config to override User-Agent for the blob transfer
This will allow developers to test against various server implementations.  I
didn't put it under [devel] because it's possible that some user needs to use it
in the field.
2017-12-12 15:16:02 -05:00
Matt Harbison
43bc9eefb2 lfs: add git to the User-Agent header for blob transfers
As we were trying to transition off of the non production lfs-test-server for
further experimenting, one of the problems we ran into was interoperability.  A
coworker setup gitbucket[1] to act as the blob server, tested with git, and
passed it off to me.  But push failed with a message saying "abort: LFS server
returns invalid JSON:", and then proceeded to dump a huge HTML page to the
screen.  It turns out that it is assuming that git is the only thing that wants
to do a blob transfer, and everything else is a web browser wanting HTML.

It's only a single data point, but I suspect other things may be doing this too.
RFC7231 gives an example [2] of listing multiple products in decreasing order of
significance.  Since the standard provides for this, and since it works with the
one problematic server I found, I'm just enabling this by default for a better
UX.

There's nothing significant about the version of git chosen, other than it is
the current version.

[1] https://github.com/gitbucket/gitbucket/
[2] https://tools.ietf.org/html/rfc7231#page-46
2017-12-14 13:04:08 -05:00
Martin von Zweigbergk
0c2857a328 unamend: allow unamending if allowunstable is set
I don't see why unamend should be disallowed when allowunstable is
set. By switching to rewriteutil.precheck() we fix that and get more
consistent error messages (and some additional ones).

Differential Revision: https://phab.mercurial-scm.org/D1682
2017-12-13 17:03:39 -08:00
Phil Cohen
9531767fab rebase: add ui.log calls for whether IMM used, whether rebasing WCP
Make it a bit easy to get metrics from these.

Differential Revision: https://phab.mercurial-scm.org/D1681
2017-12-13 10:29:22 -08:00
Wojciech Lis
f2ebe55279 lfs: using workers in lfs prefetch
This significantly speeds up lfs prefetch. With fast network we are
seeing ~50% improvement of overall prefetch times
Because of worker's API in posix we do lose finegrained progress update and only
see progress when a file finished downloading.

Test Plan:
Run tests:
./run-tests.py -l test-lfs*
....
# Ran 4 tests, 0 skipped, 0 failed.
Run commands resulting in lfs prefetch e.g. hg sparse --enable-profile

Differential Revision: https://phab.mercurial-scm.org/D1568
2017-12-11 17:02:02 -08:00
Augie Fackler
96c1d16249 merge with stable 2017-12-14 16:01:28 -05:00
Boris Feld
18540b6753 histedit: preserve active branch while histediting
The branch information was properly preserved in the changeset, but the
"active" branch of the working copy could be lost (the branch of the base
being used).

Histedit used to behave properly in this regard but the case was not tested
and regressed 4 years ago in c038baa4b6f0.
2017-12-12 18:22:11 +01:00
Matt Harbison
ffc3cccdf4 convert: restore the ability to use bzr < 2.6.0 (issue5733)
This effectively conditionalizes 7ac081713920.  Some Linux distributions (like
CentOS 7) use really old versions, and the change referenced was causing
exceptions to be thrown.

Even though the deprecation warning says 'since 2.5.0', it wasn't marked as such
in 2.5.1, but is by 2.6.0.  This was tested with 2.4.2 and 2.6.0 with
PYTHONWARNINGS=::DeprecationWarning, and both paths were exercized.
2017-12-01 23:27:08 -05:00
Matt Harbison
c1ef7c5a7a largefiles: pay attention to dropped standin files when updating largefiles
Previously, the largefile for a dropped standin would be deleted here, and then
restored from the cache.  This had the effect of clobbering uncommitted changes
if a revert caused the file to be forgotten, which is not what happens with a
normal file.  Now the removal and update is skipped for dropped largefiles, and
the corresponding standin is deleted from disk.

This was noticed when working on issue5738 because the forgotten standin files
were left behind, and that changes the behavior of the next rename to that
directory.  My first attempt was to cleanup the standins before calling this.
That failed, because this function deletes the largefile if the corresponding
standin is missing.

This function is called by the revert command, merge (and therefore update), and
patch, via the scmutil.marktouched() override.  So it should be pretty narrow in
scope.

I didn't mark issue5738 as fixed because the move related issues can still
happen if the main tree and the .hglf subtree get out of sync somehow.  I don't
see an easy fix for that, but that should be an edge case.  If whoever queues
this thinks it is good enough to close out the bug and can cram it into the
summary, go for it.
2017-11-12 23:45:14 -05:00
Matt Harbison
40cf71ae24 convert: avoid wrong lfconvert defaults by moving configitems to core
The `hg lfconvert --to-normal` command uses the convert extension internally to
work its magic, but that produced devel-warn messages if the convert extension
wasn't loaded by the user.  The test in 658e7a6d93e0 (modified here) wasn't
showing the warnings because the convert extension was loaded via $HGRCPATH.
Most of the config options default to None/False, but 'hg.usebranchnames' and
'hg.tagsbranch' are supposed to default to True and 'default' respectively.

The first iteration of this was to ui.setconfig() inside lfconvert, to force the
convert extension to load.  But there really is no precedent for doing this, and
check-config complained that 'extensions.convert' isn't documented.  Yuya
suggested this alternative.

This partially backs out 448e09d8859d.
2017-11-28 23:20:08 -05:00
Gregory Szorc
53801830bd share: move config item declarations into core
These config items control share behavior that is implemented in core.
Since the functionality is implemented in core, extensions may
leverage it.

Mozilla has one such extension. And, it needs to access share.pool.
Before this patch, a devel warning regarding accessing an unregistered
config option would be issued unless the share extension were loaded.
Moving the registration of the config options to core fixes this.
2017-11-06 10:33:40 -08:00
Matt Harbison
ba66d4513f help: minor copy editing for grammar 2017-10-31 23:09:29 -04:00
Pulkit Goyal
023a6862fc children: fix the log expansion of hg children in doc
`hg log -r children()` returns `hg: parse error: missing argument`.

Differential Revision: https://phab.mercurial-scm.org/D1269
2017-10-31 06:39:38 +05:30
Yuya Nishihara
feaa3f8a8c mq: copy pager attributes back to qrepo.ui
If the legacy pager extension is enabled, a pager is started through repo.ui
at dispatch._runcommand(). After that, mqcommand() creates a qrepo with a
fresh repo.baseui, at which point pager information was lost and another pager
would be spawned by the modern pager interface.

This is a minimal workaround for the problem.
2017-10-21 13:42:43 +09:00
Yuya Nishihara
9e02f75b4c registrar: host "dynamicdefault" constant by configitem object
This is the common pattern seen in the other registrar classes.
2017-10-21 13:13:20 +09:00
Phil Cohen
c2c53b73a1 rebase: fix for hgsubversion
5c25fe7fb1e broke something in the hgsubversion test path, causing it raise an
abort (Abort: nothing to merge) during a perfectly good rebase. I tracked it
down to this change. It's probably not hgsubversion related.

I suspect that using the same `wctx` from before the initial update causes
problems with the wctx's cached manifest property. I noticed we also sometimes
stick random gunk on the wctx object in other places (like in `copies.py`) so
it's probably best to reset it for now.

The line I added before was actually useless since we don't pass wctx to the
initial `merge.update`, so it defaults to `repo[None]`. So I just removed it.

Differential Revision: https://phab.mercurial-scm.org/D1679
2017-12-12 22:05:21 -08:00
Pulkit Goyal
431feb4f20 py3: handle keyword arguments correctly in hgext/record.py
Differential Revision: https://phab.mercurial-scm.org/D1673
2017-12-10 06:36:48 +05:30
Martin von Zweigbergk
14dfe2a25c memfilectx: make changectx argument mandatory in constructor (API)
committablefilectx has three subclasses: workingfilectx, memfilectx,
and overlayfilectx. committablefilectx takes an optional (change) ctx
instance to its constructor. If it's provided, it's set on the
instance as self._changectx. If not, that property is supposed to be
defined by the class. However, only workingfilectx does that. The
other two will have the property undefined if it's not passed in the
constructor. That seems bad to me. This patch makes the changectx
argument to the memfilectx constructor mandatory because that fixes
the failure I ran into. It seems like we should also fix the
overlayfilectx case.

Differential Revision: https://phab.mercurial-scm.org/D1658
2017-12-11 09:27:40 -08:00
Matt Harbison
241446a76e lfs: use 'ui' provided to upgrade for output, instead of stealing srcrepo's
Also spotted by Yuya.
2017-12-12 20:28:38 -05:00
Matt Harbison
207273d40a lfs: correct the directory list value returned by lfsvfs.walk()
Spotted by Yuya.
2017-12-12 20:22:38 -05:00
Phil Cohen
27591b2ae0 rebase: replace --inmemory flag with rebase.experimental.inmemory config
Differential Revision: https://phab.mercurial-scm.org/D1666
2017-12-11 22:16:13 -08:00