comparison hgext/largefiles/overrides.py @ 23041:a36625ef1f35

largefiles: move initialization of standins variable to clarify its "scope"
author Mads Kiilerich <madski@unity3d.com>
date Wed, 15 Oct 2014 05:08:56 +0200
parents 46c5983ce48f
children e53f6b72a0e4 a34a99181f36
comparison
equal deleted inserted replaced
23040:46c5983ce48f 23041:a36625ef1f35
113 lfnames.append(f) 113 lfnames.append(f)
114 if ui.verbose or not exact: 114 if ui.verbose or not exact:
115 ui.status(_('adding %s as a largefile\n') % m.rel(f)) 115 ui.status(_('adding %s as a largefile\n') % m.rel(f))
116 116
117 bad = [] 117 bad = []
118 standins = []
119 118
120 # Need to lock, otherwise there could be a race condition between 119 # Need to lock, otherwise there could be a race condition between
121 # when standins are created and added to the repo. 120 # when standins are created and added to the repo.
122 wlock = repo.wlock() 121 wlock = repo.wlock()
123 try: 122 try:
124 if not opts.get('dry_run'): 123 if not opts.get('dry_run'):
124 standins = []
125 lfdirstate = lfutil.openlfdirstate(ui, repo) 125 lfdirstate = lfutil.openlfdirstate(ui, repo)
126 for f in lfnames: 126 for f in lfnames:
127 standinname = lfutil.standin(f) 127 standinname = lfutil.standin(f)
128 lfutil.writestandin(repo, standinname, hash='', 128 lfutil.writestandin(repo, standinname, hash='',
129 executable=lfutil.getexecutable(repo.wjoin(f))) 129 executable=lfutil.getexecutable(repo.wjoin(f)))