Patchwork [7,of,8] largefiles: inline redundant inctx function in status

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 15, 2014, 3:09 a.m.
Message ID <05f6422005091798fbe0.1413342554@localhost.localdomain>
Download mbox | patch
Permalink /patch/6271/
State Accepted
Headers show

Comments

Mads Kiilerich - Oct. 15, 2014, 3:09 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1413342536 -7200
#      Wed Oct 15 05:08:56 2014 +0200
# Node ID 05f6422005091798fbe0f2a8d4d5d66ca2c78f28
# Parent  d0531bafa5bcf42b1cdcb3dfac5599bad33d6463
largefiles: inline redundant inctx function in status

Patch

diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -90,15 +90,6 @@  def reposetup(ui, repo):
             working = ctx2.rev() is None
             parentworking = working and ctx1 == self['.']
 
-            def inctx(file, ctx):
-                try:
-                    if ctx.rev() is None:
-                        return file in ctx.manifest()
-                    ctx[file]
-                    return True
-                except KeyError:
-                    return False
-
             if match is None:
                 match = match_.always(self.root, self.getcwd())
 
@@ -182,7 +173,7 @@  def reposetup(ui, repo):
 
                         for lfile in tocheck:
                             standin = lfutil.standin(lfile)
-                            if inctx(standin, ctx1):
+                            if standin in ctx1:
                                 if ctx1[standin].data().strip() != \
                                         lfutil.hashfile(self.wjoin(lfile)):
                                     modified.append(lfile)