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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.