[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone: 6e0ec4d787c7fd98841d70714b
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone: 6e0ec4d787c7fd98841d70714b06c1664e077139 |
Date: |
Tue, 25 Jan 2011 23:19:47 GMT |
revision: 6e0ec4d787c7fd98841d70714b06c1664e077139
date: 2011-01-25T23:17:42
author: Richard Hopkins <address@hidden>
branch: net.venge.monotone
changelog:
database::get_revision - invariant for revision's existence
Currently, some of the callers to get_revision manually call
revision_exists and handle the non-existence manually - usually
with the E macro.
The rest, along with get_revision just assume it works. For
instance get_revision assumes it works and then continues to
gzip decode the data - so we make the data returned from the
db an invariant.
This passes all tests as defined by "make check".
manifest:
format_version "1"
new_manifest [7385ac02b0f41af13ee44596fa67555ccc8797c4]
old_revision [b0e65c4fb15d5f08179e1e88af3cf10ce85b558d]
patch "database.cc"
from [1ca31c776dd4882e3c783f80dbc20e351e5fd908]
to [ade943af074000527e1f1f34d8afb0ad0f8a2bc9]
============================================================
--- database.cc 1ca31c776dd4882e3c783f80dbc20e351e5fd908
+++ database.cc ade943af074000527e1f1f34d8afb0ad0f8a2bc9
@@ -2848,7 +2848,7 @@ database::get_revision(revision_id const
imp->fetch(res, one_col, one_row,
query("SELECT data FROM revisions WHERE id = ?")
% blob(id.inner()()));
-
+ I(res.size() == 1);
gzip<data> gzdata(res[0][0], origin::database);
data rdat;
decode_gzip(gzdata,rdat);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone: 6e0ec4d787c7fd98841d70714b06c1664e077139,
code <=