我可以从另一个数字开始创建一个 Subversion 存储库吗? [英] Can I create a Subversion repository starting at another number?

查看:16
本文介绍了我可以从另一个数字开始创建一个 Subversion 存储库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个新的存储库,其中修订的价值是我想要的.

I want to create a new repo where the value of the revision is whatever I want it to be.

svnadmin create REPOS_PATH --rev-number-to-start 10,000

就像处理支票簿一样.

推荐答案

很确定每个 rev 都必须存在,即使它是空的.我尝试执行 svnadmin create 并将 [repo]/db/current 文件修改为 10k,但这不起作用,因为没有任何 revs 存在.

Pretty sure each rev has to exist even if it's empty. I tried doing svnadmin create and the hacking the [repo]/db/current file up to 10k but that doesn't work because none of the revs are there.

我唯一能做的就是创建一个包含大量修订的存储库,转储它们,过滤掉所有内容,然后加载过滤后的空"转储文件.

Only way I could do it was to create a repository with a bunch of revisions, dump them, filter out everything and then load the filtered "empty" dump file.

for n in {0..4999}; do echo "--- $n"; svn mkdir fake; svn ci -m ""; svn rm fake; svn ci -m ""; done
svnadmin dump /path/to/repo > repo-10k.dump
svnadminfilter include zzz < repo-10k.dump > repo-10k-empty.dump
svnadmin create newrepo
svnadmin load newrepo < repo-10k-empty.dump

这篇关于我可以从另一个数字开始创建一个 Subversion 存储库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