Summary:
Create an extension that allows shell variables to be passed to the
server via command line option. When pushing with the following command:
hg push --pushvars "DEBUG=1"
will make HG_SCM_DEBUG=1 available to the hooks. Note the prepending of HG_SCM_
Test Plan: Run run_tests
Reviewers: pyd, rmcelroy, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1991994
Tasks: 4841351
Signature: t1:1991994:1430417209:9a05fb11f9ecdeab3a1d89cf331014dafe7d959f
The remotefilelog extension just passes the ctx.rev() it was given down to
sparse. Sometimes this value is None. In this situation we would previously puke
(we expected calls to be repo.sparsematch() instead of repo.sparsematch(None)).
This change fixes that by allowing repo.sparsematch(None).
Summary:
This adds an extension which will allow a user to specify commit 'extras' from
the command line. This will allow our repo sync script to include extra metadata
in the commits.
For instance, this is required in order to not lose git's committer info when
syncing into mercurial (which is required in order to make sure two commits with
the same content but different committers will produce a different hash in
Mercurial).
Test Plan: Added a simple test
Reviewers: pyd, lcharignon, mpm, sid0, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2027341
Signature: t1:2027341:1430255572:6866d0ba5564ca977c8fce41e55988883e15ce5b
Summary:
With the new evolve+inhibit ecosystem, we want to allow amend and amend --rebase
to continue working even when evolve is on. Let's move the evolve check to be
inside the amend command, and only complain when we see the evolve commands
enabled.
Test Plan: Added a test
Reviewers: lcharignon, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2033649
Signature: t1:2033649:1430346833:3116b704e49f634709a6fea32e217b94e731b96f
Summary:
When using evolve with the inhibit extension, calling a revset can change the
changelog (since which revs are filtered can change). This affects smartlog
because it tries to cache the changelog functions early on, and there operates
on an old changelog.
Fix this by caching the changelog functions after we've performed the revset.
Test Plan: hg sl -r '<hidden commit> + .'
Reviewers: lcharignon, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2033643
Signature: t1:2033643:1430357541:21c7a8c07ea8d145af4db40b835a3309239bbe6a
Summary:
The smartlog rev option wasn't resolving names right because it used
the wrong internal api. Fixes that.
Test Plan: Adds a test
Reviewers: lcharignon, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2033646
Signature: t1:2033646:1430346864:be69cfb5fe3892f51340546b1fbb341fabfffe14
Test Plan: Updated tests, ran tests many times with no more failures
Reviewers: ttung, durham, mitrandir, #sourcecontrol
Reviewed By: durham, mitrandir, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2003040
Signature: t1:2003040:1430327993:b5b439becb928f45a7594fb727b1335f95f992d0
Summary:
We want to be able to more seamlessly update sparse profiles when adding files.
This patch adds a `--sparse` flag to `hg add` that ensures the directory of the
added file is included in the sparse profile.
Test Plan: updated test
Reviewers: ttung, durham, #sourcecontrol
Reviewed By: durham, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2003039
Tasks: 6733090
Signature: t1:2003039:1430327770:295f1ac9960ca9dcb4ce84f76458faad68106272
Summary: this will be used in an upcoming diff
Test Plan: ran tests
Reviewers: ttung, #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Differential Revision: https://phabricator.fb.com/D2003035
Summary:
My migration of gitlookup to not use b2x was too aggressive. Since the
servers still only respond to b2x, let's keep them as b2x where applicable.
Test Plan:
Ran the tests with the new mercurial (and in some cases with the old
as well).
Reviewers: pyd, sid0, rmcelroy, lcharignon, ericsumner
Differential Revision: https://phabricator.fb.com/D2016082
Summary:
hgwatchman keeps a hash of the ignore matcher. Since we wrap the ignore
matcher to simulate a sparse checkout, we need to provide a hash that changes
as well.
Test Plan:
Adds a test. Verified the test failed without the change, and passed
with it.
Reviewers: rmcelroy, lcharignon, ericsumner, sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D2022219
Signature: t1:2022219:1429912457:51bf4677e1894ecca6da47a9fa6c4110f132c937
Summary:
The hgwatchman extension relies on being able to compute a hash for the ignore
matcher. Let's add hash functions to all our matcher wrappers. Once the
upstream code freeze is over we'll move some of this up into mercurial core.
Test Plan: This gets exercised by a test in a future patch
Reviewers: rmcelroy, mitrandir, lcharignon, ericsumner, sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D2022211
Signature: t1:2022211:1429912406:0be0dc280c8b3f465006eb79fb596c0c9b833342
Summary:
Previously we replaced dirstate.ignore with a function that acted like a
matcher. It turns out that the hgwatchman extension relies on dirstate.ignore
being a matcher for computing hashes.
This changes our wrapping to use a matcher instead. In a future patch we'll add
a hash function to allow hgwatchman to continue to work.
Test Plan: This gets exercised by a test in a later diff.
Reviewers: rmcelroy, mitrandir, lcharignon, ericsumner, sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D2022208
Signature: t1:2022208:1429912354:588071e4930c81b36789bc84e9e00de788eaeda7
Summary:
There was a bug where if you included 'dir1/dir2/' in your sparse checkout, then
status would not show newly added files in that directory. The problem is that
dir1 is considered ignored, so the status walker would not walk down dir1.
The fix is to explicitly match subdirectories of specified include patterns.
Test Plan: Added a test
Reviewers: pyd, rmcelroy, lcharignon, sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D2021037
Tasks: 6773875
Signature: t1:2021037:1429899282:3e305afa9ed395473dbe11d80abc43becb9eaa4a
Summary:
Previously, reseting to bookmarks with '-' in the name did not work. We need to
use scmutil.revrange instead of repo.revs to make this happen correctly.
Test Plan: Added a test
Reviewers: ericsumner, rmcelroy, pyd, lcharignon, sid0
Reviewed By: sid0
Subscribers: dreiss
Differential Revision: https://phabricator.fb.com/D2021737
Signature: t1:2021737:1429906581:c8deaf61920fad5fd9c9faea16b867685d3be7ad
Summary:
Upstream has removed all the b2x flags, so let's do the same to pushrebase. Also
fixes pushrebase's use of manifest._intersectfiles() which has been removed
upstream (in favor of a matcher).
The tests had a bunch of hardcoded hooks which were very messy and became
impossible to maintain when upstream changed what args were passed. Let's just
get rid of all that noise.
Test Plan: Ran the tests
Reviewers: sid0, rmcelroy, lcharignon, ericsumner, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2003033
Signature: t1:2003033:1429832524:c0de8ebea7e6348ba9b55c109ca71bb3a301b625
Summary:
Since hg grep and git grep are similar for basic usage (pattern first and then
paths), just copy all the git arguments to the suggested hg command.
Test Plan: Test added to test-githelp.t
Reviewers: rmcelroy, durham
Reviewed By: durham
Subscribers: elenapr
Differential Revision: https://phabricator.fb.com/D2009460
Tasks: 6524222
Signature: t1:2009460:1429647852:2bfaf32b8c7849e948e5da03989fad32c1b06780
Summary:
Upstream has finalized bundle2 and removed the experimental flags. So let's
upgrade along with it.
Test Plan: Ran the tests
Reviewers: sid0, rmcelroy, lcharignon, pyd, ericsumner
Differential Revision: https://phabricator.fb.com/D2003046
Summary:
Upstream has removed the experimental flag from bundle2, so we need to update
getgitmeta to use the new form.
Test Plan: Ran the tests
Reviewers: sid0, rmcelroy, lcharignon, pyd, ericsumner
Differential Revision: https://phabricator.fb.com/D2003041
Summary:
The command `git checkout foo` uses a heuristic to determine whether to treat
'foo' as a revision or a path. We try to mimic that behavior as best we can, but
there will still be corner cases where it does not work.
In particular, if there is a file that is present in a previous revision but not
the current one, this will incorrectly assume that it's a revision.
Test Plan:
Added tests to make sure that it behaves properly for untracked files, tracked
files, deleted files, removed files, and names which are both revisions and
files.
Reviewers: durham, sid0, mitrandir, rmcelroy
Reviewed By: rmcelroy
Subscribers: elenapr
Differential Revision: https://phabricator.fb.com/D1996393
Tasks: 6751516
Signature: t1:1996393:1429306520:2f13c194a8fe2a721bac501c5479250b2afe3f9e
Summary:
Adds a --sparse option to log that limits the output to commits that
affect the working copy.
Test Plan: Added a test.
Reviewers: sid0, lcharignon, pyd, ericsumner, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2002484
Signature: t1:2002484:1429299577:a66f88157acc7136be9fe3b60f7fb02f830ae447
Summary:
Upstream histedit has moved all it's actions to classes. Let's do the same for
exec.
Test Plan: Ran tests
Reviewers: sid0, rmcelroy, lcharignon, ericsumner
Differential Revision: https://phabricator.fb.com/D2001833
Summary:
Upstream histedit has moved all it's actions to classes. Let's do the same for
stop.
The hashes change because upstream changed graft to include a little more
information in the commit metadata.
Test Plan: Ran tests
Reviewers: rmcelroy, sid0, lcharignon, pyd, ericsumner
Differential Revision: https://phabricator.fb.com/D2001830
Summary:
Upstream has changed the pathcopies signature to include a matcher, so we need
to do the same.
Test Plan: Ran tests with new hg
Reviewers: rmcelroy, sid0, lcharignon
Differential Revision: https://phabricator.fb.com/D2001829
Test Plan: ran it locally with chef_tested devbox and D2002135
Reviewers: durham, ericsumner, mitrandir, sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D2002175
Signature: t1:2002175:1429295959:535d264ebd9a2d23c8e1eebefb313b1654f28196
Summary: Now that we have it, we wants it deployable
Test Plan:
ran setup.py install --prefix=/tmp/babar/
The file was there!
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D1990894
Summary: Soemone noticed that this was missing
Test Plan: updated test
Reviewers: sid0, mitrandir, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1994587
Tasks: 6773162
Signature: t1:1994587:1429116229:64c8d9bcca1f7de7566d5a53e5f822e1658c1758
Summary:
This extension will let use change bundl2 in core while still supporting old
client and server for a week or two.
Test Plan: I've running it for a day, I can successfully pull and push to server using HG2Y.
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D1973281
Summary:
Now that we store a list of temporarily include files, and the ability to
clean them up, we now add the logic to add them in the first place. This watches
the actions provided by calculateupdates and adds any missing files to the
sparse checkout temporarily
Mucking with the dirstate and files on disk in the middle of calculateupdates
seems a little risky, but it seems to work.
Test Plan: Added new tests that require bringing in non-sparse changes as part of the merge. Tests both the merge and rebase scenarios, using both normal checkouts and profiles.
Reviewers: sid0, pyd, lcharignon, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D1982951
Signature: t1:1982951:1428636508:e5bcf4e6fbd635d49ff1ce7a90e9b5e1378537c9
Summary:
If a commit or update happens, check if the working copy is clean, and if it is,
delete all the temporarily included files. This calls hg status, which may have
perf implications, but since we're dealing with sparse checkouts, hopefully it
won't be too bad for now.
Test Plan: Ran the tests
Reviewers: sid0, pyd, lcharignon, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D1982949
Signature: t1:1982949:1428635990:29ddacdf3f32a38ce0e725ed9db7e13e98e0f21e
Summary:
Now that we store a list of temporary included files, add them to the sparse
matcher using our new forceincludematcher.
Test Plan: Ran the tests
Reviewers: sid0, pyd, lcharignon, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D1982948
Signature: t1:1982948:1428635825:b8d2dcd94df5d75946b96cf2ac1ad29691d54066
Summary:
The tempsparse file can now be used to contain a list of files that should be
temporarily included in the sparse checkout. This is useful for bringing in
merge conflicts to be dealt with.
Future patches will populate and prune the set of temporary includes.
Test Plan: Ran the tests
Reviewers: sid0, pyd, lcharignon, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D1982947
Signature: t1:1982947:1428635211:e92ed0b48aed55217dac1b864214f924dc672828
Summary:
Previously I just returned a function as the matcher in certain cases. This
failed in a bunch of places because Mercurial expects the matcher to have
functions on it like isexact() and always(). Let's switch to a matcher class
that does the same thing.
Also add a new matcher that will be used to force certain files to always return
true. This will be useful for temporarily adding certain files to the working
copy during a merge.
We may want to send these kinds of things upstream once they're more robust.
Test Plan: Ran the tests
Reviewers: sid0, pyd, lcharignon, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D1982945
Signature: t1:1982945:1428634767:613984f99be8bdc05f82bae11cf4ee28d5922ac1
Summary:
As part of a larger refactor, I did some minor fix ups. In one case I change the
default value from [] to set(), because the non-default values are set()
already, so this makes it more consistent.
In the other case I just moved something into a better scope for readability
since I'll be adding a very similar piece of code later.
Test Plan: Ran the tests (though this code path is unused right now)
Reviewers: sid0, pyd, lcharignon, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D1982943
Signature: t1:1982943:1428634617:b3449acd6bc08c53daf1de7be8f44f0dc543ef1c
Summary: Treat all arguments after -- as path arguments.
Test Plan: Several test cases added to tests/test-githelp.t
Reviewers: rmcelroy
Reviewed By: rmcelroy
Subscribers: elenapr
Differential Revision: https://phabricator.fb.com/D1988585
Tasks: 6199146
Signature: t1:1988585:1428960924:02ad487b9e17fecd7e98c045eeb01d8420247d33
Summary:
Suggest 'hg amend' because it does not pull up an editor, whereas 'hg commit
--amend' does.
Test Plan: Added test cases to tests/test-githelp.t to test for desired behavior.
Reviewers: rmcelroy
Reviewed By: rmcelroy
Subscribers: elenapr
Differential Revision: https://phabricator.fb.com/D1987860
Tasks: 6199146
Signature: t1:1987860:1428949599:cdc1d66426ea343a7b0ed1bfcc2d28cbb685810d
Summary: Previously, we would discard a message with passed to hg amend.
Test Plan: added a test
Reviewers: sid0, ericsumner, durham, #sourcecontrol
Reviewed By: durham, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D1973794
Tasks: 6705470
Signature: t1:1973794:1428457860:68075660f34eff2c757757aad9ca11fb5ae040c0
Summary:
Previously, hg update would fail if your sparse profile was not present in the
destination of the update. This had the affect of preventing users from rebasing
newly created sparse profiles. Let's allow it (with a warning). This will allow
them to perform the rebase as long as all of the files they've changed exist in
the other sparse rules they have enabled. If they have no others, the sparse
profile will revert to a full checkout.
Test Plan: Added a test
Reviewers: rmcelroy, pyd, lcharignon, sid0
Reviewed By: sid0
Differential Revision: https://phabricator.fb.com/D1967834
Signature: t1:1967834:1428106927:04ef3a91a0f9f57f0a917d3a48e62e5e38341264
Summary: The `intersectfiles` API changed.
Test Plan: ran the tests
Reviewers: ericsumner, #sourcecontrol
Reviewed By: ericsumner, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D1966309
Tasks: 6619970
Signature: t1:1966309:1428086453:415a185b71af4812de2f5b6690a5337a5950aab6
Summary: githelp: add git rebase --skip
Test Plan: Wrote and ran test
Reviewers: mathieubaudet, rmcelroy, sid0
Differential Revision: https://phabricator.fb.com/D1946751
Summary: Bug fixed by enclosing raw array remove with try-except block.
Test Plan: Run /tests/run-tests.py . It should finish without errors.
Reviewers: rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, sigmix
Differential Revision: https://phabricator.fb.com/D1927784
Tasks: 6463098
Signature: t1:1927784:1426810833:b9a549d41eaaa55c420b480018298b725cc69aaf
Summary:
A ton of tests in the 'default' branch are broken, yet they all work in 'fbonly' (because that's what we test and push).
Let's give the world all of our goodness. Bleeding edge is where it's at.
Top of hg sl now looks like:
```
@ 386a20 rmcelroy
|\ merge fbonly into default
| |
o | a284c7 rmcelroy D1880107 remote/@
| | githelp: add: mention that record and crecord make commits
| |
| o f4870a sid0 remote/fbtip fbonly
| | crecord: update to latest default
```
Test Plan: run-tests.py actually works now
Reviewers: davidsp, ericsumner, mitrandir, akushner, durham, sid0
Reviewed By: durham
Subscribers: lcharignon, mpm, ps
Differential Revision: https://phabricator.fb.com/D1883891
Signature: t1:1883891:1425613263:8c199f339596384aa7d089154ef99eb982ecff87