# HG changeset patch # User John Schneiderman # Date 1407521738 18000 # Node ID ba88b8114b9899c1a1c9e8193010fe6c384f4e8c # Parent 6cd1a810f95a25aecbdb630b82d1a4bd5335a3d6 Fixed issue with throwing an exception on stat usage. IN: - Created better error message when ignores file is not found. IN: - Fixed spelling error in HgWeb configuration file error message. IN: - diff -r 6cd1a810f95a -r ba88b8114b98 doc/TODO --- a/doc/TODO Thu Aug 07 21:10:21 2014 -0500 +++ b/doc/TODO Fri Aug 08 13:15:38 2014 -0500 @@ -34,7 +34,6 @@ - Manager should handle the HgWeb configuration file settings. - Manager should provide a REST API for repository management. - Manager should have an API key per user permission values. -- Specify from command line where to search for a configuration file. - Manager should prevent two repositories from using the same display name. - Manager should list all managed repositories like Display_Name(Storage_Name). - Change functions to use exceptions for error handling, except for the command-line module. diff -r 6cd1a810f95a -r ba88b8114b98 src/manager.py --- a/src/manager.py Thu Aug 07 21:10:21 2014 -0500 +++ b/src/manager.py Fri Aug 08 13:15:38 2014 -0500 @@ -43,6 +43,7 @@ import os import shutil import filelock as guard + import stat print "Acquiring manager lock ..." lock = guard.FileLock('HWM') @@ -249,6 +250,9 @@ ignores = {} try: ignores = ignorepo.extract('ignores.xml') + except IOError as e: + print >>sys.stderr, "Failed to locate ignores, error: %s" % e.message + return False except xml.parsers.expat.ExpatError as e: print >>sys.stderr, "Failed to extract ignores, error: %s" % e.message return False @@ -400,7 +404,7 @@ parser = SafeConfigParser() if not parser.read(settings.HgWebPath + os.sep + 'hgweb.config'): - print >>sys.stderr, "Failed to located HgWeb configuration file." + print >>sys.stderr, "Failed to locate HgWeb configuration file." return False if parser.has_section('paths'): @@ -542,7 +546,7 @@ parser = SafeConfigParser() if not parser.read(settings.HgWebPath + os.sep + 'hgweb.config'): - print >>sys.stderr, "Failed to located HgWeb configuration file." + print >>sys.stderr, "Failed to locate HgWeb configuration file." return False if parser.has_section('paths'):