[darcs-users] can we remove --no-pristine-tree?
Max Battcher
me at worldmaker.net
Thu Jan 8 16:32:57 UTC 2009
Dan Pascu wrote:
> There is one use case of a copy without a pristine tree that cannot be
> substituted by a tree without a working copy, which is to offer a
> viewable copy that you do not edit; for example if you have your web
> pages under version control in darcs and a copy of the repository is
> directly viewable on the web. In this case you need the working copy,
> even though you do not make edits in it, but can do without the pristine
> tree which is not needed. However the only reason to not have the
> pristine tree is to save disk space, which frankly is quite cheap and big
> enough nowadays to not worry about using twice the space for a given
> repository, so I do not think that having an option for this is worth,
> especially if is not supported by the darcs-2 format, and if it makes
> everything slower as it has to built a temporary pristine tree on every
> operation.
You could simply point people to pristine files and a good webserver
should automatically un-gzip them for browsers that need that... For
pristine.hashed the URLs won't be that easy to remember and will need
changing at any file update, but still...
Even more interesting as a solution for this use case is that for
symlink-supporting web servers you could write a simple posthook script
to create "working directory symlinks" that always point to their
respective pristine object. I'm not sure that you save all that much
space/computation time in working directory symlinks over a standard
darcs working directory, but it could be something fun to experiment with.
> The --no-working-directory option however sounds more useful and
> conceptually better when it comes to indicate that a repository is read
> only (push only backup copies, or a repository meant only to synchronize
> multiple developers).
Indeed. As the originator of the --no-working-directory request I'm
extremely happy to see it back on the discussion table. With
pristine.hashed and a global cache a server utilizing
--no-working-directory can be very space efficient in storing a large
number of related repositories.
--
--Max Battcher--
http://worldmaker.net
More information about the darcs-users
mailing list