Mercurial > hg-stable
changeset 21603:31be5a6fa716
bundle2: introduce a ReadOnlyPartError exception
As we will introduce functions to alter already created parts, we need a proper
exception to raise when code tries to alter a part that cannot be altered anymore.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 24 May 2014 16:08:05 -0700 |
parents | cc33ae50bab3 |
children | c399bf961cb9 |
files | mercurial/bundle2.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundle2.py Fri May 23 16:20:30 2014 -0700 +++ b/mercurial/bundle2.py Sat May 24 16:08:05 2014 -0700 @@ -174,6 +174,10 @@ """error raised when no handler is found for a Mandatory part""" pass +class ReadOnlyPartError(RuntimeError): + """error raised when code tries to alter a part being generated""" + pass + parthandlermapping = {} def parthandler(parttype):