# HG changeset patch # User Pierre-Yves David # Date 1408053423 25200 # Node ID 328efb5ca0b47f8d5ae16dd2009f7fb7205e7665 # Parent 989c16c1b050a314e136675ca9ac73a90d13da2a debugobsolete: catch ValueError that may be raised by obsstore.create There are already a couple of errors that obsstore.create can raise and we are going to introduce a cycle check too. diff -r 989c16c1b050 -r 328efb5ca0b4 mercurial/commands.py --- a/mercurial/commands.py Thu Aug 14 16:18:45 2014 -0500 +++ b/mercurial/commands.py Thu Aug 14 14:57:03 2014 -0700 @@ -2338,9 +2338,12 @@ try: tr = repo.transaction('debugobsolete') try: - repo.obsstore.create(tr, parsenodeid(precursor), succs, - opts['flags'], metadata) - tr.close() + try: + repo.obsstore.create(tr, parsenodeid(precursor), succs, + opts['flags'], metadata) + tr.close() + except ValueError, exc: + raise util.Abort(_('bad obsmarker input: %s') % exc) finally: tr.release() finally: