We are changing the reference so we should be within such context manager.
This seems make the actual dirstate content a bit flaky with content being
sometime ambigous (but maybe it was flaky before?)
So I increased the matching.
| Alphare | |
| pulkit |
| hg-reviewers |
We are changing the reference so we should be within such context manager.
This seems make the actual dirstate content a bit flaky with content being
sometime ambigous (but maybe it was flaky before?)
So I increased the matching.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/sparse.py (20 lines) | |||
| M | tests/test-sparse.t (12 lines) |
| fctx = repo[None][file] | fctx = repo[None][file] | ||||
| tmresult.addfile( | tmresult.addfile( | ||||
| file, | file, | ||||
| mergestatemod.ACTION_GET, | mergestatemod.ACTION_GET, | ||||
| (fctx.flags(), False), | (fctx.flags(), False), | ||||
| message, | message, | ||||
| ) | ) | ||||
| with repo.dirstate.parentchange(): | |||||
| mergemod.applyupdates( | mergemod.applyupdates( | ||||
| repo, tmresult, repo[None], repo[b'.'], False, wantfiledata=False | repo, | ||||
| tmresult, | |||||
| repo[None], | |||||
| repo[b'.'], | |||||
| False, | |||||
| wantfiledata=False, | |||||
| ) | ) | ||||
| dirstate = repo.dirstate | dirstate = repo.dirstate | ||||
| for file, flags, msg in tmresult.getactions([mergestatemod.ACTION_GET]): | for file, flags, msg in tmresult.getactions( | ||||
| [mergestatemod.ACTION_GET] | |||||
| ): | |||||
| dirstate.normal(file) | dirstate.normal(file) | ||||
| profiles = activeconfig(repo)[2] | profiles = activeconfig(repo)[2] | ||||
| changedprofiles = profiles & files | changedprofiles = profiles & files | ||||
| # If an active profile changed during the update, refresh the checkout. | # If an active profile changed during the update, refresh the checkout. | ||||
| # Don't do this during a branch merge, since all incoming changes should | # Don't do this during a branch merge, since all incoming changes should | ||||
| # have been handled by the temporary includes above. | # have been handled by the temporary includes above. | ||||
| if changedprofiles and not branchmerge: | if changedprofiles and not branchmerge: | ||||
| mf = mctx.manifest() | mf = mctx.manifest() | ||||
| $ hg debugsparse -X excludednomanifest | $ hg debugsparse -X excludednomanifest | ||||
| $ cp ../moreexcluded .hg/dirstate | $ cp ../moreexcluded .hg/dirstate | ||||
| $ hg manifest | $ hg manifest | ||||
| excluded | excluded | ||||
| included | included | ||||
| We have files in the dirstate that are included and excluded. Some are in the | We have files in the dirstate that are included and excluded. Some are in the | ||||
| manifest and some are not. | manifest and some are not. | ||||
| $ hg debugdirstate --no-dates | $ hg debugdirstate --no-dates | ||||
| n 644 0 * excluded (glob) | n * excluded (glob) | ||||
| a 0 -1 * excludednomanifest (glob) | a * excludednomanifest (glob) | ||||
| n 644 0 * included (glob) | n * included (glob) | ||||
| a 0 -1 * includedadded (glob) | a * includedadded (glob) | ||||
| $ hg debugrebuilddirstate --minimal | $ hg debugrebuilddirstate --minimal | ||||
| $ hg debugdirstate --no-dates | $ hg debugdirstate --no-dates | ||||
| n 644 0 * included (glob) | n * included (glob) | ||||
| a 0 -1 * includedadded (glob) | a * includedadded (glob) | ||||