# HG changeset patch # User demian@gaudron.lan # Date 1147779645 -7200 # Node ID de893ad6bd17296b935e7b0e3dcfcacf4a18e1f2 # Parent 9da3dd62c82741fb99d335fe41d40edd46452760 Command line options are read in a saner way diff --git a/purge.py b/purge.py --- a/purge.py +++ b/purge.py @@ -136,14 +136,8 @@ def purge(ui, repo, *paths, **opts): forgot to add to the repository. If you only want to print the list of files that this program would delete use the -vn options. ''' - act = True - if opts['nothing']: - act = False - - abort_on_err = True - if not opts['abort_on_err']: - abort_on_err = False - + act = bool(opts['nothing']) + abort_on_err = bool(opts['abort_on_err']) p = Purge(act, abort_on_err) p.purge(ui, repo, paths)