Patchwork [3,of,7] largefiles: replace splitstandin() by isstandin() to omit str creation

login
register
mail settings
Submitter Katsunori FUJIWARA
Date March 24, 2017, 1:38 p.m.
Message ID <1b4394709fd87672eefe.1490362717@speaknoevil>
Download mbox | patch
Permalink /patch/19634/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - March 24, 2017, 1:38 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1490361899 -32400
#      Fri Mar 24 22:24:59 2017 +0900
# Node ID 1b4394709fd87672eefec1730c2f6a058f3e0070
# Parent  287005e896abc735c0209e2369117b98399f43d8
largefiles: replace splitstandin() by isstandin() to omit str creation

If splitstandin()-ed str itself isn't used, isstandin() should be
used instead of it, to omit meaningless str creation.

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -351,7 +351,7 @@  def overridelog(orig, ui, repo, *pats, *
             pats.update(fixpats(f, tostandin) for f in p)
         else:
             def tostandin(f):
-                if lfutil.splitstandin(f):
+                if lfutil.isstandin(f):
                     return f
                 return lfutil.standin(f)
             pats.update(fixpats(f, tostandin) for f in p)