Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 42731:53c07f08fea1
changectx: extract explicit computechangesetfilesremoved method from context
Right now, the logic around changeset centric removed files data are buried into
the "changectx" code. We extract this code in a dedicated method (in the scmutil
module) for clarity. This clarity will help to explicitly compute and caches
these data in the future.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 12 Jun 2019 13:42:52 +0100 |
parents | 87c4cd89b539 |
children | e75981b7ce84 |
comparison
equal
deleted
inserted
replaced
42730:87c4cd89b539 | 42731:53c07f08fea1 |
---|---|
464 source = self._repo.ui.config('experimental', 'copies.read-from') | 464 source = self._repo.ui.config('experimental', 'copies.read-from') |
465 if (source == 'changeset-only' or | 465 if (source == 'changeset-only' or |
466 (source == 'compatibility' and | 466 (source == 'compatibility' and |
467 self._changeset.filesremoved is not None)): | 467 self._changeset.filesremoved is not None)): |
468 return self._changeset.filesremoved or [] | 468 return self._changeset.filesremoved or [] |
469 | 469 return scmutil.computechangesetfilesremoved(self) |
470 removed = [] | |
471 for f in self.files(): | |
472 if f not in self: | |
473 removed.append(f) | |
474 return removed | |
475 | 470 |
476 @propertycache | 471 @propertycache |
477 def _copies(self): | 472 def _copies(self): |
478 source = self._repo.ui.config('experimental', 'copies.read-from') | 473 source = self._repo.ui.config('experimental', 'copies.read-from') |
479 p1copies = self._changeset.p1copies | 474 p1copies = self._changeset.p1copies |