[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Command-line interface to cached log

From: <Stefan.Fuhrmann_at_etas.com>
Date: 2007-11-10 14:31:40 CET

"Alexander Klenin" <klenin@gmail.com> wrote on 09.11.2007 12:31:24:

> On Nov 9, 2007 8:20 PM, <Stefan.Fuhrmann@etas.com> wrote:
> > "Alexander Klenin" <klenin@gmail.com> wrote on 09.11.2007 07:04:04:
> > But the idea is to limit that to XML I/O (i.e. exchange / import
> > log data without hogging the server). Whether it will support
> > merge info is yet to decide. Basically, the output would be
> > similar to
> >
> > svn log --xml [-v] [-rR1[:R2]] URL[@peg]
> >
> > Would such a simple XML I/O sufficient for your use-case?
> Yes, although slightly less efficient (due to extra parsing required).
> I would also like an ability to show log from the working copy (i.e.
> omitting URL),
> but I presume this is implied?

Not necessarily, if this is only cached data I/O (without
fetching data from SVN). But we may support WC paths and
auto-update as well (see below).

> I re-read issuetracker entry, and, on the one hand, did not notice
> anything about command-line client,
> but, oh the other hand, noticed that you have already tested XML output.

Sorry, I thought I had been more explicit in the issue tracker.
The idea is that the LogCache.Exe control tool that provides
some interface for basic cache manipulation like

        * list caches plus a little statistics (size etc.)
        * add / remove caches
        * update caches (fetch new entries from repository)
        * XML or other I/O

It is *not* intended to become a SVN.exe replacement.

> Is it true that XML output is implemented and just lacks user
> interface to access it?

There is a small test client: $TSVNRoot\src\LogCache\LogCache.vcproj
It uses CXMLLogReader and CXMLLogWriter for file I/O.
However, there is no full-fletched XML I/O interface, yet.

> If so, could you please point me to the code you used for testing it --
> perhaps I will be able to implement command-line interface myself?

Implementing such a thing shouldn't be hard to do:

        * (let something) parse the CL parameters
        * implement ILogReceiver:
                - sort *changes (if not NULL)
                - push formatted text to some output stream
                - test for Ctrl-Break (optional)
        * if some revision is given as HEAD:
                - optionally use SVN::GetRootAndHead() to efficiently map
                  HEAD to a "proper" revision number
        * instantiate CCacheLogQuery and call Log()
This will work similar to what LogDlg is doing (i.e. all path
formats should be supported, auto-fetch data from repository,
revision order is always descending).

You are very welcome to give it a try. Maybe we should look
for a proper EXE name. Any suggestions? TortoiseLog?

-- Stefan^2.

To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat Nov 10 14:38:04 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.