comparison hgext/largefiles/overrides.py @ 23592:96d335e4eacb stable

largefiles: don't actually remove largefiles in an addremove dry run The addlargefiles() method already properly handled dry runs.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 13 Dec 2014 13:33:48 -0500
parents a34a99181f36
children a4679a74df14 f1e6b86da4c0
comparison
equal deleted inserted replaced
23501:424d669118d3 23592:96d335e4eacb
187 if not after: 187 if not after:
188 # If this is being called by addremove, notify the user that we 188 # If this is being called by addremove, notify the user that we
189 # are removing the file. 189 # are removing the file.
190 if isaddremove: 190 if isaddremove:
191 ui.status(_('removing %s\n') % f) 191 ui.status(_('removing %s\n') % f)
192 util.unlinkpath(repo.wjoin(f), ignoremissing=True) 192
193 lfdirstate.remove(f) 193 if not opts.get('dry_run'):
194 if not after:
195 util.unlinkpath(repo.wjoin(f), ignoremissing=True)
196 lfdirstate.remove(f)
197
198 if opts.get('dry_run'):
199 return result
200
194 lfdirstate.write() 201 lfdirstate.write()
195 remove = [lfutil.standin(f) for f in remove] 202 remove = [lfutil.standin(f) for f in remove]
196 # If this is being called by addremove, let the original addremove 203 # If this is being called by addremove, let the original addremove
197 # function handle this. 204 # function handle this.
198 if not isaddremove: 205 if not isaddremove: