monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Extensions to automation, again


From: Thomas Keller
Subject: Re: [Monotone-devel] Extensions to automation, again
Date: Wed, 18 Oct 2006 21:02:51 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923)

Timothy Brownawell schrieb:
a) there is no automate diff command


"Patches accepted", I'm sure.

Sure, but before I start coding... =)

b) if there would be a), then its still hard to get the contents of a
file, because one needs to read the complete manifest to get an ID


But won't you already have that, from when you got the list of files
that the user just picked one from to get a diff of?

No, I'm using automate inventory for this as I need the file's states (added, dropped, patched, renamed, aso.) as well.

binary/non-binary is IIRC an attribute (there's also a hook, but I think
that's only used for setting the attribute?), and so would be visible in
the manifest.

Yes, a file gets automatically a "mtn:manual_merge" attribute attached, but I'm unsure if this is persistent? I.e. will it come back even if I removed it explicitely in some revision?

filesize would require a schema change to be an improvement. Monotone
itself doesn't record how big the files are, it can only find this out
by reconstructing them.

I've looked around in database.cc and found that out as well. The problem here seems to be that a delta which comes as packet into a local db has no size information attached for the new file version one is able to create with it and of course, recreating a file locally just to find out how big it is, is stupid. I wonder if it would be possible to somehow smartly add up the sizes of the file deltas to get the complete file size? If I look at the unified diff output I'd say yes, because one could simply add up all bytes after a "-" prefixed line, and also those after a "+" prefixed line, would calculate the difference of both and add it up to the former file size.
However I have no idea how to do such a thing for binary deltas...

These would just be subsets of what get_manifest_of does. And I'd expect
that most applications that would be calling these would already have
results from get_manifest_of laying around.

Sure, was just an idea for simplification...

Thomas.


--
- "I know that I don't know." (Sokrates)
Guitone, a frontend for monotone: http://guitone.berlios.de
Music lyrics and more: http://musicmademe.com




reply via email to

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