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.
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
Summary:
Some bundle2 handlers (such as pushvars) run prior to the acquisition of the lock. In order to have those handlers be able to set hook variables, we have to save the hook variables onto the bundle object, rather than the transaction object.
Once the transaction is retrieved, we drain all the hook arguments into the transaction. Further attempts to call `addhookargs will cause an abort.
An alternative to aborting is to save the transaction, and pass further arguments to the transaction. I believe this is an inferior choice because it is masking a bug.
Test Plan: run ./verify_reviewedby_info.t in opsfiles with D2880506 patched in. passed.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: durham, mitrandir
Differential Revision: https://phabricator.fb.com/D2898401
Signature: t1:2898401:1454615031:94933cf513eaa06c5b60686ec5d65a563ddc31c4
Summary:
Upstream has changed _packermap to be hidden behind supportedversions(). We need
to use that, otherwise we'll potentially reply with the wrong changegroup type.
Test Plan: Ran the tests
Reviewers: mitrandir
Differential Revision: https://phabricator.fb.com/D2903217
Summary:
This facilitates moving automv out of this repository to Mercurial proper.
Use extensions.afterloaded() to avoid relying on module load order.
Test Plan: Run the test suite with ../../hg/tests/run-tests.py
Reviewers: rmcelroy, durham
Differential Revision: https://phabricator.fb.com/D2896456
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
Summary:
I've written it sometime ago and it's not being shipped yet because I forgot to
add it to setup.py
Test Plan: no plan
Reviewers: #sourcecontrol, durham, ttung, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2887171
Signature: t1:2887171:1454413837:4a57fc8bccfe840c5540e0db59881af2bea21e45
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
Summary:
This works because it is fast to compute drafts thanks to the phase computation
in C.
After the change
$ ~/repos/hg/hg perfrevset "smartlog()"
! wall 0.004146 comb 0.000000 user 0.000000 sys 0.000000 (best of 666)
Before the change
$ ~/repos/hg/hg perfrevset "smartlog()"
! wall 0.008009 comb 0.010000 user 0.010000 sys 0.000000 (best of 344)
Test Plan: No functionality change, everything works
Reviewers: #sourcecontrol, ttung, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2857375
Signature: t1:2857375:1453507337:0eb672959370fe21d62d18afe07c5f75b11e29a8
Summary:
When converting a Diff number to a revset, phrevset would do a linear scan of the repo history for the most recent appearance of that Diff number (slow if it's an older commit or not present in this repo) and in parallel, query Phabricator Conduit to try and shortcut the process.
Unfortunately, if Conduit was quicker than the linear scan, we would crash because we can't handle a Conduit response for hg commits made when a Diff lands, or for any repo that doesn't have a callsign in hgrc.
Fix the crashes; don't bother calling Conduit if we can't handle any reasonable answer, and teach the hg branch to handle all reasonable answers.
Test Plan:
Check that the new extension does linear search unconditionally when it lacks a callsign:
```
: /data/users/simonfar/fbsource (hg) [90234606e65a2a04d042caba7cf5ee85a7a5466e]
: simonfar@devvm631 $ hg --config extensions.phrevset=/data/users/simonfar/fb-hgext/phrevset.py log -r D2750128
phrevset.callsign is not set - doing a linear search
changeset: 3c0e6756bed4d7330391719bcde52e7490499e53 D2750128
user: Yuhan Guo <yhguo@fb.com>
date: Thu, 07 Jan 2016 00:19:23 -0800
```
Check that it doesn't do a linear search in a repo with a callsign:
```
: /data/users/simonfar/www-hg (hg) [webacademy-graphql]
: simonfar@devvm631 $ echo -e '[phrevset]\ncallsign=E' >> .hg/hgrc
: /data/users/simonfar/www-hg (hg) [webacademy-graphql]
: simonfar@devvm631 $ hg --config extensions.phrevset=/data/users/simonfar/fb-hgext/phrevset.py log -r D2704940
changeset: 4b24ee6737b7e36523eb24c6406d689cc54aadf9 D2704940
user: xifanyan@2c7ba8d8-a2f7-0310-a573-de162e16dcc7
date: Mon, 30 Nov 2015 23:38:18 -0800
```
Check that it aborts cleanly if you give it a Diff from a different repo in a repo with a known callsign:
```
: /data/users/simonfar/www-hg (hg) [webacademy-graphql]
: simonfar@devvm631 $ hg --config extensions.phrevset=/data/users/simonfar/fb-hgext/phrevset.py log -r D2750128
abort: Diff callsign 'FBS' is different from repo callsign 'E'
```
Check that linear scan eventually aborts cleanly if you give it a Diff from a different repo (note: this step is slow - over a minute on my devvm):
```
: /data/users/simonfar/fbsource (hg) [90234606e65a2a04d042caba7cf5ee85a7a5466e]
: simonfar@devvm631 $ hg --config extensions.phrevset=/data/users/simonfar/fb-hgext/phrevset.py log -r D2704940
phrevset.callsign is not set - doing a linear search
abort: Could not find diff D2704940 in changelog
```
Reviewers: #sourcecontrol, rmcelroy, ttung, lcharignon
Reviewed By: lcharignon
Subscribers: lcharignon, kanishkparihar
Differential Revision: https://phabricator.fb.com/D2844832
Tasks: 9723813, 9714886
Signature: t1:2844832:1453321767:f445447d8187b4be22db3065ba316e6aa461f757
Summary: This change is done so that important extension wrapping is not skipped while creating a bundle. Using bundlerepository, some extensions were getting skipped. Extensions like inhibit would fail without this change.
Test Plan: I ran pushrebase test and it failed with Attribute Error in newmancache._order = collections.deque(oldmancache._order). It failed without the changes made in this diff as well. Also, when I ran all the tests, some of them failed due to not having getdb.sh, which isn't related to this change.
Reviewers: #sourcecontrol, ttung, pyd, lcharignon, rmcelroy
Reviewed By: rmcelroy
Subscribers: durham, lcharignon, ericsumner, mitrandir, trunkagent, pyd, rmcelroy
Differential Revision: https://phabricator.fb.com/D2838849
Tasks: 7916714
Signature: t1:2838849:1453299050:142328bf8f0dbc8814cd3bd25ac47714c4bf99d7
Summary:
dirstate.copy can get None as a first argument and it is a valid case.
Before this patch, we were crashing in match.py because we didn't expect
matching against None.
Test Plan:
Not sure how to easily test that without introducing a dependency on
evolve as uncommit helped us uncover the bug in the first place. I checked
manually that the line was correct.
Reviewers: #sourcecontrol, ttung
Differential Revision: https://phabricator.fb.com/D2834249