Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 4917:126f527b3ba3
Make repo locks recursive, eliminate all passing of lock/wlock
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 21 Jul 2007 16:02:10 -0500 |
parents | 30847b8af7ca |
children | 4106dde15aed |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Jul 21 16:02:10 2007 -0500 +++ b/mercurial/cmdutil.py Sat Jul 21 16:02:10 2007 -0500 @@ -628,8 +628,7 @@ if bestname: yield bestname, a, bestscore -def addremove(repo, pats=[], opts={}, wlock=None, dry_run=None, - similarity=None): +def addremove(repo, pats=[], opts={}, dry_run=None, similarity=None): if dry_run is None: dry_run = opts.get('dry_run') if similarity is None: @@ -649,8 +648,8 @@ if repo.ui.verbose or not exact: repo.ui.status(_('removing %s\n') % ((pats and rel) or abs)) if not dry_run: - repo.add(add, wlock=wlock) - repo.remove(remove, wlock=wlock) + repo.add(add) + repo.remove(remove) if similarity > 0: for old, new, score in findrenames(repo, add, remove, similarity): oldrel, oldexact = mapping[old] @@ -660,7 +659,7 @@ '(%d%% similar)\n') % (oldrel, newrel, score * 100)) if not dry_run: - repo.copy(old, new, wlock=wlock) + repo.copy(old, new) def service(opts, parentfn=None, initfn=None, runfn=None): '''Run a command as a service.'''