Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 3687:d5dd0a2a44bc
Handle locking exceptions if streaming clone can't lock the repo. (Issue324)
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 20 Nov 2006 19:41:49 +0100 |
parents | 975c2469c316 |
children | d92dad355000 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Nov 20 19:36:28 2006 +0100 +++ b/mercurial/localrepo.py Mon Nov 20 19:41:49 2006 +0100 @@ -1825,8 +1825,12 @@ except ValueError: raise util.UnexpectedOutput( _('Unexpected response from remote server:'), l) - if resp != 0: + if resp == 1: raise util.Abort(_('operation forbidden by server')) + elif resp == 2: + raise util.Abort(_('locking the remote repository failed')) + elif resp != 0: + raise util.Abort(_('the server sent an unknown error code')) self.ui.status(_('streaming all changes\n')) l = fp.readline() try: