Jean-Baptiste DUBOIS wrote on Tue, Mar 09, 2021 at 12:02:51 +0000:
> I have one last question regarding how svn tags are managed internally in
> fsfs.
> Is svn tag considered as a PLAIN data independant of previous revs or not ?
As far as FSFS is concerned, there's no such thing as a tag. What FSFS
deals with is a zero-indexed array of interrelated directory trees.
By "tag" people normally refer to a child of a well-known directory;
specifically, to its contents and copyfrom information. About these:
- The contents of any given file are stored in that file's `Last Changed
Revision` rev file or in an older rev file. The latter case is only
possible when rep-sharing is enabled, which in your case it's not,
because you use format 2 ("f2"). Watch:
.
1 % svn info --show-item=last-changed-revision file://$PWD/iota{0,1}@86
2 86 file://$PWD/iota0
3 85 file://$PWD/iota1
4 % svnlook tree --show-ids -r 86 ./
5 / <0.0.r86/428>
6 iota0 <2.0.r86/210>
7 iota1 <1.0.r85/210>
8 % xxd -s 210 -l 4096 -p db/revs/85 | xxd -r -p | sed -e '/^$/q'
9 id: 1.0.r85/210
10 type: file
11 pred: 1.0.r83/111
12 count: 42
13 text: 85 0 188 2340 b6cff4dd559998419b5210d8de7c7130
14 cpath: /iota1
15 copyroot: 0 /
16
iota1@86's node-rev header is in r85 (line 7). Its rep is also in r85
(line 13), but in a rep-sharing situation, it might've been in an
older rev file.
Line 8 was written for f2. For a variant supporting f3, f4, and f6, see
<https://mail-archives.apache.org/mod_mbox/subversion-dev/201110.mbox/%3C20111002182635.GA11238%40daniel3.local%3E>.
[For the curious, the bug manifesting in that post is #4129. It was
finally reproduced the following March:
<https://mail-archives.apache.org/mod_mbox/subversion-dev/201203.mbox/%3C20120319122433.GA507%40daniel3.local%3E>.]
- The copyfrom information is stored in the node-rev header, so it'll be
stored in the rev file of the revision the tag was created in.
Under f2, which doesn't deltify directory reps (see
SVN_FS_FS__MIN_DELTIFICATION_FORMAT), the node-rev itself will be
accessible via the API, as discussed upthread.
Finally, note that "data independent of previous revs" and "PLAIN data"
aren't synonyms, since self-deltas are a thing.
Cheers,
Daniel