首页 文章

Subversion FSFS repo中缺少格式文件

提问于
浏览
2

我尝试在VisualSVN Server,Windows Server 2012中为 very old Subversion存储库设置http服务器 .

在VisualSVN Server(apache svn 1.8)中导入时,它说

无法打开文件'C:\ Reps **** \ format':系统找不到指定的文件 .

我找到了文件,在\ db中命名为“format”并选择它进行导入,然后就说了

预期的存储库格式为“3”或“5”;找到格式'2'

我也尝试通过svnadmin v1.5升级repo

预期的存储库格式为“3”或“5”;找到格式'2'

如何将repo升级为新格式?

1 回答

  • 2

    $REPO/db/format 处的文件与Subversion为您提供的错误信息不同于 $REPO/format . $REPO/format 处的文件是存储库格式, $REPO/db/format 处的文件是文件系统格式 .

    存储库格式编号具有以下值(从repos.h复制):

    /* Repository format number.
    
       Formats 0, 1 and 2 were pre-1.0.
    
       Format 3 was current for 1.0 through to 1.3.
    
       Format 4 was an abortive experiment during the development of the
       locking feature in the lead up to 1.2.
    
       Format 5 was new in 1.4, and is the first format which may contain
       BDB or FSFS filesystems with a FS format other than 1, since prior
       formats are accepted by some versions of Subversion which do not
       pay attention to the FS format number.
    */
    

    正如错误消息告诉您的唯一支持的格式是3和5(因为兼容性保证仅从1.0开始) .

    如果 $REPO/format 文件是唯一缺少的文件,这将很容易修复 . 实际上我们可以从上面给出的信息中确定它应该是两个选项中的哪一个 .

    由于您声明存储库是fsfs格式,因此如果文件系统是格式1,它应该只是格式3存储库 . 因此,如果该文件的第一行是1,请查看 $REPO/db/format 然后您需要将存储库格式文件设置为"3\n" ,否则将其设置为"5\n" . 但是,在这种情况下,因为您将 $REPO/db/format 文件复制到 $REPO/format ,错误消息告诉我它是格式2文件系统 . 所以你应该在 $REPO/format 中有"5\n" .

    请注意, $REPO/format 文件应仅包含两个字符,格式编号的ASCII字符和换行符 .

    最后一个提示 . 您没有't need to upgrade a repository in order to use it with a Subversion server. Servers are backwards compatible with old repositories. Some features may not be available if you don' t升级存储库格式 . 有关详细信息,请参阅Subversion release notes .

相关问题