Commit Graph

367 Commits

Author SHA1 Message Date
Laurent Charignon
de4ed36f0b test: make the tests pass check code
Summary: Someone checked in this code that does not pass check code

Test Plan: fix check code

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3108018
2016-03-29 09:06:21 -07:00
Laurent Charignon
ae6dfcd369 fastmanifest: add extension
Summary:
This extension will contain the logic for the fastmanifest. For the moment it
contains very simple logic to log manifest access and see if our assumptions are
correct about what manifest are accessed during typical workflow. This will
help build the code to figure out what manifests are worth caching.

Test Plan: add a new test

Reviewers: durham, rmcelroy, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3107990

Tasks: 10604335
2016-03-28 18:44:56 -07:00
Jing Qian
fa40278190 copy remote_bookmark reflog when sharing 2016-03-23 22:47:54 -07:00
Martijn Pieters
f0aac1fe38 New extension: Suppress the output generated by a broken commmand.
Summary:
When a command fails, the commandfailure signal is logged. Use the information
provided by this log call to suppress the warning and all traceback
information.

In combination with the logtoprocessui extension, this should replace the less
generic errorredirect extension.

Depends on D3082490

Test Plan: run $HG/tests/runtest.py test-suppresscommandfailure.t

Reviewers: #sourcecontrol, quark, ttung, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.fb.com/D3084144

Signature: t1:3084144:1458755837:39fea58ed89d03a611bfcfffa88af68a2d55fddc
2016-03-23 14:36:01 -07:00
Martijn Pieters
ba36592fba New extension: handle any ui.log event in an external process.
Summary: This would allow us to trace various events in Mercurial via external commands.

Test Plan: run $HG/tests/runtest.py test-logtoprocess.t

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.fb.com/D3082490

Signature: t1:3082490:1458686100:c727b033d97d0b15b294f8b2826cf20614caf269
2016-03-22 17:27:08 -07:00
Durham Goode
1069b76390 pushrebase: support pushing to non-pushrebase repos
Summary:
If pushrebase was enabled on the client, it became impossible to push
to a non-pushrebase repo using --to, like remotenames allows. The fix is to
detect if remotenames is enabled and allow the default --to behavior.

Test Plan: Added a test

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3057066

Tasks: 9455435
2016-03-22 10:57:29 -07:00
Adam Simpkins
db56b7802d [pullcreatemarkers] also obsolete parents of commits landed in this pull
Summary:
When a pull causes commits on the tip of a branch to be obsoleted due to
landing, make sure that parent commits that were landed in previous pulls also
get hidden.  The parent commits would already have obsolete markers, but they
would have been inhibited because there were non-obsolete children.  Once their
children are landed their obsolete markers can now be deinhibited.

Test Plan: Added a new test case.

Reviewers: #sourcecontrol, durham, lcharignon, ikostia, pyd, ttung

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.fb.com/D3028597
2016-03-21 18:08:04 -07:00
Durham Goode
6112a4e50c fbamend: fix fbamend not passing a rebase destination
Summary:
fbamend was not passing a rebase destination if you did not have an active
bookmark (it would just rebase onto the named branch tip). This broke when
upstream Mercurial started requiring you specify a rebase destination when it
was ambiguous.

The fix is to rebase onto the current commit (which is always the correct
behavior, since amend --rebase will have left you on that commit after the
amend, and amend --fixup discovers what needs rebasing by looking at your
current commit).

Test Plan: Added a test

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3033728

Tasks: 10366715
2016-03-09 17:53:11 -08:00
Ryan McElroy
1d8ca1bad6 fbconduit: fix test http service
Summary: 1e42206a9778 in core hg broke this.

Test Plan: run the test and it doesn't fail

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Subscribers: durham, mjpieters

Differential Revision: https://phabricator.fb.com/D3012325

Tasks: 10299400

