[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: Daniel Shahaf <danielsh_at_elego.de>
Date: Thu, 29 Nov 2012 09:58:29 +0200

Eric S. Raymond wrote on Thu, Nov 29, 2012 at 00:59:45 -0500:
> In summary, Subversion repository histories do not round-trip through
> reposurgeon editing. File content changes are preserved but some
> metadata is unavoidably lost. Furthermore, writing out a DVCS history
> in Subversion also loses significant portions of its metadata.
>
> Writing a Subversion repository or dump stream discards author
> information, the committer's name, and the hostname part of the commit
> address; only the commit timestamp and the local part of the
> committer's email address are preserved, the latter becoming the
> Subversion author field. However, reading a Subversion repository and
> writing it out again will preserve the author fields.
>
> 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.)

2) You can define custom revision properties. In your case, the easiest
way would be to set an reposurgeon:author property, alongside the
svn:author property.

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.

I note that one can set revision properties at commit time:

    svn commit -m logmsg --with-revprop svn:original-author="Patch Submitter <foo_at_bar.example>"

> Empty directories aren't represented in import streams. Consequently,
> reading and writing Subversion repositories preserves file content,
> but not empty directories. It is also not guaranteed that after
> editing a Subverson repository that the sequence of directory
> creations and deletions relative to other operations will be
> identical; the only guarantee is that enclosing directories will be
> created before any files in them are.

How does reposurgeon handle empty directories with (node) properties?

% svnadmin create r
% svnmucc -mm -U file://$PWD/r mkdir foo propset k v foo

> Subversion has a concept of "flows"; that is, named segments of
> history corresponding to files or directories that are created when
> the path is added, cloned when the path is copied, and deleted when
> the path is deleted. This information is not preserved in import
> streams or the internal representation that reposurgeon uses. Thus,
> after editing, the flow boundaries of a Subversion history may be
> arbitrarily changed.
>
> This is me being obsessive about documenting the details. I think it
> is doubtful that most Subversion users even know flows exist.
>

I think you're saying that adds might turn into copies, and vice-versa.
That is something users would notice --- it is certainly exposed in the
UI --- even though node-id's are not exposed to clients.

>

Cheers

Daniel
Received on 2012-11-29 09:00:43 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.