##// END OF EJS Templates
addremove: normalize some variable names
Matt Mackall -
r8988:1247751d default
parent child Browse files
Show More
@@ -297,7 +297,7 b' def addremove(repo, pats=[], opts={}, dr'
297 297 dry_run = opts.get('dry_run')
298 298 if similarity is None:
299 299 similarity = float(opts.get('similarity') or 0)
300 add, remove = [], []
300 unknown, deleted = [], []
301 301 audit_path = util.path_auditor(repo.root)
302 302 m = match(repo, pats, opts)
303 303 for abs in repo.walk(m):
@@ -310,17 +310,17 b' def addremove(repo, pats=[], opts={}, dr'
310 310 rel = m.rel(abs)
311 311 exact = m.exact(abs)
312 312 if good and abs not in repo.dirstate:
313 add.append(abs)
313 unknown.append(abs)
314 314 if repo.ui.verbose or not exact:
315 315 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
316 316 if repo.dirstate[abs] != 'r' and (not good or not util.lexists(target)
317 317 or (os.path.isdir(target) and not os.path.islink(target))):
318 remove.append(abs)
318 deleted.append(abs)
319 319 if repo.ui.verbose or not exact:
320 320 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs))
321 321 if not dry_run:
322 repo.remove(remove)
323 repo.add(add)
322 repo.remove(deleted)
323 repo.add(unknown)
324 324 if similarity > 0:
325 325 for old, new, score in findrenames(repo, m, similarity):
326 326 if repo.ui.verbose or not m.exact(old) or not m.exact(new):
General Comments 0
You need to be logged in to leave comments. Login now