##// END OF EJS Templates
hgtagsfnodes: refactor code to compute fnode into separate fn...
Pulkit Goyal -
r47398:75832107 default
parent child Browse files
Show More
@@ -777,6 +777,15 b' class hgtagsfnodescache(object):'
777 return False
777 return False
778 return None
778 return None
779
779
780 fnode = self._computefnode(node)
781 self._writeentry(offset, properprefix, fnode)
782 return fnode
783
784 def _computefnode(self, node):
785 """Finds the tag filenode for a node which is missing or invalid
786 in cache"""
787 ctx = self._repo[node]
788 rev = ctx.rev()
780 fnode = None
789 fnode = None
781 cl = self._repo.changelog
790 cl = self._repo.changelog
782 p1rev, p2rev = cl._uncheckedparentrevs(rev)
791 p1rev, p2rev = cl._uncheckedparentrevs(rev)
@@ -804,8 +813,6 b' class hgtagsfnodescache(object):'
804 except error.LookupError:
813 except error.LookupError:
805 # No .hgtags file on this revision.
814 # No .hgtags file on this revision.
806 fnode = nullid
815 fnode = nullid
807
808 self._writeentry(offset, properprefix, fnode)
809 return fnode
816 return fnode
810
817
811 def setfnode(self, node, fnode):
818 def setfnode(self, node, fnode):
General Comments 0
You need to be logged in to leave comments. Login now