Patchwork D7711: lfs: fix a discrepancy with a function wanting a filelog, but calling it rlog

login
register
mail settings
Submitter phabricator
Date Dec. 23, 2019, 5:45 p.m.
Message ID <6da891e044360227b88bba60c4713644@localhost.localdomain>
Download mbox | patch
Permalink /patch/44029/
State Not Applicable
Headers show

Comments

phabricator - Dec. 23, 2019, 5:45 p.m.
Closed by commit rHG26cf356ae772: lfs: fix a discrepancy with a function wanting a filelog, but calling it rlog (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7711?vs=18907&id=18917

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7711/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7711

AFFECTED FILES
  hgext/lfs/wrapper.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/hgext/lfs/wrapper.py b/hgext/lfs/wrapper.py
--- a/hgext/lfs/wrapper.py
+++ b/hgext/lfs/wrapper.py
@@ -151,12 +151,12 @@ 
         if node is None:
             # both None - likely working copy content where node is not ready
             return False
-        rev = rlog._revlog.rev(node)
+        rev = rlog.rev(node)
     else:
-        node = rlog._revlog.node(rev)
+        node = rlog.node(rev)
     if node == nullid:
         return False
-    flags = rlog._revlog.flags(rev)
+    flags = rlog.flags(rev)
     return bool(flags & revlog.REVIDX_EXTSTORED)
 
 
@@ -203,7 +203,7 @@ 
 
 # Wrapping may also be applied by remotefilelog
 def filelogrenamed(orig, self, node):
-    if _islfs(self, node):
+    if _islfs(self._revlog, node):
         rawtext = self._revlog.rawdata(node)
         if not rawtext:
             return False
@@ -217,7 +217,7 @@ 
 
 # Wrapping may also be applied by remotefilelog
 def filelogsize(orig, self, rev):
-    if _islfs(self, rev=rev):
+    if _islfs(self._revlog, rev=rev):
         # fast path: use lfs metadata to answer size
         rawtext = self._revlog.rawdata(rev)
         metadata = pointer.deserialize(rawtext)
@@ -248,7 +248,7 @@ 
 
 
 def filectxislfs(self):
-    return _islfs(self.filelog(), self.filenode())
+    return _islfs(self.filelog()._revlog, self.filenode())
 
 
 @eh.wrapfunction(cmdutil, b'_updatecatformatter')
@@ -459,7 +459,7 @@ 
         else:
             return None
     fctx = _ctx[f]
-    if not _islfs(fctx.filelog(), fctx.filenode()):
+    if not _islfs(fctx.filelog()._revlog, fctx.filenode()):
         return None
     try:
         p = pointer.deserialize(fctx.rawdata())