Summary:
I realized that a test I wrote affects the tests later in the test suite because
it cd's into a directory and does not cd out. This fixes that.
Depends on D2171752
Test Plan: run tests
Reviewers: durham, rmcelroy
Reviewed By: rmcelroy
Subscribers: pawelbara
Differential Revision: https://phabricator.fb.com/D2172941
Signature: t1:2172941:1434735023:70a829cf4eede8e5aa909d10995bfd5d823b9cb6
Summary:
'git show' now corresponds to 'git diff -r .^' for paths.
For everything else it still resolves to 'git export'.
Test Plan: take a look at the unit tests.
Reviewers: marcelo, durham, rmcelroy
Reviewed By: rmcelroy
Subscribers: nmote, durham, rmcelroy, owenc
Differential Revision: https://phabricator.fb.com/D2171752
Tasks: 6860395
Signature: t1:2171752:1434682344:cf1af959e0da788efa0a526459ee64590b09a00e
Summary:
Before this patch: hg githelp -- reset HEAD~ returned hg reset .~ which was
wrong. With this patch it retuns hg reset .~1.
Test Plan: added a test
Reviewers: mitrandir, durham
Subscribers: scottf
Differential Revision: https://phabricator.fb.com/D2166551
Summary:
Before this patch, we were displaying one directaccess warning per repo.
With this patch we display only one warning for the lifetime of the hg process.
Test Plan: checked manually
Reviewers: pyd, mitrandir, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D2165815
Tasks: 7403121
Signature: t1:2165815:1434578693:fc471d67aa0f567fa234b020827a68673364d870
Summary:
Reset didn't use scmutil to parse revision number given on the command line.
Inhibits plugs in the scmutil logic to enable direct access and therefore reset
was not benefiting from it. This caused the revive logic in reset to create
a new commit instead of reusing the old one.
Test Plan: Added test
Reviewers: durham, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2032910
Tasks: 6696106
Signature: t1:2032910:1430339529:47e2c7d7c2ea76e4ab1114e7215e8517ee9f4356
Summary:
Previously we would have to decompress the entire manifest to check if each
sparse profile existed. This slowed hg status down by 500ms (2x).
This patch adds caching when simplecache is enabled.
Test Plan:
Added a test. Also tried it in fbsource. Verified repeated hg
status's did not parse the manifest
Reviewers: rmcelroy, ericsumner, lcharignon, akushner, mitrandir
Differential Revision: https://phabricator.fb.com/D2158178
Summary:
1) moves the memcache prefix part of the key into mcget and mcset, so callers
don't have to care about it.
2) added a stringserializer for storing simple strings
3) removes _ from _memoize so it can be used by other extensions
4) moves key version into memoize function
Test Plan: Ran the tests
Reviewers: rmcelroy, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2158102
Summary:
inhibit: fix plan for evolve users
As @sid0 pointed out, this was missing from the help message
Test Plan: N/A
Reviewers: durham, sid0, pyd
Subscribers: sid0
Differential Revision: https://phabricator.fb.com/D2160236
Summary:
The dirstate wrapping functions were being run as part of reposetup, which
caused them to be wrapped multiple times, resulting in it exceeding the stack
size in some cases.
This moves the dirstate wrapping to be at extsetup time.
Test Plan:
histedit in facebook-hg-rpms used to break with stack overflow
errors. Now it doesn't. It seems the issues is more likely in repos with lots of
subrepos.
Reviewers: rmcelroy, ericsumner, lcharignon, pyd
Differential Revision: https://phabricator.fb.com/D2152047
Summary:
Having a simple on disk cache is useful in some cases, like when it can prevent
us from having to read a full manifest. Let's add local caching support to
simplecache.
Test Plan:
Added a test
Perf numbers for a basic export
no cache=0.7s
local only=0.46s
memcache only=0.48s
memcache+local=0.48s
local+memcache=0.46s
Reviewers: ericsumner, lcharignon, sid0, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2149605
Signature: t1:2149605:1434139712:c8a524ece9bdd91dca122e1305e81aa02912a8d9
Summary:
There can be situations where the sparse extension has run uisetup, but the repo
object doesn't have sparse enabled so it doesn't run reposetup. We need to make
sure all the work uisetup does can condition on whether reposetup has done it's
work or not.
Test Plan: Added a test
Reviewers: lcharignon, pyd, ericsumner, sid0, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2129966
Signature: t1:2129966:1433522840:90029011ac8bbb2e1efbaf9fb317c1e55aa18737
Summary:
Previously, if you did 'hg reset .' it would invalidate the entire dirstate,
making every entry 'lookup' so it had to read the entire working copy on the
next run. This fixes that.
Technically this is a bug in core mercurial since rebuilddirstate() should
invalidate anything if an empty list is passed.
Test Plan: Added a test
Reviewers: pyd, lcharignon, sid0, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2129095
Signature: t1:2129095:1433520638:e05ee86dedcc9f87d5c3fd65e3e2374ecbac5dfb
Summary: inhibit: add extension to warn evolve beta users
Test Plan:
Checked with and without cutoff date set in hgrc that the message
is displayed when it has to.
Reviewers: durham, pyd
Differential Revision: https://phabricator.fb.com/D2080693
Tasks: 6634899
Summary:
fbamend: use strip.strip instead of repair.strip
This allows fbamend to work better with evolve as evolve overrides the command
strip.strip to prune.
Test Plan: Changed test and ran it.
Reviewers: durham, pyd
Differential Revision: https://phabricator.fb.com/D2082137
Summary:
backups: make hg backups evolve aware
With this patch: hg backups urges evolve user to look at hg reflog to recover
hidden commits. This is because evolve's commands are using obsolescence
markers to hide commits instead of stripping them.
Test Plan: Cross repo dependency, not sure how to make an automated test
Reviewers: durham, pyd
Differential Revision: https://phabricator.fb.com/D2088486
Tasks: 6534705
Summary:
This copies a bunch of logic from ##gitrevset.py## which should allow the
##fbconduit## extension to be a complete replacement for ##gitrevset##.
Overall, execution times are comparable for the revset and will be much
better for the template (assuming >20% cache hit rate)
Test Plan:
hg log -r 'gitnode("32cb236d579acb48668f8575205c0611b859e883")' -T '{node}\n'
hg log -r 'g32cb236d579acb48668f8575205c0611b859e883' -T '{node}\n'
hg log -r 'master~50::master' -T '{gitnode}\n'
Reviewers: #sourcecontrol, sid0
Reviewed By: #sourcecontrol, sid0
Subscribers: sid0
Differential Revision: https://phabricator.fb.com/D2074214
Summary:
There was a bug where rebasing a commit that contained a file that was not
currently in the working copy would cause an exception. This is because the
'temporarily include a file' logic tries to bring the file back to life
immediately, regardless of if the file actually exists yet or not (it may be an
incoming file from the upcoming merge, so it doesn't exist yet).
Test Plan: Added a test
Reviewers: sid0, rmcelroy, pyd, lcharignon
Reviewed By: lcharignon
Differential Revision: https://phabricator.fb.com/D2083802
Signature: t1:2083802:1432075849:7a90c94a97322ca619d481477fcc8812e7a26e93
Summary:
The master revset config was not using scmutil.revrange/revsingle so it wasn't
able to handle bookmark names like 'foo-bar'. Let's use them.
Test Plan: Added a test
Reviewers: rmcelroy, sid0, lcharignon, ericsumner
Differential Revision: https://phabricator.fb.com/D2082328
Tasks: 7116971
Summary:
phrevset: fix because of changes in core
Core changed the definition of stringset, it broke git and phabricator revset
that we define in fb-hgext. This is the same fix than the one we did for
the git revset.
Test Plan: N/A
Reviewers: durham, mitrandir
Differential Revision: https://phabricator.fb.com/D2065005
Summary:
Bookmarks apis are changing in core, need to update these extensions to not
break across that change.
Test Plan: ran tests against current and latest hg with bookmarks patches applied.
Reviewers: #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Differential Revision: https://phabricator.fb.com/D2059856
Summary:
We changed the way stringset work in core and we need to update our wrapping
in gitrevset. All the tests pass with this patch.
Test Plan: All tests are passing now
Reviewed By: pyd
Reviewers: durham, pyd
Differential Revision: https://phabricator.fb.com/D2055557
Summary:
Instead of wrapping the system histedit, lets wrap the one that was loaded by
mercurial. This makes it easier to test fbhistedit against development versions
of histedit.
Test Plan:
Ran a histedit with --config extensions.fbhistedit=/data/... --config
extensions.histedit=/data/... and verified fbhistedit wrapped the custom
histedit. Also ran the tests.
Reviewers: davidsp, rmcelroy, sid0, lcharignon, pyd
Differential Revision: https://phabricator.fb.com/D2040653
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