##// 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 dry_run = opts.get('dry_run')
297 dry_run = opts.get('dry_run')
298 if similarity is None:
298 if similarity is None:
299 similarity = float(opts.get('similarity') or 0)
299 similarity = float(opts.get('similarity') or 0)
300 add, remove = [], []
300 unknown, deleted = [], []
301 audit_path = util.path_auditor(repo.root)
301 audit_path = util.path_auditor(repo.root)
302 m = match(repo, pats, opts)
302 m = match(repo, pats, opts)
303 for abs in repo.walk(m):
303 for abs in repo.walk(m):
@@ -310,17 +310,17 b' def addremove(repo, pats=[], opts={}, dr'
310 rel = m.rel(abs)
310 rel = m.rel(abs)
311 exact = m.exact(abs)
311 exact = m.exact(abs)
312 if good and abs not in repo.dirstate:
312 if good and abs not in repo.dirstate:
313 add.append(abs)
313 unknown.append(abs)
314 if repo.ui.verbose or not exact:
314 if repo.ui.verbose or not exact:
315 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
315 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
316 if repo.dirstate[abs] != 'r' and (not good or not util.lexists(target)
316 if repo.dirstate[abs] != 'r' and (not good or not util.lexists(target)
317 or (os.path.isdir(target) and not os.path.islink(target))):
317 or (os.path.isdir(target) and not os.path.islink(target))):
318 remove.append(abs)
318 deleted.append(abs)
319 if repo.ui.verbose or not exact:
319 if repo.ui.verbose or not exact:
320 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs))
320 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs))
321 if not dry_run:
321 if not dry_run:
322 repo.remove(remove)
322 repo.remove(deleted)
323 repo.add(add)
323 repo.add(unknown)
324 if similarity > 0:
324 if similarity > 0:
325 for old, new, score in findrenames(repo, m, similarity):
325 for old, new, score in findrenames(repo, m, similarity):
326 if repo.ui.verbose or not m.exact(old) or not m.exact(new):
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