Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHGb67854106edb: remotefilelog: prune obsolete method
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/remotefilelog/remotefilelog.py (29 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Augie Fackler | Oct 3 2018, 5:18 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
Closed | pulkit | ||
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 |
linknode=self.linknode(node), | linknode=self.linknode(node), | ||||
basenode=basenode, | basenode=basenode, | ||||
flags=self.flags(node), | flags=self.flags(node), | ||||
baserevisionsize=None, | baserevisionsize=None, | ||||
revision=revision, | revision=revision, | ||||
delta=delta, | delta=delta, | ||||
) | ) | ||||
def emitrevisiondeltas(self, requests): | |||||
prevnode = None | |||||
for request in requests: | |||||
node = request.node | |||||
p1, p2 = self.parents(node) | |||||
if prevnode is None: | |||||
prevnode = p1 | |||||
if request.basenode is not None: | |||||
basenode = request.basenode | |||||
else: | |||||
basenode = p1 | |||||
if basenode == nullid: | |||||
revision = self.revision(node, raw=True) | |||||
delta = None | |||||
else: | |||||
revision = None | |||||
delta = self.revdiff(basenode, node) | |||||
yield revlog.revlogrevisiondelta( | |||||
node=node, | |||||
p1node=p1, | |||||
p2node=p2, | |||||
linknode=self.linknode(node), | |||||
basenode=basenode, | |||||
flags=self.flags(node), | |||||
baserevisionsize=None, | |||||
revision=revision, | |||||
delta=delta, | |||||
) | |||||
def revdiff(self, node1, node2): | def revdiff(self, node1, node2): | ||||
return mdiff.textdiff(self.revision(node1, raw=True), | return mdiff.textdiff(self.revision(node1, raw=True), | ||||
self.revision(node2, raw=True)) | self.revision(node2, raw=True)) | ||||
def lookup(self, node): | def lookup(self, node): | ||||
if len(node) == 40: | if len(node) == 40: | ||||
node = bin(node) | node = bin(node) | ||||
if len(node) != 20: | if len(node) != 20: |