Patchwork [4,of,8] largefiles: replace 'ctx._repo' with 'ctx.repo()'

login
register
mail settings
Submitter Matt Harbison
Date March 14, 2015, 1:28 a.m.
Message ID <46a0ddb787c9f07e06ae.1426296515@Envy>
Download mbox | patch
Permalink /patch/8084/
State Accepted
Commit c9f4ef967a1dbbd94a438ebafb9332aef26c5a85
Headers show

Comments

Matt Harbison - March 14, 2015, 1:28 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1426216096 14400
#      Thu Mar 12 23:08:16 2015 -0400
# Node ID 46a0ddb787c9f07e06aec1947ced3d9243e3887d
# Parent  09b680b458a5e3aeea370c645fbf0c58d198e6d1
largefiles: replace 'ctx._repo' with 'ctx.repo()'

Patch

diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -388,7 +388,7 @@ 
         lfdirstate.drop(lfile)
 
 def markcommitted(orig, ctx, node):
-    repo = ctx._repo
+    repo = ctx.repo()
 
     orig(node)
 
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -760,7 +760,7 @@ 
             # currently doesn't work correctly in that case, this match is
             # called, so the lfdirstate above may not be the correct one for
             # this invocation of match.
-            lfdirstate = lfutil.openlfdirstate(ctx._repo.ui, ctx._repo, False)
+            lfdirstate = lfutil.openlfdirstate(ctx.repo().ui, ctx.repo(), False)
 
             def tostandin(f):
                 if lfutil.standin(f) in ctx: