diff --git a/hgext/largefiles/basestore.py b/hgext/largefiles/basestore.py --- a/hgext/largefiles/basestore.py +++ b/hgext/largefiles/basestore.py @@ -130,7 +130,7 @@ class basestore(object): key = (filename, fctx.filenode()) if key not in verified: verified.add(key) - expectedhash = fctx.data().strip() + expectedhash = lfutil.readasstandin(fctx) filestocheck.append((cset, filename, expectedhash)) failed = self._verifyfiles(contents, filestocheck) diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -406,7 +406,7 @@ def cachelfiles(ui, repo, node, filelist ctx = repo[node] for lfile in lfiles: try: - expectedhash = ctx[lfutil.standin(lfile)].data().strip() + expectedhash = lfutil.readasstandin(ctx[lfutil.standin(lfile)]) except IOError as err: if err.errno == errno.ENOENT: continue # node must be None and standin wasn't found in wctx diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -174,7 +174,7 @@ def lfdirstatestatus(lfdirstate, repo): fctx = pctx[standin(lfile)] except LookupError: fctx = None - if not fctx or fctx.data().strip() != hashfile(repo.wjoin(lfile)): + if not fctx or readasstandin(fctx) != hashfile(repo.wjoin(lfile)): modified.append(lfile) else: clean.append(lfile) @@ -528,7 +528,7 @@ def getlfilestoupload(repo, missing, add files.add(f) for fn in files: if isstandin(fn) and fn in ctx: - addfunc(fn, ctx[fn].data().strip()) + addfunc(fn, readasstandin(ctx[fn])) repo.ui.progress(_('finding outgoing largefiles'), None) def updatestandinsbymatch(repo, match): diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -553,9 +553,9 @@ def overridefilemerge(origfn, premerge, return origfn(premerge, repo, mynode, orig, fcd, fco, fca, labels=labels) - ahash = fca.data().strip().lower() - dhash = fcd.data().strip().lower() - ohash = fco.data().strip().lower() + ahash = lfutil.readasstandin(fca).lower() + dhash = lfutil.readasstandin(fcd).lower() + ohash = lfutil.readasstandin(fco).lower() if (ohash != ahash and ohash != dhash and (dhash == ahash or diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py --- a/hgext/largefiles/reposetup.py +++ b/hgext/largefiles/reposetup.py @@ -172,7 +172,7 @@ def reposetup(ui, repo): if standin not in ctx1: # from second parent modified.append(lfile) - elif ctx1[standin].data().strip() \ + elif lfutil.readasstandin(ctx1[standin]) \ != lfutil.hashfile(self.wjoin(lfile)): modified.append(lfile) else: @@ -188,7 +188,7 @@ def reposetup(ui, repo): standin = lfutil.standin(lfile) if standin in ctx1: abslfile = self.wjoin(lfile) - if ((ctx1[standin].data().strip() != + if ((lfutil.readasstandin(ctx1[standin]) != lfutil.hashfile(abslfile)) or (checkexec and ('x' in ctx1.flags(standin)) !=