monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Extensions to automation, again


From: Thomas Keller
Subject: [Monotone-devel] Extensions to automation, again
Date: Wed, 18 Oct 2006 18:53:32 +0200
User-agent: Thunderbird 1.5 (X11/20060317)

Hi all!

So I was struggeling around today what I could do with guitone as the
whole graph creating thing is stucked a bit and thought some kind of
diff dialog would be cool to build in. Then I thought about the
prerequisites of such a thing and immediately found that it can't be
done (easily) with the current automation interface, basically for those
reasons:

a) there is no automate diff command
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
c) if one finally would gather the file's ID, one would still not have
information about the file itself (binary/non-binary, filesize), which
would be needed to determine if one is able to display a diff dialog at
all or not and also to prepare the user that f.e. displaying the diff of
a 9MB text file could take some time (and therefor ask him if he really
wants to do so, etc.)

So I thought it would be cool to have the following (additional)
automate commands:

automate get_file_by_path PATH [REVISION]
 -> returns the complete file given in path in a certain revision,
    if the revision is omitted, this basically returns the current
    contents of the file in the current workspace revision

automate get_file_type PATH [REVISION]
 -> returns the file type binary/non-binary, again for the current
    or any other revision

automate get_file_size PATH [REVISION]
 -> returns the size in Bytes of the file in that version in history


Alternatively one could think about doing some `get_file_info` command,
which would combine _file_type and _file_size, would be basic_io and
could be expanded for further usage later on if more data should be
returned.

Opinions?

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]