Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/error.py @ 26640:b13fdcc4e700
exchange: refactor bundle specification parsing
The old code was tailored to `hg bundle` usage and not appropriate for
use as a general API, which clone bundles will require. The code has
been rewritten to make it more generally suitable.
We introduce dedicated error types to represent invalid and unsupported
bundle specifications. The reason we need dedicated error types (rather
than error.Abort) is because clone bundles will want to catch these
exception as part of filtering entries. We don't want to swallow
error.Abort on principle.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 13 Oct 2015 10:57:54 -0700 |
parents | 024644b1900b |
children | 634666c48b7d |
comparison
equal
deleted
inserted
replaced
26639:92d67e5729b9 | 26640:b13fdcc4e700 |
---|---|
199 | 199 |
200 A delta based on a censored revision must be formed as single patch | 200 A delta based on a censored revision must be formed as single patch |
201 operation which replaces the entire base with new content. This ensures | 201 operation which replaces the entire base with new content. This ensures |
202 the delta may be applied by clones which have not censored the base. | 202 the delta may be applied by clones which have not censored the base. |
203 """ | 203 """ |
204 | |
205 class InvalidBundleSpecification(Exception): | |
206 """error raised when a bundle specification is invalid. | |
207 | |
208 This is used for syntax errors as opposed to support errors. | |
209 """ | |
210 | |
211 class UnsupportedBundleSpecification(Exception): | |
212 """error raised when a bundle specification is not supported.""" |