Summary:
"import stat" was importing stat extension instead of
stat module from standard library.
Test Plan: ran tests
Reviewers: #fbhgext, stash
Reviewed By: #fbhgext, stash
Differential Revision: https://phab.mercurial-scm.org/D228
Summary:
Keep `showupdated` commit messages limited to a 50 character width,
with a "..." ellipsis to signify that the message was trimmed.
Test Plan: Added a test.
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Differential Revision: https://phab.mercurial-scm.org/D217
Summary:
Users and particularly automation can benefit from having the new
revision hashes as part of the output of rebase and other operations that
update nodes. Right now, hacks such as getting the tip revision are used to get
that information.
Test Plan: unit tests
Reviewers: #fbhgext, ryanmce
Reviewed By: #fbhgext, ryanmce
Subscribers: ryanmce, durham, stash, quark
Differential Revision: https://phab.mercurial-scm.org/D173
Summary:
Core mercurial has a much better "nocheck" option now that we should just start
using. It's better and it's built-in!
Test Plan: Updated tests
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Subscribers: quark
Differential Revision: https://phab.mercurial-scm.org/D164
Summary:
Upstream has added devel-warnings when writing to vfs files without taking the
wlock. We need to take the wlock here.
Test Plan: The test now passes
Reviewers: #fbhgext, simonfar
Reviewed By: #fbhgext, simonfar
Subscribers: simonfar
Differential Revision: https://phab.mercurial-scm.org/D103
Summary:
It got removed from inhibit by D5258813. It's a useful feature so let's
re-implement it in tweakdefaults.
Test Plan: Added test cases with plain strip and fbamend's safe strip.
Reviewers: #mercurial, durham
Reviewed By: durham
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5313291
Signature: t1:5313291:1498321590:03e61a5b1acc2df44afcfd6ceb723e17c648ce79
Summary:
People want update to optionally not activate a bookmark.
This diff adds an `--inactive` flag to do that.
Test Plan: Added test-update-i.t
Reviewers: durham, #mercurial, quark
Reviewed By: quark
Subscribers: mitrandir, mjpieters, medson, durham, akushner, quark
Differential Revision: https://phabricator.intern.facebook.com/D5228552
Tasks: 8097957
Signature: t1:5228552:1497396566:16322e1a2dfdab30a213ddc37cbde4fc71bffcc0
Summary:
Upstream mercurial --stat option shows only aggregated statistics for all
files. This diff make it possible to get diff statistics per file.
It can be used by automation.
Test Plan: arc unit
Reviewers: #mercurial, quark
Reviewed By: quark
Subscribers: quark, mjpieters, medson, #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D5203835
Tasks: 18508761
Signature: t1:5203835:1496981602:c8a649158892d05442d8d0aa717589974b92ff6b
Summary:
Fix the tweakdefaults code to extract the --tool argument when extracting
--rebase, and to pass it in to the rebasemodule.rebase() function correctly.
Test Plan: Included a new test.
Reviewers: #mercurial, rmcelroy, quark
Reviewed By: quark
Subscribers: quark, net-systems-diffs@fb.com, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5134466
Tasks: 18770938
Signature: t1:5134466:1495848690:308a8d3fbad39e6ecfeaee04b1b3267c1fa1118c
Summary:
Upstream has added an optional operation argument to createmarkers, which we
need to also accept. This argument is currently only processed if a config
option is set, so for now we will still put the operation in the metadata dict
manually.
Test Plan: Ran the tests
Reviewers: #mercurial, quark
Reviewed By: quark
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5106511
Signature: t1:5106511:1495485044:23d45d9ba389cf0d49b31705ae36902310c5056c
Summary: Upstream has deprecated cmdutil.commands() in favor of registrar.commands()
Test Plan: Ran the tests
Reviewers: #mercurial, quark
Reviewed By: quark
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5106486
Signature: t1:5106486:1495485074:0e20f00622cc651e8c9dda837f84dd84cc51099e
Summary: This will allow `-M` to have complex queries like `REV^'.
Test Plan: Test `scmutil.revsingle` in debugshell.
Reviewers: #mercurial, ikostia, rmcelroy
Reviewed By: ikostia, rmcelroy
Subscribers: ikostia, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5008983
Signature: t1:5008983:1493977159:7e105be95330b498d25033565be8594789406cae
Summary: The --merge flag is relatively new; we shouldn't add --check if it is specified.
Test Plan: Unit test
Reviewers: #mercurial, quark
Reviewed By: quark
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4916396
Tasks: 17490374
Signature: t1:4916396:1492647440:d9955931cb9177719a58325c08a715d4d51d1226
Summary:
The function signature for a number of functions relating to templating changed.
In addition, the templater layer now requires that template functions have been
registered via the decorator, otherwise a require attribute is missing and
things blow up.
Test Plan: arc unit. rt.
Reviewers: #mercurial, quark
Reviewed By: quark
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4908220
Signature: t1:4908220:1492545033:66f089e03a6064ae96ca36f3abf99ecb6d48d422
Summary:
previously, this was using .match() to find candidate names
and then reaching inside the dirstate._map to check the status of
the file.
This implementation uses the dirstate.walk instead, which returns a
map of filename -> stat information.
This approach works better with custom dirstate implementations, such
as eden, where a local map of the required information is not available
and where it would be suboptimal to request that information on
demand on a per-file basis.
Test Plan:
testing before and after this change:
`time hg grep eden foo` has a runtime of ~1.2 seconds.
If you have sqldirstate enabled, this change makes the runtime 3 seconds
compared to 2 with sqldirstate on and without this change.
Reviewers: #mercurial, durham
Reviewed By: durham
Subscribers: mjpieters, simpkins
Differential Revision: https://phabricator.intern.facebook.com/D4903110
Signature: t1:4903110:1492473495:ebe375f3e2533f6ae4ca7ea9a494f6feb9704f9e
Summary:
People may mistakenly set PAGER=less, which will lose colors and does not
have the friendly "exit if there is less than one screen" feature.
Detect that and add "-FRQX" automatically.
Test Plan:
Unset all my `pager.pager` configs, and export `PAGER=less`, verify `hg sl` has
the desired pager and colors are fine.
Reviewers: wez, #mercurial, durham
Reviewed By: durham
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4864822
Signature: t1:4864822:1491870110:246f906d41b5ac72ecfdda487aa8f412a90cf2cb
Summary: Added some tests for this also
Test Plan: arc unit in fb-hgext
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: mjpieters, #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D4397881
Tasks: 15360841
Signature: t1:4397881:1484066348:1b9fb24a30a9962de0dad858f4d57956a2c91dc4
Summary:
test-check-code.t was updated in core mercurial so we have to fix it in
fb-hgext
Test Plan: arc unit
Reviewers: #sourcecontrol, quark
Reviewed By: quark
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4377208
Signature: t1:4377208:1483451688:bc382cdab07c6d6127d67c902458a2ccfa1373d1
Summary:
This fixes test-check-config-hg.t for tweakdefaults. And did some clean-up
for other minor issues.
I was trying to implement another feature (along with the clean-up) in
tweakdefaults and finally realized it's infeasible and drop the feature. But
the clean-up seems useful thus sent here.
Also change `cp -r` to `cp -R` to pass the usptream check-code test.
Test Plan: `arc unit`
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4253852
Signature: t1:4253852:1480613350:398e9b234fcc2360dcb8a3e3ad4e5bc5c4377857
Summary:
Using `testedwith = 'internal'` is not a good habit [1]. Having it
auto-updated in batch would also introduce a lot of churn. This diff makes
them "ships-with-fb-hgext". If we do want to fill the ideal "testedwith"
information, we could put it in a centric place, like a "fbtestedwith"
extension rewriting those "ships-with-fb-hgext" on the fly.
Maybe having in-repo tags for tested Mercurial releases is also a good idea.
[1]: www.mercurial-scm.org/repo/hg/rev/2af1014c2534
Test Plan: `arc lint`
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4244689
Signature: t1:4244689:1480440027:3dc18d017b48beba1176fbfd120351889259eb4b
Summary:
Template lacks of the "padding" feature. There is a hard-coded 13-char wide
username, 5-char wide line number, which does not look well if the usernames
are too long or too short.
This patch restores the original annotate format which is different from
the current behavior. For example, given "-uc", it shows "user node" instead
of "node:user". It also tries to make the template version as close as the
non-template one, by adjusting the order, changing separators, and making
"-c" optional (could be hidden from the output).
Test Plan: Modified existing tests
Reviewers: #sourcecontrol, ikostia
Reviewed By: ikostia
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4243830
Signature: t1:4243830:1480437984:1c679c9db516bab905d027061326a7a1524922c6
Summary:
This change adds a `--restack` option to `hg rebase`. When invoked, the command will rebase all descendants of precursors of the current changeset onto the current changeset. This is similar to the behavior of `hg evolve --all`, except it only handles unstable changesets, and not other issues that can arise from shared mutable history such as divergence or bumping.
I've been playing around with some of the more advanced features (such as allowing the command to be run from anywhere in the old stack or new stack, as well as allowing the user to specify the number of changesets to rebase), but I wanted to upload the most simple iteration of this command for feedback.
Test Plan:
See unit tests for complete commands.
1. Create a stack of commits.
2. Somewhere in the middle of the stack, amend a commit, potentially several times.
3. Run `hg rebase --restack`.
4. The top half of the stack should be rebased onto the amended commit, and the preamend bookmark should be gone.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: rmcelroy, quark, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3972103
Tasks: 13651947
Signature: t1:3972103:1476230834:8f77eac4e8d8681dd9f8125747c1ff75c8da1ad8
Summary:
"changeset" is a more official term and let's use it. Note that this patch
only changes documentation / i18n messages visible to the users and header
comment blocks to developers. Other places like comments in the code are
untouched.
With the "dialect" extension enabled, users will still see the more friendly
term - "commit".
Test Plan:
`arc unit`. Note the remotefilelog failure is probably unrelated - seems
related to ongoing / upcoming manifest refactoring upstream.
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3900394
Signature: t1:3900394:1474470348:6a1b5691e2599cc47df18b227d56d1f9d3c7c906
Summary:
We are seeing perf issues with hidden/obsolete handling.
`hg bookmark` is a frequently used command and by making it use the unfiltered
repo, it could be 200ms-300ms faster.
Test Plan: Added a new test
Reviewers: #mercurial, mitrandir, ikostia, ttung
Reviewed By: mitrandir, ikostia
Subscribers: mitrandir, rmcelroy, akushner, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3692968
Signature: t1:3692968:1470777864:72ad5d0ffb52ecfcaaa607082693b88319d778fd
Summary:
Be a better citizen under system python path.
Fix all tests issues and change setup.py to use glob pattern to include
all extensions.
Test Plan:
Run tests and `make local`.
Also build and install the package and run `hg sl` in major repos.
Reviewers: #mercurial, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, durham, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3534311
Signature: t1:3534311:1468275426:fe122646c8bd6c541e1889e73e9df28f86747ff2