Signature: t1:3012325:1457118454:6b551be9d826d17ecff18f271b31d9dc0218f461
2016-03-07 02:49:58 -08:00
Adam Simpkins
3a980ca96a [pullcreatemarkers] fix issues creating obsolescence markers
Summary:
Use a transaction, to make sure commits get hidden properly.  Currently it
fails to hide all commits if multiple commits on the same branch are all
obsoleted in the same pull.  When creating obsolescence markers for some of the
earlier commits, it thinks they still have non-hidden successors, and doesn't
know that these successors are also going to be hidden by the same pull
operation.

Also avoid walking all draft commits if nothing new was landed in this pull.

Test Plan:
Updated the tests to exercise the case where a pull obsoletes multiple commits
all at the tip of a branch.

Reviewers: #sourcecontrol, lcharignon, ikostia, durham, ttung

Reviewed By: durham

Subscribers: durham, net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.fb.com/D3013783

Signature: t1:3013783:1457136740:cbcd0220e82d044d25a34692793e70f5be61d63e
2016-03-04 16:28:58 -08:00
Adam Simpkins
84b5cc23ce cleanup: make test-dirsync.t pass check code
Summary: Quote ".^" arguments that check-code.py complains about.

Test Plan: Ran the tests, confirmed the check-code test no longer fails.

Reviewers: lcharignon, durham, balpert

Reviewed By: balpert

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.fb.com/D3012566

Signature: t1:3012566:1457117778:fe0bdc37c02f1aa2f2a9d97f7cdf2910794c4966
2016-03-04 13:52:11 -08:00
Ryan McElroy
b741f8bba8 morestatus: fix test output 2016-03-04 10:34:25 -08:00
Tony Tung
2e7cda45b5 [manifestdiskcache] support --repository/-R
Summary: When someone specifies a repository with --repository/-R, the working directory could be anything.  Therefore, the worker process to prune the cache needs to know which directory to switch to.

Test Plan: wrote a test case with this scenario.  fails without patch, succeeds with it.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D2991853

Tasks: 10230869

Signature: t1:2991853:1456799093:dd03ac1d003f2efd0de0bad740d4792ae81b172e
2016-02-29 22:42:04 -08:00
Ben Alpert
56e0b352ae dirsync: Behave better with already-inconsistent mirror
Summary:
If a mirror of a file is missing, dirsync now behaves better:

- When deleting the source, it allows the commit and does no mirroring since the two paths are already in sync (previously, it raised an exception when trying to delete the mirror)
- When updating the source, it creates a file in the mirrored location to match
- When updating (creating) the mirrored file, the source (which already exists) is updated too

Fixes https://www.facebook.com/groups/sourcecontrol/permalink/929877003728587/.

Test Plan: `../../hg/tests/run-tests.py test-dirsync.t`

Reviewers: #sourcecontrol, durham, lcharignon, ttung

Reviewed By: durham

Subscribers: poshannessy, mjpieters, durham

Differential Revision: https://phabricator.fb.com/D2794928

Signature: t1:2794928:1456446576:c18d06a42eb89b5168c25d048ba4fa1fa3f0c6d3
2016-02-25 16:50:43 -08:00
Tony Tung
137ac1b118 use ssh to clone repos
Summary: This allows us to differentiate between remote output and local output.

Test Plan: pass unit test

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D2955753

Signature: t1:2955753:1455918979:235a4d8ca317a0568e5d3a72d1cd1e2baf09a910
2016-02-19 14:31:18 -08:00
Tony Tung
eae40a3eac mimick our config where remotenames is not enabled on the server
Summary: On the server, we explicitly disable remotenames.  We should test that identical config here.

Test Plan: pass unit test

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D2955740

Signature: t1:2955740:1455918916:0b1d50d3855dddc579b451f036b46ea0275f2507
2016-02-19 14:24:59 -08:00
Tony Tung
7061c1092f store the pushvars in the bundle2 operation object
Summary:
The pushvars extension ensures that it precedes the hooks.
Unfortunately, that means pushrebase does not have access to the hook
variables unless it obtains the transaction.  If it does that, then the
prepushrebase step will have the lock, defeating the purpose of the hook.

