Diff
Not logged in

Differences From Artifact [f2d5213155]:

To Artifact [f21d03c197]:


146
147
148
149
150
151
152
153
154
155
156
157



158
159
160
161
162
163
164
165
146
147
148
149
150
151
152





153
154
155

156
157
158
159
160
161
162







-
-
-
-
-
+
+
+
-








/*
** Use data accumulated in gg from a "blob" record to add a new file
** to the BLOB table.
*/
static void finish_blob(void){
  Blob content;

  if( gg.nData>0 ){
    blob_init(&content, gg.aData, gg.nData);
    fast_insert_content(&content, gg.zMark);
    blob_reset(&content);
  blob_init(&content, gg.aData, gg.nData);
  fast_insert_content(&content, gg.zMark);
  blob_reset(&content);
  }
  import_reset(0);
}

/*
** Use data accumulated in gg from a "tag" record to add a new 
** control artifact to the BLOB table.
*/
184
185
186
187
188
189
190



191
192
193
194
195
196
197
198

199
200
201
202
203
204
205
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206







+
+
+








+







*/
static int mfile_cmp(const void *pLeft, const void *pRight){
  const ImportFile *pA = (const ImportFile*)pLeft;
  const ImportFile *pB = (const ImportFile*)pRight;
  return strcmp(pA->zName, pB->zName);
}

/* Forward reference */
static void import_prior_files(void);

/*
** Use data accumulated in gg from a "commit" record to add a new 
** manifest artifact to the BLOB table.
*/
static void finish_commit(void){
  int i;
  char *zFromBranch;
  Blob record, cksum;
  import_prior_files();
  qsort(gg.aFile, gg.nFile, sizeof(gg.aFile[0]), mfile_cmp);
  blob_zero(&record);
  blob_appendf(&record, "C %F\n", gg.zComment);
  blob_appendf(&record, "D %s\n", gg.zDate);
  for(i=0; i<gg.nFile; i++){
    const char *zUuid = gg.aFile[i].zUuid;
    if( zUuid==0 ) continue;