On Wed, May 7, 2008 at 11:03 AM, Ibrahim Tannir <[EMAIL PROTECTED]> wrote:
> FWIW, to let my paranoia out:
>
> I don't like SVN because it obscures and packs the whole
> repository into one big file, which IMHO overshadows all its
> benifits.
>
> I've been able in tha past to resolve the consequences of quite a
> few CVS bugs, due to the open structure of its repository.
>

That's a good point.

Mercurial and Git etc. are inherently better than cvs/svn because each
time someone clones they get the full repo. A kind of built-in backup.

That doesn't protect against cosmic rays, Murpheys Law. Perhaps a nice
way to handle this is to use the ultimate text format as backup -
patches.  Mercurial has the nice feature that you can export commits
as patches with a set of special headers which preserve the
mercurial-specific info, such as the hashes, and the stuff that
patches don't carry, such as the username, date etc.

You could set up a trigger to dump a copy of each commit as a patch in
some directory. I haven't tried, but I guess it wouldn't be too hard.

You can simulate it by importing the whole repo into a patch queue:

  hg clone ~/in/naviserver ~/ns-test
  cd test
  hg qinit
  hg qimport -r :

The ':' is python-like slice notation for a range of commits, which in
this case says 'everything'. You could also say -r 0:tip.

The patches are kept in numbered order in:

  ~/ns-test/.hg/patches

Another of the nice properties of mercurial is the content hashing,
which like git uses sha1 to hash the content of each changeset,
including the metadata. Mercurial also mixes in the hash of the
parent(s) changesets. So, when you reapply all the patches to
reconsitute the repo, and corruption will be noticed because the
hashes won't match.

This would be a nice little project for someone...

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to