Patchwork [6,of,8] largefiles: move initialization of standins variable to clarify its "scope"

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 15, 2014, 3:09 a.m.
Message ID <d0531bafa5bcf42b1cdc.1413342553@localhost.localdomain>
Download mbox | patch
Permalink /patch/6272/
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 d0531bafa5bcf42b1cdcb3dfac5599bad33d6463
# Parent  4243f95ba598f6698021263e635f890aaf88528f
largefiles: move initialization of standins variable to clarify its "scope"

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -115,13 +115,13 @@  def addlargefiles(ui, repo, *pats, **opt
                     ui.status(_('adding %s as a largefile\n') % m.rel(f))
 
     bad = []
-    standins = []
 
     # Need to lock, otherwise there could be a race condition between
     # when standins are created and added to the repo.
     wlock = repo.wlock()
     try:
         if not opts.get('dry_run'):
+            standins = []
             lfdirstate = lfutil.openlfdirstate(ui, repo)
             for f in lfnames:
                 standinname = lfutil.standin(f)