By storing the pushvars in the operation, we can retrieve it without
starting the transaction.

Test Plan: passes the BYPASS_REVIEW test when it is moved to prepushrebase

Reviewers: #sourcecontrol, durham, lcharignon

Reviewed By: durham

Subscribers: durham, mitrandir

Differential Revision: https://phabricator.fb.com/D2890191

Tasks: 9872386

Signature: t1:2890191:1454526611:503a30015494eef467ad545b92077bf42cdd30d5
2016-02-18 21:32:11 -08:00
Durham Goode
6579cd0c4e tests: fix blackbox output in perftweaks test
Upstream fixed a bug with blackbox so it always flushes it's output now. This
caused some slight test changes.
2016-02-17 15:31:37 -08:00
Durham Goode
d4c8e07f8d tests: update mergedriver test with output from upstream 2016-02-17 15:22:56 -08:00
Simon Farnsworth
0776320a1c Update githelp and its tests to match show
Summary: githelp had desynced from show. Update githelp and its test case to match modern show.

Test Plan: Run the upadted test case

Reviewers: rmcelroy, lcharignon, quark

Reviewed By: quark

Subscribers: quark, mjpieters, #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2937517

Signature: t1:2937517:1455570702:8414a3f6f05736b9c728950f7019c602234f48fb
2016-02-16 04:00:21 -08:00
Jun Wu
bcd74ba1c5 rage: silence exceptions when reading details
Summary:
rage is a basic tool to collect diagnostic information that should not break.
To ensure it works all the time, this patch:

  - unbreaks hg rage from upstream change dad6404ccd
  - wraps every non-trivial functions with `try`, `catch`
  - adds a naive test about `hg rage --preview`

Test Plan:
Run `test-rage.t`. Comment out `import blackbox` and check:

```
hg blackbox -l20:
---------------------------
(Failed. See footnote [1])

[1]: global name 'blackbox' is not defined
Traceback (most recent call last):
  File "/home/quark/fb-hgext/rage.py", line 22, in _failsafe
    return func()
  File "/home/quark/fb-hgext/rage.py", line 97, in <lambda>
    _failsafe(lambda: hgcmd(blackbox.blackbox, limit=20))),
NameError: global name 'blackbox' is not defined
```

Reviewers: #sourcecontrol, wez, ttung, durham

Reviewed By: durham

Subscribers: durham, wez, mjpieters

Differential Revision: https://phabricator.fb.com/D2928778

Tasks: 10028490

Signature: t1:2928778:1455240651:d39ceed5d045e279160690e0a93a4e326d307db3
2016-02-11 21:00:33 +00:00
Simon Farnsworth
26167ac6dd show: Learn to do hg show REV FILES
Summary:
Make hg show closer in behaviour to git show - it's useful to restrict the files it examines, not just the revision

Also update githelp.py to match.

Test Plan: Run the updated testcases.

Reviewers: lcharignon, pyd, rmcelroy, durham

Reviewed By: durham

Subscribers: #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2917091

Tasks: 9323445

Signature: t1:2917091:1455240831:305be81ada4b832a9685f5bf38f3c3232c47fdfb
2016-02-12 03:07:11 -08:00
Mateusz Kwapich
654ead9d1f make smartlog not crash when having two histories in the repo
Summary:
Quick fix for smartlog to make it work when having to separate repositories in the repo.
It's not perfect (it shows the second history before master) but it's better than nothing.

Test Plan: All tests are passing . One test added.

Reviewers: #sourcecontrol, durham, ttung, ericsumner

Reviewed By: durham

Subscribers: mjpieters, durham

Differential Revision: https://phabricator.fb.com/D2904476

Tasks: 9812246

