monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: How to apply "automate get_revision" data


From: Brian Downing
Subject: [Monotone-devel] Re: How to apply "automate get_revision" data
Date: Mon, 12 Nov 2007 03:24:58 -0600
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

Brian Downing wrote:
Nathaniel Smith wrote:
In general, there is no order you can apply them in; they are to be
applied "all at once".  It's more like a declarative description of
how two trees map to each other than it is a procedural description
of how to produce one tree from another.  The algorithm for working
with such things is a little subtle; the best description I know of
is:
http://mebentley.blogspot.com/2005/12/tree-transforms-on-posix-filesystems.html
(This is Aaron Bentley talking about bzr, but mtn and bzr
independently invented identical algorithms here, so it still
applies.)

Interesting.  I'll see if that'll be too complex for me to implement.

In case anybody's interested, this turned out to be very easy for Git's case, since it doesn't care about rename identity or directories.

a) Move all renamed paths to temporary paths, longest pathname first.
b) Delete all paths, longest pathname first.
c) Move all temporary paths to new paths, shortest pathname first.
d) Apply all new and patched files.

These rules yield an identical Git repository for net.venge.monotone as one imported with manifests, and runs a whole lot faster.

-bcd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]