Summary:
Some changes in core made the output for merge conflicts change. I just made
certain tests reflect that.
Test Plan: ran the tests
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2566237
Tasks: 8797924
Signature: t1:2566237:1445456815:d5a1560bd3421de6b9955e44a8dd2698f0462f51
Summary:
It's possible that the sparse extension might be loaded, even if the sparse
extension is not enabled for the particular repo (like if you're cloning from a
sparse repo to a non-sparse repo on the same machine). Previously it broke,
because we assumed all repo's had sparsematch(). Now we check for it before
using it.
Test Plan:
Added a test. The old test wasn't sufficient since it didn't have any
commits, so the dirstate was not interacted with
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2278657
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
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:
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:
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
The sparse checkout extension had a pretty bad flaw where rebasing across
certain no-op file changes would fail the rebase. This was due to Mercurial
adding a 'keep' action on those files and that action getting translated to a
'remove' by the sparse extension, then failing to edit the dirstate during the rebase
branchmerge.
The fix is to only issue 'remove' actions if we're not in a branchmerge
and the file in question is in the workingcopy but shouldn't be.
I also added more validation for the branchmerge scenario to make sure we aren't
losing any dirstate data. It will basically abort if any action besides 'keep'
is performed on a file outside the sparse checkout.
Upstream Mercurial has changed the return value of merge.calculateupdates in two
ways: 1) actions is now a file->action mapping instead of a
actiontype->list-of-files mapping, 2) it now returns actions, diverge,
renamedelete where the last two are just used for displaying to the user and can
be pretty much ignored by the sparse extension.
Summary:
strip -r . -k rebuilds the dirstate and was inserting filtered entries
into the dirstate. This fixes rebuild to exclude sparse files.
Test Plan: Added a test
Reviewers: sid0, pyd, davidsp, mitrandir, rmcelroy
Differential Revision: https://phabricator.fb.com/D1743331
Summary:
Adds a sparse checkout extension that allows you to checkout just part of the
working copy. This only affects the working copy, it does not affect history,
or what is pushed and pulled from the server.
The basic api is:
hg sparse --include PATTERN... # add a pattern to the sparse checkout
hg sparse --exclude PATTERN... # excludes files from the sparse checkout
hg sparse --delete PATTERN... # deletes an include/exclude rule
hg sparse --enable-profile # enables a predefined sparse profile
hg sparse --disable-profile # disables a predefined sparse profile
hg sparse --reset # makes the repository full again
hg sparse --refresh # refreshes the working copy if .hg/sparse was
modified manually
hg sparse # show the current sparse rules
Test Plan:
Added tests. Ran them. Also deploy it to a couple users for a bit
without major issues.
Reviewers: pyd, sid0, rmcelroy, davidsp, mpm
Subscribers: mitrandir, akushner
Differential Revision: https://phabricator.fb.com/D1698824