@@ -410,8 +410,9 @@
char *zManifestFile; /* Name of the manifest file */
int nBasename; /* Length of "g.zLocalRoot/" */
const char *zBranch; /* Create a new branch with this name */
const char *zBgColor; /* Set background color when branching */
+ const char *zDateOvrd; /* Override date string */
Blob filename; /* complete filename */
Blob manifest;
Blob muuid; /* Manifest uuid */
Blob mcksum; /* Self-checksum on the manifest */
@@ -423,8 +424,9 @@
zComment = find_option("comment","m",1);
forceFlag = find_option("force", "f", 0)!=0;
zBranch = find_option("branch","b",1);
zBgColor = find_option("bgcolor",0,1);
+ zDateOvrd = find_option("date-override",0,1);
db_must_be_within_tree();
noSign = db_get_boolean("omitsign", 0)|noSign;
if( db_get_boolean("clearsign", 1)==0 ){ noSign = 1; }
verify_all_options();
@@ -536,8 +538,9 @@
blob_zero(&content);
blob_read_from_file(&content, zFullname);
nrid = content_put(&content, 0, 0);
+ blob_reset(&content);
if( rid>0 ){
content_deltify(rid, nrid, 0);
}
db_multi_exec("UPDATE vfile SET mrid=%d, rid=%d WHERE id=%d", nrid,nrid,id);
@@ -550,9 +553,9 @@
if( blob_size(&comment)==0 ){
blob_append(&comment, "(no comment)", -1);
}
blob_appendf(&manifest, "C %F\n", blob_str(&comment));
- zDate = db_text(0, "SELECT datetime('now')");
+ zDate = db_text(0, "SELECT datetime('%q')", zDateOvrd ? zDateOvrd : "now");
zDate[10] = 'T';
blob_appendf(&manifest, "D %s\n", zDate);
db_prepare(&q,
"SELECT pathname, uuid, origname"