Summary: Test mirrornode and gitnode as a rev selector.
Test Plan: passed unit tests. D2246978 is required for these tests to pass.
Reviewers: lcharignon, rmcelroy, durham, ericsumner
Reviewed By: ericsumner
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2246986
Signature: t1:2246986:1436993629:3098c741aabaeeccb81e4e9c03c36c6435c3ccf0
Summary: Exercises the existing fbconduit functionality in a unit test.
Test Plan: it runs!
Reviewers: lcharignon, rmcelroy, durham, ericsumner
Reviewed By: ericsumner
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2244924
Signature: t1:2244924:1436983026:d743d67c90138f4b6f4eeddc96abf5f89f4d0287
Summary:
Built a http server that serves as a mock fbconduit server. It
answers the normal requests that fbconduit makes, as well as:
PUT /from_repo/from_scm/to_repo/to_scm/from_hash/to_hash
DELETE /from_repo/from_scm/to_repo/to_scm/from_hash/to_hash
Test Plan: used in later diffs
Reviewers: lcharignon, rmcelroy, durham, ericsumner
Reviewed By: ericsumner
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2244917
Signature: t1:2244917:1436982657:bde0c04ea21299970dfb782b43ed13ab1f3e17b0
Summary:
Previously pushrebase could not create new bookmarks, because the rebase target
did not exist. This fixes that.
Also fixes some output text to match the core Mercurial behavior, so tools can
rely on the text in certain cases.
Test Plan: Added a test
Reviewers: lcharignon, pyd, rmcelroy, ericsumner
Reviewed By: ericsumner
Differential Revision: https://phabricator.fb.com/D2240418
Signature: t1:2240418:1436895571:2f56298969e09490f6f5e6a44857eedc2bfcace4
Summary:
Previously reseting from above a remote bookmark to below it would delete the
commit that the remote bookmark pointed to. This fixes that and adds a test.
Test Plan: Added a test
Reviewers: rmcelroy, ericsumner, lcharignon
Differential Revision: https://phabricator.fb.com/D2233971
Summary:
In the vast majority of cases, our workflows should not use branches.
Let's make sure people know what they're doing when they create a branch by
failing by default.
Test Plan: added a new test
Reviewers: durham, #sourcecontrol
Reviewed By: durham, #sourcecontrol
Subscribers: durham
Differential Revision: https://phabricator.fb.com/D2213677
Summary:
This makes the pushrebase extension work with the remotenames extension. It does
a few things:
1) rename --onto to be --to for consistency
2) configures remotenames to allow non-fastforward pushes
3) changes the push wrapper to happen after remotenames is loaded
Test Plan: Added a test
Reviewers: pyd, rmcelroy, lcharignon, ericsumner
Reviewed By: ericsumner
Differential Revision: https://phabricator.fb.com/D2200222
Signature: t1:2200222:1435695629:a92d8b20d158aa40bad1f3963af0348b6680d52d
Summary:
This adds the ability to rebase changegroups that contain merge commits. It
works by identifying the maximum bundle root that is an ancestor of the desired
`onto` and rebases only things that are on top of that root.
Test Plan: Added a test
Reviewers: lcharignon, pyd, ericsumner
Reviewed By: ericsumner
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2194350
Signature: t1:2194350:1435695516:3a1f62bda7de0da9536a538da0bbb6deceb192f6
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:
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:
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:
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:
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:
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
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:
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:
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:
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:
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
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
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: 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