# HG changeset patch # User Patrick Mezard # Date 1233695111 -3600 # Node ID 872a57531db634ca557375d6adb222e2a8e33c08 # Parent 2571a40714e4b703c2d01acaa3598fbb7437753d Fix ParseError import, work around demandload Tests pass from 1.0 up to fff6e253e1f6 diff -r 2571a40714e4 -r 872a57531db6 forest.py --- a/forest.py Mon Jan 26 20:35:51 2009 -0600 +++ b/forest.py Tue Feb 03 22:05:11 2009 +0100 @@ -82,10 +82,15 @@ findcmd.UnknownCommand = m.UnknownCommand break try: - from mercurial.repo import RepoError - from mercurial.cmdutil import ParseError + # Assign the exceptions explicitely to avoid demandload issues + import mercurial.repo + import mercurial.cmdutil + RepoError = mercurial.repo.RepoError + ParseError = mercurial.dispatch.ParseError except AttributeError: - from mercurial.error import RepoError, ParseError + import mercurial.error + RepoError = mercurial.error.RepoError + ParseError = mercurial.error.ParseError # For backwards compatibility, find the parseurl() function that splits # urls and revisions. Mercurial 0.9.3 doesn't have this, so we need