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

Re: Official way to create an empty revision

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 1 Oct 2014 22:59:53 +0000

Julian Foad wrote on Wed, Oct 01, 2014 at 10:52:42 +0100:
> Daniel Shahaf wrote in the thread "No no-op changes":
> > Should we provide an "official" way to create an empty revision?  That
> > is, a revision whose changed-paths list is empty?
> >
> > Use-cases:
> >
> > 1. Suppose last backup is r100 and revisions r101:r105 were lost; then
> > after restoring the backup, the admin would create 5 empty revisions.
> >
> > 2. Force an empty revision for whatever reason, such as to make the
> > revnums sync to something:
> > 2.1. See r3 of the regression test merge_tests.py#125 svnmucc_abuse_1().
> > 2.2. W hen loading our repository to the ASF repository, if Joe had
> > created 26 empty revisions, then The Offset would have been 840100
> > rather than 840074, which would make our mental math easier.
> What should the author and log message be on the empty revs? I suppose
> these need to be optionally specified, defaulting to blank?

The log message should default to a stock log message (like
SVNAutoversioning and 'svndumpfilter exclude' without --renumber-revs),
not to an empty one. As in SVNAutoversioning, we might want an
svn:empty-revision boolean revprop.

The author of a revision created by svnadmin is "the administrator"; we
have not defined a way to represent this value in an svn:author revprop.

> What should the date stamps be on the empty revs? A thought: it seems
> cleaner to specify that they should all have the same date stamp than
> that they do/don't/may all have different date stamps. (Imagine a
> future back-end in which we can create millions of 'virtual' empty
> revs in O(1) time and space as long as their rev-props are all
> identical.) The default for 'svnadmin load --prefix-empty-revs'
> without '--ignore-dates' ("ignore revision date stamps found in the
> stream") should, I suppose, be that all the prefix empty revs have the
> same date stamp as the first revision loaded.

I don't see what API-consumer-level purpose having the same svn:date
would serve; it seems to me it would suffice to guarantee

    r100 < r101 ≤ r102 ≤ r103 ≤ r104 ≤ r105 < r106

    (where "x < y" ⇔ "svn:date value of y is younger than that of x",
    and the promise regarding r106 is conditional upon that revision
    being a "normal" commit ( load operation)).

If the purpose of the same-dateness was to make detecting the range
easier, we could achieve that explicitly by setting
svn:empty-revisions-start=101 and svn:empty-revisions-end=105 revprops
on each revision in the range (r101:r105).

Thanks for your feedback, Julian. I've filed issue #4521 to track this:
http://subversion.tigris.org/issues/show_bug.cgi?id=4521 "svnadmin should provide a way to create empty revisions"


> - Julian
> [1] <http://www.timj.co.uk/2011/09/generating-emptypadding-revisions-in-an-svn-dump/>
> [2] <http://stackoverflow.com/questions/7030041/can-i-create-a-subversion-repository-starting-at-another-number>
Received on 2014-10-02 01:00:26 CEST

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.