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

Re: New SHA1 property for nodes returned 'svn ls --xml' invocations.

From: Branko ─îibej <brane_at_apache.org>
Date: Sat, 24 Sep 2016 15:12:34 +0200

On 24.09.2016 14:36, Paul Hammant wrote:
> In order to be able to do some Merkle-tree style functions on sets of files
> canonically held in Subversion, it would be great to ask Svn for a SHA1 for
> the files, or collections thereof from that node downwards.
> I would raise a new feature request direct into Svn, but the JIRA notes
> says to not do that, and instead to come here to discuss.
> More info: the technology I'm playing with doesn't do a svn checkout, but
> instead monitors the the repo via 'svn ls' (via polling). It is easiest to
> hit up the root note and ask for a sha1, then walk the tree (remotely) to
> get the actually changes nodes deeper in the tree. Sure, the revision
> integer is there too - but I need to compare to a *local* representation of
> the same tree that's not under subversion control, and I'll have to
> calculate SHA1 of the resource immediately after bringing it down from the
> server (rather that just trusting the server's version).
> Of course, I'm focussed on 'svn ls' and I am sure there are other functions
> that could report the SHA1 too.

Using the Subversion API directly would be the best way to do this. The
checksum is available at the API level, but wouldn't serve any useful
purpose in the output of 'svn ls' -- which is, after all, a user, not
machine interface.

-- Brane
Received on 2016-09-24 15:12:39 CEST

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