D7705: phases: make the working directory consistently a draft
rdamazio (Rodrigo Damazio Bovendorp)
phabricator at mercurial-scm.org
Mon Jan 13 21:55:05 EST 2020
rdamazio added a comment.
In D7705#114943 <https://phab.mercurial-scm.org/D7705#114943>, @yuja wrote:
>> @@ -252,25 +254,44 @@
>>
>> revs = set.union(*[self._phasesets[p] for p in phases])
>> if repo.changelog.filteredrevs:
>> revs = revs - repo.changelog.filteredrevs
>>
>> +
>>
>> if subset is None:
>> return smartset.baseset(revs)
>> else:
>>
>> + if wdirrev in subset and repo[None].phase() in phases:
>> + # The working dir would never be in the cache, but it was
>> + # in the subset being filtered for its phase, so add it to
>> + # the output.
>> + revs.add(wdirrev)
>
> Suppose `self._phasesets[]` is a read-only object in this method,
> I think `revs` shouldn't be mutated if `revs is self._phasesets[p]`.
>
>> + if wdirrev in subset and repo[None].phase() in phases:
>> + # The working dir is in the subset being filtered, and its
>> + # phase is in the phases *not* being returned, so add it to the
>> + # set of revisions to filter out.
>> + revs.add(wdirrev)
>
> Same here.
Good point, I'll send another change.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7705/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7705
To: rdamazio, #hg-reviewers, marmoute
Cc: yuja, marmoute, mercurial-devel
More information about the Mercurial-devel
mailing list