[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Berkeley's db_dump is your friend. Your *best* friend.

From: Ben Collins-Sussman <sussman_at_newton.ch.collab.net>
Date: 2001-03-01 23:57:55 CET

Karl Fogel <kfogel@galois.ch.collab.net> writes:

> Filesystem developers will want to be able to type this in their
> sleep:
> db_dump -p nodes

Wow, this is amazing. Here's a printout of the repos right after
running fs-test #6, the one which creates an empty file:

 (\0a fulltext \0a (\0a (\0a dir \0a (\0a )\0a )\0a (\0a )\0a )\0a)
 (\0a fulltext \0a (\0a (\0a dir \0a (\0a )\0a (\0a mutable \0a 0\0a\0a )\0a )\0a (\0a (\0a beer.txt \0a 3\0a1.1\0a )\0a )\0a )\0a)
 (\0a fulltext \0a (\0a (\0a file \0a (\0a )\0a (\0a mutable \0a 3\0a0.1\0a )\0a )\0a 0\0a\0a )\0a)

Notice node-rev 0.0 is a dir with no mutable flag, and no dirents.
This is the "root" node made when the fs is created.

Notice that 0.1 is the root of the first transaction: it's a clone of
the root node. How can we tell?

  * You can tell they're both revisions of node 0, because they're
    both named "0.*".

  * The only difference between 0.0 and 0.1 is that the the latter has
    the "mutable" flag.

And finally, notice our new empty file -- node 1. It's of type
"file", has the mutable flag (which points to parent 0.1), and has no

Received on Sat Oct 21 14:36:24 2006

This is an archived mail posted to the Subversion Dev mailing list.