Mercurial > hg
changeset 22176:328efb5ca0b4 stable
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 14 Aug 2014 14:57:03 -0700 |
parents | 989c16c1b050 |
children | a56038e6a3c9 |
files | mercurial/commands.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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: