Commit Graph

760 Commits

Author SHA1 Message Date
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
b18929a474 [tests] ignore the .testtimes file created by run-tests.py
Summary:
Ignore the .testtimes file created by run-tests.py
This is the same ignore line used in the main hg repository's .hgignore file.

Test Plan: Ran "hg status", didn't see tests/.testtimes listed as untracked any more.

Reviewers: #sourcecontrol, rmcelroy, ttung, durham

Reviewed By: durham

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

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

Signature: t1:3014987:1457138188:066392d386341e7304b875d9e0aa3d5f4b368a6a
2016-03-04 16:39:51 -08:00
Adam Simpkins
39782c4405 dirsync: fix i18n issues reported by code
Summary: Use _() for message translation.  Without this the test-check-code-hg.t fails.

Test Plan: Ran the tests.

Reviewers: #sourcecontrol, rmcelroy, ttung, durham

Reviewed By: durham

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

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

Signature: t1:3014959:1457138229:1318ece7616fdfa719e503460291cf9a91f32242
2016-03-04 16:39:48 -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
Adam Simpkins
0e86b1b621 [morestatus] aborting a graft requires "hg update --clean"
Summary: Show that users should run "hg update --clean ." instead of just "hg update ."

Test Plan:
Ran "hg status" in the middle of a graft with unresolved merge conflicts, and
saw the updated message.

Reviewers: durham, rmcelroy

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

Differential Revision: https://phabricator.fb.com/D3002215
2016-03-02 15:14:03 -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
Simon Farnsworth
64bdea2f34 Don't crash in phrevset if Conduit fails to return a description
Summary:
We expected Phab to give us a description. It doesn't if the commit isn't yet landed; fix the bad assumption.

Fixes T10202515

Test Plan:
Run

```
: /data/users/simonfar/fbsource (hg) [remote/fbcode/stable]
: simonfar@devvm631  $ hg --config extensions.phrevset=~/fb-hgext/phrevset.py show D2677961
Commit not found - doing a linear search
```

Because this isn't a landed commit, it won't find it - but it will no longer crash.

Reviewers: rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters, #sourcecontrol

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

Tasks: 10202515

Signature: t1:2983019:1456519582:07c44ec9c3794259d290210cfa730107b9a5cd11
2016-02-26 15:09:16 -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
Ryan McElroy
0a9b42e35e remove dangling hg symlink
Summary: There is no hg here.

Test Plan: run tests

Reviewers: #sourcecontrol, ttung

Reviewed By: ttung

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

Signature: t1:2906316:1454702180:44fddec8f1b74d7dd4e43289f44d55b1b31b134f
2016-02-24 00:44:15 -08:00
Laurent Charignon
81f91c3b39 phabstatus: don't query phabricator is smartlog has no revision with diff
Summary: See https://our.intern.facebook.com/intern/tasks/?t=10060014

Test Plan: Tests pass

Reviewers: #sourcecontrol, ttung, quark

Reviewed By: quark

Subscribers: quark, mjpieters, victorl

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

Tasks: 10060014

Signature: t1:2938055:1455617452:4fd48f23aa51c193d9717a17081810ca6a01b349
2016-02-23 09:24:58 -08:00
Martijn Pieters
6b0a004e17 smartlog: switch to using a sort key
Summary:
Using a sorting key is faster than using `cmp`, because a Schwartzian transform
needs only be applied once per value, not for each and every comparison.

Test Plan: ../../hg/tests/run-test.py test-smartlog*

Reviewers: pyd, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters

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

Signature: t1:2943952:1455736911:b10314e52850b01e39023bd4af4176316eaa7aa5
2016-02-23 14:22:05 +01: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
Kostia Balytskyi
7c83af7183 pullcreatemarkers: don't create unnecessary metadata
Differential Revision: https://phabricator.fb.com/D2948852
2016-02-18 06:50:46 -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
282f5e7368 smartlog: fix check code error 2016-02-17 15:27:22 -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
Mateusz Kwapich
aede6b9ffb smartlog: add comment 2016-02-13 14:28:59 -08:00
Tony Tung
d6443858d8 [manifestdiskcache] include module in release
Summary: Does not actually enable it, but makes it available for inclusion.

Test Plan: none

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

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

Tasks: 9946818

Signature: t1:2933112:1455310426:953eebc293985d545ef9ff541231e33d8061a795
2016-02-12 13:39:46 -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
Mateusz Kwapich
9771b5695b reset: fix the evolve call
Summary: .

Test Plan: test-reset.t is passing now

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2925005
2016-02-10 16:44:25 -08:00
Tony Tung
5752463890 [bundle2hooks] fix typo for extutil
Summary: it's extutil not ext2util.  Probably mistyped because of bundle2hooks.

Test Plan: visual

Reviewers: #sourcecontrol, mitrandir

Reviewed By: mitrandir

Subscribers: mitrandir

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

Signature: t1:2924507:1455147871:5cbc29978ebb7ff0a903f53e2acc91f78735b4d4
2016-02-10 15:46:24 -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
e1c9a953b7 pushrebase: change supportedversions to supportedoutgoingversions
Summary: the api changed once again

Test Plan: tests are passing now

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

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

Signature: t1:2913893:1454971559:052b0a2b20dfde337a74991f0ddb9498f08a9cb0
2016-02-08 14:47:54 -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
0d0bfa9b21 point symlink to the right place
Summary: supercedes https://phabricator.fb.com/D2906316, i believe.

Test Plan: check-code

Reviewers: #sourcecontrol

Subscribers: mitrandir

Differential Revision: https://phabricator.fb.com/D2912920
2016-02-08 14:27:32 -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
Kostia Balytskyi
c32c5f4b4c pullcreatemarkers: add landed attribute to markers
Summary:
Further goal is to make smartlog be able to display "landed as smth"
near local commits that has been landed. smth may be either the hash
of public rebased commit pulled from server or a phabricator diff id.

Differential Revision: https://phabricator.fb.com/D2908465
2016-02-08 09:54:52 -08:00
Durham Goode
c79d639b8a sparse: add missing return statements
A few spots were not returning the original value. This was probably fine since
they didn't have return values anyway, but it's unclean not to return anyway.
2016-02-05 11:12:41 -08:00
Will Lentz
15ab39e997 add ability to set sparse config during clone 2016-02-05 10:34:00 -08:00
Ryan McElroy
2fe9ba2b80 chistedit: appease check-code 2016-02-05 10:24:50 -08:00
Steve Fink
a2564eb751 chistedit: allow running histedit with c or C, to better match crecord 2016-02-05 10:13:51 -08:00
Steve Fink
f5a8931efa chistedit: show direction of fold and roll with caret 2016-02-05 10:13:51 -08:00
Steve Fink
60ebc07b0d chistedit: expand help text 2016-02-05 10:13:51 -08:00