Patchwork D3153: tests: call rawsize() directly

login
register
mail settings
Submitter phabricator
Date April 6, 2018, 12:51 a.m.
Message ID <differential-rev-PHID-DREV-zcb5vdhkfzypzwbzulyy-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30419/
State Superseded
Headers show

Comments

phabricator - April 6, 2018, 12:51 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  rawsize() is not reimplemented outside of revlog. I'm not sure why
  this code was insisting it call a specific implementation. Changing
  it to call rawsize() on the repo.file(f) result seems to work just
  fine.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-lfs.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel
phabricator - April 6, 2018, 8:01 p.m.
quark added a comment.


  It was `revlog.revlog.size`, and got changed to `rawsize` before committed.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/tests/test-lfs.t b/tests/test-lfs.t
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -630,7 +630,7 @@ 
   >         fl = repo.file(name)
   >         if len(fl) == 0:
   >             continue
-  >         sizes = [revlog.revlog.rawsize(fl, i) for i in fl]
+  >         sizes = [fl.rawsize(i) for i in fl]
   >         texts = [fl.revision(i, raw=True) for i in fl]
   >         flags = [int(fl.flags(i)) for i in fl]
   >         hashes = [hash(t) for t in texts]