Fossil

Check-in [ac1dea8e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug in the "rm" command. Delete an obsolete documentation file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ac1dea8eac8d3e94d44da33bb0bf4f9f1fd6e649
User & Date: drh 2007-07-24 13:00:19
Context
2007-07-24
18:15
File format document change: UUIDs use lowercase not uppercase hex. check-in: 01e7596a user: drh tags: trunk
13:00
Fix a bug in the "rm" command. Delete an obsolete documentation file. check-in: ac1dea8e user: drh tags: trunk
12:54
Merge in the latest SQLite updates. check-in: d8590e09 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
  blob_zero(&manifest); 
  blob_appendf(&manifest, "C %F\n", blob_str(&comment));
  zDate = db_text(0, "SELECT datetime('now')");
  zDate[10] = 'T';
  blob_appendf(&manifest, "D %s\n", zDate);
  db_prepare(&q,
    "SELECT pathname, uuid FROM vfile JOIN blob USING (rid)"
    " WHERE vfile.vid=%d"
    " ORDER BY 1", vid);
  while( db_step(&q)==SQLITE_ROW ){
    const char *zName = db_column_text(&q, 0);
    const char *zUuid = db_column_text(&q, 1);
    blob_appendf(&manifest, "F %F %s\n", zName, zUuid);
  }
  db_finalize(&q);
................................................................................
  }
  manifest_crosslink(nvid, &manifest);
  content_deltify(vid, nvid, 0);
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
  printf("New_Version: %s\n", zUuid);
  
  /* Update VFILE */
  db_multi_exec("DELETE FROM vfile WHERE vid!=%d", vid);
  db_multi_exec("DELETE FROM vmerge");
  db_multi_exec("UPDATE vfile SET vid=%d, rid=mrid, chnged=0, deleted=0", nvid);
  db_lset_int("checkout", nvid);

  /* Verify that the tree checksum is unchanged */
  vfile_aggregate_checksum_repository(nvid, &cksum2);
  if( blob_compare(&cksum1, &cksum2) ){







|







 







|







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
  blob_zero(&manifest); 
  blob_appendf(&manifest, "C %F\n", blob_str(&comment));
  zDate = db_text(0, "SELECT datetime('now')");
  zDate[10] = 'T';
  blob_appendf(&manifest, "D %s\n", zDate);
  db_prepare(&q,
    "SELECT pathname, uuid FROM vfile JOIN blob USING (rid)"
    " WHERE NOT deleted AND vfile.vid=%d"
    " ORDER BY 1", vid);
  while( db_step(&q)==SQLITE_ROW ){
    const char *zName = db_column_text(&q, 0);
    const char *zUuid = db_column_text(&q, 1);
    blob_appendf(&manifest, "F %F %s\n", zName, zUuid);
  }
  db_finalize(&q);
................................................................................
  }
  manifest_crosslink(nvid, &manifest);
  content_deltify(vid, nvid, 0);
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
  printf("New_Version: %s\n", zUuid);
  
  /* Update VFILE */
  db_multi_exec("DELETE FROM vfile WHERE vid!=%d OR deleted", vid);
  db_multi_exec("DELETE FROM vmerge");
  db_multi_exec("UPDATE vfile SET vid=%d, rid=mrid, chnged=0, deleted=0", nvid);
  db_lset_int("checkout", nvid);

  /* Verify that the tree checksum is unchanged */
  vfile_aggregate_checksum_repository(nvid, &cksum2);
  if( blob_compare(&cksum1, &cksum2) ){

Deleted www/base32.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<html>
<head>
<title>Fossil - Base-32 Name Encoding</title>
</head>
<body bgcolor="white">
<h1>Base-32 Name Encoding</h1>

<p>The name of a file or version in fossil is the
<a href="http://en.wikipedia.org/wiki/SHA-1">SHA-256</a> hash of
the content of that file or version expressed in a base-32 
encoding.  The digits of the base-32 encode are as 
follows:

<blockquote><b>
    0123456789abcdefghjkmnpqrstuvwxy
</b></blockquote>

<p>The letters "o", "i", and "l" are omitted from the
encoding character set to avoid confusion with the 
digits "0" and "1".  On input, upper and lower case 
letters are treated the same, the letter "o" is 
interpreted as a zero ("0") and the letters "i" and 
"l" are interpreted as a one ("1").</p>

<p>
Each character of the base-32 encoding represents 5 bits
of the hash.  The first four bits of the SHA256 hash are
repeated onto the end of the hash to make the hash a multiple
of 5 bits in length.  In this way, the final digit in the
52-digit base-32 number represents a full 5 bits.
</p>

<p>As an example, the name of the current head version in
fossil's self-hosting repository is:</p>

<blockquote><b>
    wj5nmfgr2u62pnkd35a93h7481w2utdkgs2mptf8gyy6qswf1v47
</b></blockquote>

<p>Fossil uses the full 52-character filenames internally.
But for human interaction, filenames
are may be abbreviated to a unique prefix.
In practice, 4 or 5
characters are usually sufficient to give a unique 
name prefix to files even in the largest of projects.
So we can refer to the current version of fossil as just:</p>

<blockquote><b>
    wj5nm
</b></blockquote>

</body>
</html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<