# # # patch "error.psp" # from [e1defd5a7a1469119dcbe07f0624e3412c394a03] # to [312eeeb8ea00ab36b0b5d64eb8fa5b65e75cd418] # # patch "file.psp" # from [b18003b58deaf7a838a644a0757d57c5e8b69f91] # to [f19f6fefe38a97ca636705f070f4535534947a48] # # patch "fileinbranch.psp" # from [14051e609852522f4eba270632b444fc470768a8] # to [4f01b7f1260ca7a9c756047ea0dcfaa5fabc4b0c] # # patch "manifest.psp" # from [707922f63bdcc200ab716a047b3116afb0ffccf2] # to [722b15a5c3eeca08a8415264c691f2f1966b0cbc] # # patch "monotone.py" # from [bdf8d159c331916c691858713488beacd50e9cc2] # to [f8211dca24b2b5e48c89d5e88d95388a683282b7] # # patch "revision.psp" # from [b0be5ff714ff6ecdf9f86b4dd34d8d1fa8044d0e] # to [b5b23a31a00ed137eaa2d46681966ad758efc90b] # # patch "wrapper.py" # from [a3b890f3aa3d092d6ab1c8e9d3d401e83ddfe316] # to [dbbc871353ddfec1b56bf57b743a6b5cd70688c2] # ============================================================ --- error.psp e1defd5a7a1469119dcbe07f0624e3412c394a03 +++ error.psp 312eeeb8ea00ab36b0b5d64eb8fa5b65e75cd418 @@ -14,7 +14,7 @@ # a program error e_type, e_value, e_traceback = sys.exc_info() -if (str(e_type) == "exceptions.Exception"): +if (str(e_type) == "exceptions.Exceptionf"): # this is a deliberate exception, pretty print %> ============================================================ --- file.psp b18003b58deaf7a838a644a0757d57c5e8b69f91 +++ file.psp f19f6fefe38a97ca636705f070f4535534947a48 @@ -34,11 +34,7 @@ certs = mt.certs(id) branches = common.extract_cert_from_certs(certs, "branch", as_list=True) -revision = mt.revision(id) -if not revision.has_key('new_manifest'): - raise Exception("There is no manifest in this revision ID.") -manifest_id = revision['new_manifest'][0][1] -manifest = mt.manifest(manifest_id) +manifest = [(t[3], t[1]) for t in mt.manifest_of(id)['file']] matching_file_id = None for file_id, filename in manifest: ============================================================ --- fileinbranch.psp 14051e609852522f4eba270632b444fc470768a8 +++ fileinbranch.psp 4f01b7f1260ca7a9c756047ea0dcfaa5fabc4b0c @@ -27,9 +27,7 @@ # match PATH and their file ID. file_version = {} for id in heads: - revision = mt.revision(id) - manifest_id = revision['new_manifest'][0][1] - file_revisions = filter(lambda x: x[1] == path, mt.manifest(manifest_id)) + file_revisions = filter(lambda x: x[1] == path, mt.manifest_of(id)['file']) if len(file_revisions) > 1: raise Exception("More than one file matches path?") elif len(file_revisions) == 1: ============================================================ --- manifest.psp 707922f63bdcc200ab716a047b3116afb0ffccf2 +++ manifest.psp 722b15a5c3eeca08a8415264c691f2f1966b0cbc @@ -31,11 +31,7 @@ if path.endswith('/'): path = path[-1:] certs = mt.certs(id) -revision = mt.revision(id) -if not revision.has_key('new_manifest'): - raise Exception("There is no manifest in this revision ID.") -manifest_id = revision['new_manifest'][0][1] -manifest = mt.manifest(manifest_id) +manifest = [(t[3], t[1]) for t in mt.manifest_of(id)['file']] link_components = "" components = [''] @@ -60,7 +56,7 @@
-All <%=len(manifest)%> files in this manifest can be downloaded together in a <%=link("tar", manifest_id, "tar archive")%>. +All <%=len(manifest)%> files in this manifest can be downloaded together in a <%=link("tar", id, "tar archive")%>.
<% ============================================================ --- monotone.py bdf8d159c331916c691858713488beacd50e9cc2 +++ monotone.py f8211dca24b2b5e48c89d5e88d95388a683282b7 @@ -132,13 +132,16 @@ def basic_io_parser(self, data): """returns a list of lists of (key, value) tuples. hashes are returned with []s around them; strings are returned raw.""" + + ### fixme, really needs a rewrite + def unescape_string_value(str): rv = "" is_terminated = False in_escape = False if str[0] != '"': - raise Exception("basic_io parse error; not a string.") - for c in str[1:]: + raise Exception("basic_io parse error; not a string: ;%s; (%d)" % (str, len(str))) + for idx, c in enumerate(str[1:]): if in_escape: if c != '\\' and c != '\"': raise Exception(r'basic_io parse error; expected \" or \\') @@ -148,12 +151,11 @@ if c == '\\': in_escape = True elif c == '"': - if is_terminated: - raise Exception("basic_io parse error; string ends twice!") is_terminated = True + return is_terminated, str[idx+2:], rv else: rv += c - return is_terminated, rv + return is_terminated, '', rv # 14:46 < tbrownaw> list