Hi all,
I just committed a branch, net.venge.monotone.simple-resurrect.
This has one revision on it: 7bedf809be5453501c62668a2e00d2a900dc160a .
That revision has a simple file resurrection system, which I think
is the moral equivalent of the 'add, suture' model that is being
presented in the other thread. It adds a '--livelivelive' option to
monotone that reverses the way file liveness normally works.
To resurrect a dropped file, merge a rev with the file still alive
with a rev where it is dead, and supply the new '--livelivelive'
option. The file will be alive in the child rev. e.g.
a: foo is created
/ \
b c: foo is dropped
\ /
d: merged with the "--livelivelive" flag, so b's alive foo wins
over c's dead foo and foo lives!
Issues:
- At the moment this is just a proof of concept. If you try to
interact with 'standard' monotone, then the standard monotone will
fail invariants.
- If you later merge another descendent of c (with foo dead) with a
descendent of d, then diediedie merge will take over and the file will
die again. You need to use --livelivelive for each merge where you
want the file to live. (It is the lack of marks which means we cannot
use a more sensible merge scheme here.)
- At the moment the UI is very simple. There is no way to specify
files. If two files are dead on one side of a merge, alive on the
other, and you use '--livelivelive' then both files will come back.
- There are #warnings in the code where I wanted someone else to
check I wasn't missing anything.
Overview: I'm not sure what I think of this. It gives us
resurrection, and would probably work fine most of the time, but the
fact that it will fall back to diediedie merge and delete files you
weren't expecting in some situations is... worrying.
But it is now there for people to evaluate.
Be well,
Will :-}
_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel