[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: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Sun, 25 Sep 2016 01:06:04 +0300

On 24 September 2016 at 15:36, Paul Hammant <paul_at_hammant.org> 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.
>
> Someone else might say SHA-2 or 3, and I'm happy to bow to their expertise.
>
The problem that SHA-1 checksum for files is optional: older
repositories/servers may not have this information stored.

-- 
Ivan Zhakov
Received on 2016-09-25 00:06:37 CEST

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