Mercurial > hg > mercurial-source
diff tests/test-lock-badness.t @ 27227:56b2bcea2529
error: get Abort from 'error' instead of 'util'
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
confused about that and gives all the credit to 'util' instead of the
hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
give back to 'error' the respect it deserves. And screw that 'util' poser.
For great justice.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 08 Oct 2015 12:55:45 -0700 (2015-10-08) |
parents | 6fbe35588433 |
children | 38292b227deb |
line wrap: on
line diff
--- a/tests/test-lock-badness.t +++ b/tests/test-lock-badness.t @@ -14,7 +14,7 @@ Test that raising an exception in the release function doesn't cause the lock to choke $ cat > testlock.py << EOF - > from mercurial import cmdutil, error, util + > from mercurial import cmdutil, error, error > > cmdtable = {} > command = cmdutil.command(cmdtable) @@ -22,7 +22,7 @@ > def acquiretestlock(repo, releaseexc): > def unlock(): > if releaseexc: - > raise util.Abort('expected release exception') + > raise error.Abort('expected release exception') > l = repo._lock(repo.vfs, 'testlock', False, unlock, None, 'test lock') > return l > @@ -35,7 +35,7 @@ > try: > testlock = acquiretestlock(repo, False) > except error.LockHeld: - > raise util.Abort('lockfile on disk even after releasing!') + > raise error.Abort('lockfile on disk even after releasing!') > testlock.release() > EOF $ cat >> $HGRCPATH << EOF