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

Re: 0.4 draft of new dumpfile documentation

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Tue, 20 Dec 2011 15:40:27 +0200

Stephen Butler wrote on Tue, Dec 20, 2011 at 14:08:17 +0100:
>
> On Dec 20, 2011, at 12:51 , Eric S. Raymond wrote:
>
> > Still working on it as I await restoration of commit access. Here's the
> > 0.4 version. Note the two open questions and the buglet.
>
> [[[
> 1. Is it true that a replace operation on a directory *must*
> have a copyfrom source?
> ]]]
>
> No. A replace operation can create a "fresh" item without prior
> history. For example, the following node record is acceptable to
> 'svnadmin load', assuming there's already a file at ^/omega.
>

And this is how to produce such a thing:

svnadmin create r
svn checkout file://$PWD/r wc
cd wc
mkdir A; touch iota;
svn add A iota
svn commit -madd
svn up
do-replace() {
  svn rm A iota
  mkdir A; touch iota;
  svn add A iota
}
do-replace
svn commit -mreplace
svnadmin dump --deltas --incremental -r2 ../r

Some other definitions that work are:

do-replace() {
  svn rm A iota
  mkdir iota; touch A;
  svn add A iota
}

do-replace() {
  svn rm A iota
  svn commit -m rm
  svn up
  svn copy ^/A_at_1 A; svn copy ^/iota_at_1 iota;
}

And even:

do-replace() {
  svn rm A iota
  svn cp ^/@0 A; svn cp ^/@1 iota;
  # well-defined; does not cause a loop
}

> [[[
> Node-path: omega
> Node-kind: file
> Node-action: replace
> Prop-content-length: 30
> Text-content-length: 9
> Text-content-md5: a2f613b8081a42cc0ff004f1191fe59e
> Text-content-sha1: 772ec56b2bff8db0bb4adb065ce9f212838a5143
> Content-length: 39
>
> K 3
> foo
> V 7
> new foo
> PROPS-END
> new text
>
>
> ]]]
>
Received on 2011-12-20 14:42:55 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.