Signature: t1:2904476:1455239810:9f88d87b15646bfd107f0b1dc888804d392c35da
2016-02-11 17:31:42 -08:00
Kostia Balytskyi
dbc07b1275 smartlog: add singlepublicsuccessor template keyword
Differential Revision: https://phabricator.fb.com/D2926819
2016-02-11 07:11:59 -08:00
Kostia Balytskyi
b24461e881 histgrep: add a config option to allow histgrepping on the whole repo
Differential Revision: https://phabricator.fb.com/D2921878
2016-02-11 03:39:59 -08:00
Simon Farnsworth
c7f8da79d1 Recommend an alternative if people want -U on show
Summary: We've had a query about getting more context on hg show. While upstream is unlikely to respond well to requests for a new toplevel option, it is actually possible to use --config to get more context. Tell people about this with githelp.

Test Plan: Run the newly updated tests.

Reviewers: pyd, rmcelroy, durham

Reviewed By: durham

Subscribers: #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2916982

Tasks: 9907950

Signature: t1:2916982:1455077490:8b804e09ad656a2b5a7aca8f2e4e81da6e541806
2016-02-10 02:02:37 -08:00
Siddharth Agarwal
cde6b3242f mergedriver: make it clear that artifacts must be regenerated 2016-02-10 00:18:51 -08:00
Siddharth Agarwal
18d788d4c8 mergedriver: remove misleading text from --skip option 2016-02-10 00:14:52 -08:00
Siddharth Agarwal
5d54be8311 mergedriver: unmark driver-resolved files when skipping merge driver
Otherwise with `hg resolve --all --skip && hg resolve --mark --all`, people
could get into an unending, confusing loop.
2016-02-10 00:13:35 -08:00
Siddharth Agarwal
6f961dfc3f test-mergedriver.t: remove XXX that is no longer valid 2016-02-10 00:01:29 -08:00
Tony Tung
2226da3c6e [pull-createmarkers] fix test to match output
Test Plan: passed test

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir

Differential Revision: https://phabricator.fb.com/D2913021

Signature: t1:2913021:1454964727:a7cafa3812ef3080ebf6b811784aa4013bdfc05a
2016-02-08 15:56:50 -08:00
Mateusz Kwapich
65d396da6e adjust tests for "hg update" output change
Test Plan: tests are passing now

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D2913888

Signature: t1:2913888:1454971575:b546eab6670ed60b0d91fe649ba2c031fdf34872
2016-02-08 14:46:24 -08:00
Mateusz Kwapich
b860a46a63 mergedriver: fix tests
Test Plan: tests are passing now.

Reviewers: #sourcecontrol, ttung, sid0

Reviewed By: sid0

Differential Revision: https://phabricator.fb.com/D2913880

Signature: t1:2913880:1454971308:36b95c8b1a952940bd70e147eef0943e1f1a30c5
2016-02-08 14:44:15 -08:00
Tony Tung
0d10e34ced [pushrebase] fix bug introduced in D2903928
Summary: apparently --config 'ABC.def = gef' is not permitted.

Test Plan: passed tests

Reviewers: #sourcecontrol

Subscribers: lcharignon, mitrandir

Differential Revision: https://phabricator.fb.com/D2913001
2016-02-08 14:29:40 -08:00
Tony Tung
4c8c42fa47 [sparse] fix check-code errors in sparse
Test Plan: pass check-code

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, mitrandir

Differential Revision: https://phabricator.fb.com/D2912916

Signature: t1:2912916:1454965189:6fe65e789325ad68abf5dce8f4d2b01f9a5a95e0
2016-02-08 14:27:09 -08:00
Tony Tung
92d41175d0 [fbamend] back out D2804307
Summary: Because @sid0 backed out 5293d4f88aefeab1e9e18e8d4ce9a1298f9480cb in hg-crew, we need to back out D2804307 to match the old hash computation.

Test Plan: pass fbamend

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir, sid0

Differential Revision: https://phabricator.fb.com/D2907105

