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

Re: reposurgeon now writes Subversion repositories

From: Branko Čibej <brane_at_wandisco.com>
Date: Thu, 29 Nov 2012 13:41:34 +0100

On 29.11.2012 12:46, Eric S. Raymond wrote:
> Daniel Shahaf <danielsh_at_elego.de>:
>>> Subversion's metadata doesn't have separate author and committer
>>> properties, and doesn't store anything but a Unix user ID as
>>> attribution. I don't see any way around this.
>> You're not fully informed, then.
>>
>> 1) svn:author revprops can contain any UTF-8 string. They are not
>> restricted to Unix user id's. (For example, they can contain full
>> names, if the administrator so chooses.)
> Right. At one point during the development of this feature I was
> accidentally storing the full email field in this property. So I
> already knew that this is allowed at some level.
>
> And, I have no trouble believing that svn log will cheerfully echo
> anything that I choose to stuff in that field.
>
> But...
>
> (1) How much work would it be it to set up a Subversion installation
> so that when I svn commit, the tool does the right thing, e.g. puts
> a DVCS-style fullname/email string in there?

I don't know how common that practice is, but I've worked on a project
where svn:author was filled in from the DN and e-mail attributes of an
X-509 certificate. It's also quite easy to set svn:author from
information stored in LDAP (that is, if you find anything about LDAP
actually easy).

> (2) Have the tools been tested for bugs arising from having whitespace
> in that data?

Which tools? If you mean Subversion libs and command-line client, then yes.

> Really, if it's actually easy to set up DVCS-style globally unique IDs you
> Subversion guys ought to be shouting it from the housetops. The absence
> of this capability is a serious PITA in several situations, including
> for example migrating projects between forges.

Well, I find that we don't actually spell out anywhere that svn:author
can be pretty much any UTF-8 string. It can even contain newlines,
although that's not recommended.

> RFC: If I wrote a patch that let Subversion users set their own
> content string for the author field in ~/.subversion/config, would
> you merge it? Because I'd totally write that.

Hint: svn commit --with-revprop svn:author="Twizzle Strongpants
<ts_at_interwebs>"

I personally wouldn't mind if that were a user preference in the config
file. It'd have to be a per-server config option, however; and even
better, per-repository, which is a concept that the Subversion config
file does not currently support. (There's a reason why I put my ID into
.git/config, not ~/.gitconfig.)

Note that it's up to the server administrator to actually allow clients
to set svn:author (and any other revision property). The assumed, and
most common, configuration is that the server derives svn:author from
authentication information.

[...]

>> You might also seek community consensus to reserve an svn:foo name for
>> the "original author" property --- perhaps svn:original-author --- so
>> that reposurgeon and other git->svn tools can interoperate in the way
>> they transfer the "original author" information.
> OK. But I like the idea of letting the users set their own author
> content string better. Instead of another layer of kluges, why
> shouldn't Subversion join the DVCSes in the happy land of
> Internet-scoped attributions?

This discussion has come up before. Today, the assumption that
svn:author is something that the server has verified (modulo admins'
shenanigans) is pretty much cast in concrete.

I'm open to suggestions, up to and including breaking that assumption,
though obviously I'd prefer not to.

-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2012-11-29 13:42:15 CET

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

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