Upstream has renamed this config. Since the old config name was still an alias
for the new name, it was technically only breaking the test output where we
hardcoded the config name in the output. But I went ahead and updated every
place anyways.
Differential Revision: https://phab.mercurial-scm.org/D1209
Summary:
I think this is a better way of surfacing this warning. It also allows
us to tweak the message so we can point at new documentation I have already
written up.
Test Plan: Updated test
Reviewers: #fbhgext, mbthomas, durham, singhsrb
Reviewed By: #fbhgext, mbthomas, durham, singhsrb
Subscribers: singhsrb, quark
Differential Revision: https://phab.mercurial-scm.org/D812
D802 added two test cases in the test but the test cases are only used
for a very little portion of the test and therefore, result in needless double
execution for most of the test. Therefore, this commit removes the test cases
and instead, handles the different cases by passing the corresponding config
option.
Test Plan:
ran test-tweakdefaults.t
Differential Revision: https://phab.mercurial-scm.org/D814
Summary:
Adding a config to control (only enable/disable for now) developer
warnings. This allows disabling the warnings on platforms like servers.
Test Plan: Updated and ran test-tweakdefaults.t
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Differential Revision: https://phab.mercurial-scm.org/D802
Summary: "hg hide" is the user friendly command for hiding commits
Test Plan: ran tests
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D725
Summary:
tweakdefaults already overrides amend, rebase and graft to update the commit date
to the current time when it creates new commits.
This extends this to also give the same behavior to histedit.
Test Plan: New unit test added.
Reviewers: #fbhgext, stash
Differential Revision: https://phab.mercurial-scm.org/D490
Summary:
amend --to is a thin wrapper around histedit, and fails if you ask it
to update the date. tweakdefaults can be configured to ask amend to change the
date. When this is the case, don't change the date when using --to, so that it
can work.
Test Plan:
Test case added here fails before the change complaining about other
flags with --to, and fails in the histedit afterwards (I'm not clear on why - I
suspect phases are significant here).
Reviewers: #fbhgext, ryanmce
Reviewed By: #fbhgext, ryanmce
Differential Revision: https://phab.mercurial-scm.org/D349
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: Looks like the upstream has changed it on us.
Reviewers: quark
Reviewed By: quark
Subscribers: quark
Differential Revision: https://phab.mercurial-scm.org/D40
Summary:
debuginhibit was removed since we no longer have a separate inhibit state.
smartlog hack about changing "o" to "x" was removed since "obsolete()"
revset is correct and the hack is unnecessary now.
directaccess was removed from tests since inhibit does not depend on it.
`- obsolete()` was added to some revsets to avoid divergence and other
surprises.
Use `inhibit.revive` API in infinitepush and reset to revive changesets
properly.
Remove various hacky code that mangle inhibit state in corner cases.
Most test changes are `o` changed to `x` in output since we draw
`obsolete()` state correctly now. `test-infinitepush-backup-remotefilelog.t`
change was because output could be `bytes/sec` instead of `KB/sec`.
Test Plan: arc unit
Reviewers: #mercurial, kulshrax
Reviewed By: kulshrax
Subscribers: kulshrax, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5391361
Signature: t1:5391361:1499722618:d3c1cf629f0c59ecdf1dfd5e653c1eb6176646b8
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:
Now that fbamend has most of the features we want. Replace evolve
used by tests.
Minor changes are made to some extensions to make test pass:
- reset: drop commit reviving support (was provided by "hg touch")
- smartlog: do not assume who provides "allsuccessors" revset
- fbamend: return 1 on "nothing changed"
- fbamend: write operation data for split and fold
- fbamend: do not print incompatibility notice
- fbamend: do not disable itself when rebase is not enabled
- inhibit: remove `bookmark -D` option - use `prune -B` instead
Test Plan: arc unit
Reviewers: #mercurial, stash
Reviewed By: stash
Subscribers: stash, mjpieters, medson
Differential Revision: https://phabricator.intern.facebook.com/D5258813
Signature: t1:5258813:1497604051:0c7334f9a6554cf31aaaaa2a4995b17d4e445847
Summary: `fbamend.py` is already long. It will become more complex so let's move it.
Test Plan: arc unit
Reviewers: #mercurial, ikostia
Reviewed By: ikostia
Differential Revision: https://phabricator.intern.facebook.com/D5209475
Signature: t1:5209475:1497260957:e84aec4a2f90c8dd1d247b2b0caef48cfbb59c55
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:
This diff makes the tests use the vendored directaccess and inhibit instead the
foreign ones.
Test Plan: arc unit
Reviewers: #mercurial, sid0
Reviewed By: sid0
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5142981
Signature: t1:5142981:1496173851:3a8f3a1c689711dbef517c893bf72c90ab144761
Summary: On Mac OS X, xargs only ever returns 1 for failure. On Linux, it returns 123 for "xargs succeeded, but the command(s) it invoked did not". Make the grep test pass on OS X.
Test Plan: Run the tests on devserver, see them pass. Try again on laptop, see them continue to pass
Reviewers: #sourcecontrol, quark
Reviewed By: quark
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4074442
Signature: t1:4074442:1477407528:809b64f7478ff0df0d2a39b745a2b9602d5f22ee
Summary:
It's a common mistake that our tests require foreign extensions (namely evolve
and remotenames) without checking them first.
This diff adds checks to catch these mistakes, adds missing checks, and unifies
our checking logic using `require-ext.sh`, which is aware of `hgext3rd` and
prints skip message.
This affects `arc lint` so hopefully our new testing code would be free of this
kind of mistakes.
Test Plan: `arc lint` would catch errors
Reviewers: #mercurial, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3550977
Signature: t1:3550977:1468455857:e849dfd9e3cbc446cc6e6c662050ee88a3366e6c
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
Summary:
Previously grep only searched in the current directory, even if you gave it a
pattern like "../". This fixes the code to correctly honor the arguments, and
to accept mercurial file patterns just like most other mercurial commands.
This does change the file parsing behavior somewhat: previously "hg grep" would
treat all arguments as glob patterns. Now you explicitly have to say
"glob:<pattern>" to get glob matching. However, I suspect this won't impact
most users, since they would normally let their shell perform glob expansion
before the arguments are given to mercurial.
Test Plan:
Included new unit tests for grep, and updated the existing tests that were
affected by the change in glob behavior.
Reviewers: #sourcecontrol, durham, carenthomas, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: quark, mwilliams, matthieu, meyering, yfeldblum, rmcelroy, net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3376605
Signature: t1:3376605:1464841648:98bfb47866dec802ca34f55c821796f36532211f
Summary:
BSD version of head does not support -n0 and it looks like the only purpose of
using it here is to hide stdout output (and leave stderr).
Test Plan:
Ran test-tweakdefaults.t on both Linux and OSX, made sure that this particular
part of the test does not fail anymore.
That said, test-tweakdefaults.t still fails on OSX, but that requires more
investigation and my 5-minute look did not reveal the reason.
Reviewers: simonfar
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3378544
Summary:
When people combine --root-relative with a file pattern, they would probably
expect the output to be relative to the root -- but it's not! In this case, it
would fall back to the default file pattern behavior, which is cwd-relative.
Instead of confusing the user with apprarently errorneous output, let's abort
explicitly and provide a helptful hint.
Test Plan: added a new test, existing tests still pass
Reviewers: #mercurial, simpkins, ttung, quark
Reviewed By: quark
Subscribers: quark, net-systems-diffs@, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3319366
Signature: t1:3319366:1463610688:3f129c97f68f43ac85d2b31b55fac5c859e85c04
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.
Test Plan: all tests pass
Reviewers: #sourcecontrol, ttung, mitrandir, akushner
Reviewed By: akushner
Subscribers: mpm, akushner, mitrandir
Differential Revision: https://phabricator.fb.com/D2811997
Signature: t1:2811997:1452200059:9e4fca501a22f95d2d9a22d234758f55e292ea9a
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.
Test Plan: All tests pass
Reviewers: #sourcecontrol, ttung
Differential Revision: https://phabricator.fb.com/D2811856
A warning was there because core was using a deprecated API for writing
bookmarks. Now that the issue is fixed in core, this test has to be updated to
remove the warning.
Summary:
Devel warnings are pointing at issues in the code that need to be fixed. The
right way to get the tests to pass is to fix the warning cause, not to the
warning to the tests.
This practically backout an handful of test that added such warning output in
the test.
Test Plan:
Well, test are now broken to match the state of the borken code.
Reviewers: lcharignon
Differential Revision: https://phabricator.fb.com/D2760523
The no-date-rewrite-on-rebase test had output that assumed date rewriting. It
should be outputting the first commit which has a recent date (commit 7) instead
of the current commit (commit 12) which did not have it's date rewritten.
Summary:
Previously rebase retained the commit date from the original. Now it uses current time.
Added config option 'tweakdefaults.rebasekeepdate' to save original date in graft.
Test Plan: ./run-tests.py test-tweakdefaults.t
Reviewers: rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2646736
Tasks: 8770194
Signature: t1:2646736:1447368541:e9735f75b394a25b72d1a5cc4cd26454c2231c91
Summary:
Previously commit --amend and amend retained the commit date from the original. Now it uses current time.
Added config option 'tweakdefaults.amendkeepdate' to save original date in graft.
Test Plan:
1) ./run-tests.py test-tweakdefaults.t
2) Add the following to ~/.hgrc
[extensions]
tweakdefaults = PATH_TO_tweakdefaults.py
fbamend = PATH_TO_fbamend.py
Create repo
hg init
Make a commit with date 0
echo 1 >> test.txt && hg add test.txt && hg commit -d "0 0" -m "initial commit"
Amend a commit via "amend" command and check the date.
echo 1 >> test.txt && hg amend && hg log -l 1
Do the same for "commit --amend" command
3) Add the following to ~/.hgrc
[tweakdefaults]
amendkeepdate = True
and repeat actions from step 2) (both for "commit --amend" and "amend"). Date should stay the same.
Reviewers: rmcelroy, #sourcecontrol, durham
Reviewed By: durham
Subscribers: durham, balazsbalazs
Differential Revision: https://phabricator.fb.com/D2570763
Tasks: 8770194
Signature: t1:2570763:1445539148:66b8b00ed51d486d39203dad830f4a50cdc8060d
Summary:
Previously graft retained the commit date from the original. Now it uses current time.
Added config option 'tweakdefaults.graftkeepdate' to save original date in graft.
Test Plan:
1) ./run-tests.py test-tweakdefaults.t
2)
Add the following to ~/.hgrc
[extensions]
tweakdefaults = PATH_TO_tweakdefaults.py
Create two bookmarks: test_1 and test_2, pointing to different commits
Graft commit from test_2 to test_1
hg up test_1 && hg graft test_2
Check the date in the log - it should be different from the date of test_2 commit
hg log -l 1
Add the following to ~/.hgrc
[tweakdefaults]
graftkeepdate = True
Strip latest test_1 commit
hg strip test_1
Again do the graft
hg up test_1 && hg graft test_2
and verify the commit date: should be the same as in test_2 commit
Reviewers: #sourcecontrol, rmcelroy, durham
Reviewed By: durham
Subscribers: balazsbalazs
Differential Revision: https://phabricator.fb.com/D2566177
Tasks: 8770194
Signature: t1:2566177:1445539026:2cd0b6b5b04247c17942f787d8921215def8e3fe
Summary: Added the --reuse-message/-M flag to `hg commit` via tweak defaults
Test Plan: See the tests
Reviewers: #sourcecontrol, durham, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2559541
Tasks: 8721257
Signature: t1:2559541:1445364124:db69a1b08defc0a84f314019ce1a01174e7006d3
Summary:
Adds configuration to .hgrc such that setting nooprebase = True
in the tweakdefaults section changes the behaviour of a noop
rebase such that the exit status is 0 (instead of 1).
Test Plan: See: https://phabricator.fb.com/P20083985
Reviewers: rmcelroy
Reviewed By: rmcelroy
Subscribers: dancol
Differential Revision: https://phabricator.fb.com/D2557089
Tasks: 8694501
Signature: t1:2557089:1445447745:fc35600d53f797d7242c2fcff9fac42867d7b651
Summary: Moved merge comment to hint in Abort
Test Plan: test output
Reviewers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2522817
Tasks: 8593074
Summary: Disabling rollback in tweakdefaults to replace the hook
Test Plan: testing the message
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2515138
Tasks: 8578898
Summary: Disabling merge in tweakdefaults to replace the hook
Test Plan: enable, disabled, disabled and meaasge modified
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2515407
Tasks: 8593074
Summary: Adding config to disable the branch command and still forcing users to pass --new if it's enabled
Test Plan: Testing branch alone, branch when it's disabled and when it's enabled (with the --new options in both cases)
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2478915
Tasks: 8500803
Summary: Changing tag disabled by default to tag enabled by default
Test Plan: tag default policy, tag when disabled with or without default message
Reviewers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2486970
Tasks: 8500389
Summary: Adding tag tweak and warning on the tags command
Test Plan:
Testing the tag command if allowed, not allowed with default message and not allowed with custom message
Testing if the default warning message or custom message prints when tags is called
Reviewers: durham, #sourcecontrol, rmcelroy
Reviewed By: #sourcecontrol, rmcelroy
Subscribers: cdelahousse, durham
Differential Revision: https://phabricator.fb.com/D2477368
Tasks: 8500389
Test Plan:
updated test; made sure to include `HGPLAIN`
ran `arc diff` from repo root and from subdir; both worked
In `fbsource/fbobjc` I ran `arc lint` and there were no warnings but it did fail to find `/usr/bin/xcrun` (which is the same behavior as before).
I repeated this in `fbsource/fbobjc/Configurations` to check for path issues; same result.
In `www` I ran `arc lint` and there were no warnings. I repeated this in `www/flib` and got the same result.
Reviewers: durham, #sourcecontrol
Reviewed By: durham, #sourcecontrol
Subscribers: durham, akushner
Differential Revision: https://phabricator.fb.com/D2457648
Tasks: 8432204
Signature: t1:2457648:1442622676:611ad3072d11b91feb947c0eb7eb25b621c61eb1