svn 版本结构
本文描述 svn repository版本的物理結(jié)構(gòu)
下面是版本37的內(nèi)容及注釋,#之前的為內(nèi)容,之后的外注釋
?
DELTA 35 0 4#本版本是35版本的增量版本,0 4的意義不是很清楚
SVN^A^@^@^W^E^S^D~PE^F~B^Rdsfaew^M
wer^M
ewrweENDREP#直到ENDREP為增量?jī)?nèi)容
id: 0-35.0.r39/53#39版本的id號(hào)
type: file#類型為文件
pred: 0-35.0.r38/49#39版本前一版本的id號(hào)
count: 4#不清楚
text: 39 0 33 23 0ad7106c3e6e01aed9ccf59c4774934e
cpath: /openssh/dtest.c#相對(duì)庫根目錄路徑
copyroot: 0 /#根目錄為/
PLAIN#以下內(nèi)容為39版本修改文件的上層目錄包含內(nèi)容
K 7#表示以下內(nèi)容為7個(gè)字符
dtest.c#文件名
V 18#表示以下內(nèi)容為18個(gè)字符
file 0-35.0.r39/53#文件id
K 5
hello
V 17
dir 0-20.0.r21/77
K 6
ji.txt
V 18
file 0-34.0.r34/17
K 44
step1_libssl0.9.8_0.9.8g-4ubuntu3.3_i386.deb
V 22
file 4-3.0.r3/11156648
K 48
step2_libssl0.9.8-dbg_0.9.8g-4ubuntu3.3_i386.deb
V 22
file 2-3.0.r3/11156028
K 51
step3_openssh-blacklist_0.1-1ubuntu0.8.04.1_all.deb
V 22
file 3-3.0.r3/11156336
K 46
step4_openssh-client_4.7p1-8ubuntu1.2_i386.deb
V 22
file 5-3.0.r3/11156953
?
K 46
step5_openssh-server_4.7p1-8ubuntu1.2_i386.deb
V 22
file 1-3.0.r3/11155729
K 23
?~V°??o ?~V~G?~\??~V~G??£.txt#中文目錄顯示亂碼
V 18
file 0-17.0.r30/61
END
ENDREP
id: 0-3.0.r39/779
type: dir
pred: 0-3.0.r38/775
count: 20
text: 39 200 566 566 83f6470b16635398bc7bee06f1c776c0
cpath: /openssh
copyroot: 0 /
之后還有更上一層目錄,直到/目錄; 當(dāng)svn檢出39版本時(shí),svn將根據(jù)樹形往上然后平行,然后循環(huán)往下搜索形成一個(gè)完成的鏡像;所以說每個(gè)版本都是版本庫的一個(gè)鏡像;?當(dāng)你以某個(gè)版本號(hào)num檢出某個(gè)目錄時(shí),首先找到物理文件為num,然后根據(jù)其中的樹進(jìn)行搜索,最終檢出需要的目錄;
?
轉(zhuǎn)載于:https://blog.51cto.com/liubincm/387284
總結(jié)
- 上一篇: Windows Azure 真实案例:C
- 下一篇: 1er