# HG changeset patch # User Benoit Boissinot # Date 1140394323 -3600 # Node ID fdfe89a3962dfbb3fbe1d3a56087795398246ba5 # Parent e6e70450edb9dfaf1fad7b39540ff8935e2d679a use repo.lock when cloning via copy, use lock.LockException when necessary diff -r e6e70450edb9 -r fdfe89a3962d mercurial/commands.py --- a/mercurial/commands.py Mon Feb 20 01:09:40 2006 +0100 +++ b/mercurial/commands.py Mon Feb 20 01:12:03 2006 +0100 @@ -724,8 +724,8 @@ # can end up with extra data in the cloned revlogs that's # not pointed to by changesets, thus causing verify to # fail - l1 = lock.lock(os.path.join(source, ".hg", "lock")) - except OSError: + l1 = other.lock() + except lock.LockException: copy = False if copy: diff -r e6e70450edb9 -r fdfe89a3962d mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Feb 20 01:09:40 2006 +0100 +++ b/mercurial/localrepo.py Mon Feb 20 01:12:03 2006 +0100 @@ -508,7 +508,7 @@ if not wlock: try: wlock = self.wlock(wait=0) - except lock.LockHeld: + except lock.LockException: wlock = None lookup, modified, added, removed, deleted, unknown = ( self.dirstate.changes(files, match))