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

Re: expanding custom keywords in dump

From: Branko Čibej <brane_at_wandisco.com>
Date: Fri, 31 Jan 2014 13:26:58 +0100

On 31.01.2014 11:07, Julian Elischer wrote:
> I’m trying to automate the real-time importing (mirroring) of the
> FreeBSD SVN tree into a Perforce tree. This is not for FreeBSD
> development but to allow integration of two projects, both based on
> FreeBSD (and leaving p4 is not an option :-( ).
> Perforce have a tool that takes a SVN dump and converts it into
> perforce transactions in a very 1:1 way (p4import-svn).
> Unfortunately the one thing that fails is that custom keywords are not
> expanded. This doesn’t seem much but in the merged project there is no
> way to see what revision of file was imported from the FreeBSD
> repository, as the “$FreeBSD$” keyword is left unexpanded on export.
> This also means that files that are moved across to Perforce will
> always have diffs with files taken from the DVD images as they have
> the keyword expanded. One project started with a DVD image so the
> large project i’m merging with has a lot of freeBSD files taken from
> that DVD, and thus there are a lot of false merge conflicts.
> Is there any way that the subversion dump routine can be configured to
> allow expansion of these keywords? In this usage, the dump is
> effectively playing the part of the client. Having it expand the
> keywords would allow the expanded version to be imported into Perforce
> which would then contain files that would match what is exported on
> the DVDs.
> Would this even be a useful thing for exporting the a project repo to
> another SVN based repo so that such keywords would be “frozen” in place?

There's currently no way to tell either 'svnadmin dump' or 'svnrdump
dump' to expand keywords. These tools were designed to create a backup
of the repository, not the working copy; and since the repository stores
keywords unexpanded, there was no reason to add such a feature.

Note that expanding keywords in the dump would make no sense for
Subversion in any case; since the svn:keywords properties are also part
of the dump, a client would expect them to be unexpanded in the
repository and would report spurious diffs in the keyword expansion.

Expanding keywords might, you point out, be useful for migrating to
another VCS, and adding such an feature is definitely an option. Patches
are always welcome.

-- Brane

Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2014-01-31 13:27:35 CET

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

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