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

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

From: Paul Hammant <paul_at_hammant.org>
Date: Sat, 24 Sep 2016 08:36:37 -0400

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.

- Paul
Received on 2016-09-24 14:36:45 CEST

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