Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG48b592d986e7: narrowrevlog: add what little I can remember about rename filtering
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/narrow/narrowrevlog.py (6 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 |
if not repo.narrowmatch().visitdir(dir[:-1] or '.'): | if not repo.narrowmatch().visitdir(dir[:-1] or '.'): | ||||
return excludeddirmanifestctx(dir, node) | return excludeddirmanifestctx(dir, node) | ||||
return super(narrowmanifestlog, self).get(dir, node, verify=verify) | return super(narrowmanifestlog, self).get(dir, node, verify=verify) | ||||
mfl.__class__ = narrowmanifestlog | mfl.__class__ = narrowmanifestlog | ||||
def makenarrowfilelog(fl, narrowmatch): | def makenarrowfilelog(fl, narrowmatch): | ||||
class narrowfilelog(fl.__class__): | class narrowfilelog(fl.__class__): | ||||
def renamed(self, node): | def renamed(self, node): | ||||
# Renames that come from outside the narrowspec are | |||||
# problematic at least for git-diffs, because we lack the | |||||
# base text for the rename. This logic was introduced in | |||||
# 3cd72b1 of narrowhg (authored by martinvonz, reviewed by | |||||
# adgar), but that revision doesn't have any additional | |||||
# commentary on what problems we can encounter. | |||||
m = super(narrowfilelog, self).renamed(node) | m = super(narrowfilelog, self).renamed(node) | ||||
if m and not narrowmatch(m[0]): | if m and not narrowmatch(m[0]): | ||||
return None | return None | ||||
return m | return m | ||||
def size(self, rev): | def size(self, rev): | ||||
# We take advantage of the fact that remotefilelog | # We take advantage of the fact that remotefilelog | ||||
# lacks a node() method to just skip the | # lacks a node() method to just skip the |