Signature: t1:2907105:1454718476:547de056470d42f3e8be3f9fc4fb1582164f2c6c
2016-02-08 10:54:41 -08:00
Will Lentz
15ab39e997 add ability to set sparse config during clone 2016-02-05 10:34:00 -08:00
Kyle Lippincott
70d306b13d tweakdefaults: support pull --rebase -d <dest> without remotenames 2016-02-05 10:02:41 -08:00
Ryan McElroy
ed15cdfb7f copytrace: skip tests if getdb.sh is not present
Test Plan: run-tests.py test-copytrace.t test-copytrace-bundle2.t test-filldb.t

Reviewers: #sourcecontrol, ttung

Reviewed By: ttung

Differential Revision: https://phabricator.fb.com/D2903427

Tasks: 9944051

Signature: t1:2903427:1454630393:5fda38cf9c6c981304cdc249e4f15cfd78f88497
2016-02-05 03:23:19 -08:00
Tony Tung
c6681e3e6d [pushrebase] change the pushrebase tests to use the PYTHONPATH setup
Summary: Just a bit cleaner.  Also this makes it so pushrebase can source any hypothetically shared code.  Mostly because I'm too lazy to type bundle2hooks=PATH_OF_FILE.

Test Plan: same unit tests pass.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: durham, mitrandir

Differential Revision: https://phabricator.fb.com/D2903928

Signature: t1:2903928:1454648999:81f6cc64f708dc4709640b2a214e1b3dbc11caa5
2016-02-04 22:47:14 -08:00
Tony Tung
942f1d6a8b fix some check-code violations
Summary:
1) Export and variable setting on separate lines.
2) 80-col.

Test Plan: python ../../hg-crew/tests/run-tests.py --with-hg ../../hg-crew/hg test-manifestdiskcache.t test-check-code.t

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, ikostia, mitrandir

Differential Revision: https://phabricator.fb.com/D2903291

Signature: t1:2903291:1454630884:b51a536e05c59a84e3ac1d1bc91e5e1952edee6f
2016-02-04 16:24:31 -08:00
Tony Tung
560631448d extract replaceclass out of manifestdiskcache
Summary: It's an useful function.  Plan to use it in another extension.

Test Plan: python ../../hg-crew/tests/run-tests.py --with-hg ../../hg-crew/hg test-manifestdiskcache.t

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, mitrandir

Differential Revision: https://phabricator.fb.com/D2896753

Signature: t1:2896753:1454542605:c660ee3e108b497c4a823bd732f98ebf5e147e02
2016-02-03 16:22:34 -08:00
Kostia Balytskyi
474ae65be3 smartlog: warn user when there is no master commit locally
Differential Revision: https://phabricator.fb.com/D2890713
2016-02-02 11:15:28 -08:00
Laurent Charignon
1d42d0d363 gitlikebookmark: remove test and extension
Summary:
This feature does not work well with inhibit, since we didn't ship it
let's remove it as the test is noisy.

Test Plan: N/A

Reviewers: #sourcecontrol, durham, ttung

Differential Revision: https://phabricator.fb.com/D2868095
2016-01-26 16:31:11 -08:00
pjb
5ab42026c5 Added githelp -- apply functionality and associated test.
Summary: githelp --apply functionality added

Test Plan: test-githelp.t updated and checked

Reviewers: cgrigoruta, rmcelroy

Differential Revision: https://phabricator.fb.com/D2841676

Tasks: 9464409
2016-01-25 05:12:54 -08:00
Durham Goode
e8fde2c226 mergedriver: update tests with simple output change 2016-01-20 13:40:15 -08:00
Eric Sumner
a08709e0e1 remove bm.write from test-pushreabse-remotenames 2016-01-20 13:40:15 -08:00
Durham Goode
5de24a9709 sparse: update test output with simple change 2016-01-20 13:40:15 -08:00
Durham Goode
245e1ddcd7 pullcreate: update test output
Upstream changed some wording.
2016-01-20 13:40:15 -08:00
Durham Goode
3a50b8338f show: fix test with new quotes
Upstream has switched to using single quotes in help text, so we need to update
our tests.
2016-01-20 13:40:15 -08:00