人为增加 SVN (FSFS) 存储库中的修订号

发布于 2024-08-02 02:43:59 字数 451 浏览 11 评论 0原文

我的公司正在执行 SVN 存储库迁移,我希望避免两个存储库(目前都处于活动状态)之间的修订号重叠。

我的要求是强制将新存储库修订为特定修订号(例如:100.000)。

通过分析 FSFS 存储库,我发现了“db/current”文件,这听起来像是更改存储库编号的正确位置。

有人对这个程序有任何经验吗? 我希望以后避免发生奇怪的事情!

PS:我知道我可以向存储库创建“100.000”个虚拟提交。 请分享您在此类过程中的经验以及在过程

PS3 期间和之后存储库可能出现的性能问题:我知道让每个人在过程之前提交工作副本可能是一个好主意。 这对我们来说不是问题(新存储库目前的用户非常有限)。 不过,如果您有此或类似要求的经验,请分享! :)

PS3:我知道这不是标准的 SVN 程序,许多人可能会反对该要求本身。 让我们假设我的要求是合理的! :)

My company is performing a SVN repository migration and I would like to avoid overlapping of revision numbers between the two repositories (which are both active at the time being).

My requirement is to force the revision of the new repository to a specific revision number (say: 100.000).

By analyzing the FSFS repository I have come across the "db/current" file which sounds like the right place where to change the repository number.

Does anyone have any experience with this procedure? I would like to avoid strange things happening in the future!

PS: I understand I can create "100.000" dummy commits to the repository. Please share your experience with such procedure and possible performance issues of the repository during and after the prodecure

PS3: I understand that it might be a good idea to have everybody commit working copies before the procedure. This is not a problem for us (the new repository has very limited users right now). Still, if you have experience with this or similar requirements, please share! :)

PS3: I understand this is not a standard SVN procedure and many might object with the requirement itself. Let's just assume my requirement is sound! :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

失去的东西太少 2024-08-09 02:43:59

http://subversion.tigris.org/ds/viewMessage。 dsForumId=1065&dsMessageId=940194

问:有没有办法人为地增加存储库修订版
颠覆的数量?

答:唯一的方法是提交一些虚拟修订。

http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=940194 :

Q: Is there a way to artificially increment the repository revision
number in subversion?

A: The only way to do it would be to commit a number of dummy revisions.

你又不是我 2024-08-09 02:43:59

首先,不要费心去尝试这个。 如果您要合并 2 个,您可以使用 dump/load 将新的放在旧的之上,修订号将为您处理。 因此,除非您需要知道特定版本的修订号(可能是外部版本或标签),否则您根本不必担心这一点。

如果您可以使用该工具,那么它总是比后来发现 svnsync 或 svnadmin pack 无法与您修改的存储库一起使用要好。

好的,所以如果您仍然想这样做,请更新 revprop 0 和 db/current 文件中的最新修订号,应该没问题。

但我认为您不会找到任何对这种方法有直接经验的人!

Firstly, don't bother trying to frig this. If you are to merge the 2, you can use dump/load to put the new one on top of the old and revision numbers will be handled for you. So unless you need to know what revision number a particular version is (for externals perhaps, or tags) then you needn't worry about this at all.

If you can work with the tool, its always better than finding later that svnsync or svnadmin pack, for example, won't work with your modified repository.

OK, so if you still want to do it, update the last-revision number in revprop 0 and the db/current file and you should be ok.

I don't think you'll find anyone who has direct experience with this approach though!

属性 2024-08-09 02:43:59

进行虚拟修订的一种简单方法...

根据需要多次重复:

svnmucc propset dummy_prop 0 -m "increases revision" https://svn/repo/ --username me --password x7G_5-u1,W

注意:

  • 值“0”不必与一次提交不同
    下一个。 您只需重复相同的命令即可。
  • 直接更改存储库,无需签出或工作副本。
  • 更改根文件夹(由“...svn/repo”后面的 / 引用)。 因此,它甚至可以在新的空存储库上执行。
  • 仅更改文件夹的属性。 这些仅适用于 SVN。 因此,如果您签出或更新,不支持 svn 的应用程序(例如您的操作系统)将不会注意到文件夹本身的任何更改。 仅在存储这些属性的 .svn 子文件夹中,文件才会更改。
  • svnmucc 是官方 Subversion 工具的一部分,至少在 1.8 中,也许更早,另请参阅:http://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html
  • 当然密码只是一个例子,不用担心我透露了任何真实的凭据。 :-)

我希望这可以节省其他人的研究步骤。

One easy way to make dummy revisions...

As many times as required, repeat:

svnmucc propset dummy_prop 0 -m "increases revision" https://svn/repo/ --username me --password x7G_5-u1,W

Note:

  • The value "0" does not have to be different from one commit to the
    next. You can just repeat the same command.
  • Changes the repository directly, without a checkout or working copy.
  • Changes the root folder (referenced by the trailing / after "...svn/repo"). Thus it can even be performed on a fresh'n'empty repository.
  • Changes only a property of a folder. These exist only for SVN. So if you checkout or update, svn-unaware applications (like your operating system) will not notice any change about the folder itself. Only in the .svn subfolder, where these properties are stored, files are changed.
  • svnmucc is part of the official Subversion tools, at least in 1.8, maybe earlier, see also: http://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html
  • Of course the password is just an example, don't worry that I disclosed any real credentials. :-)

I hope this saves others a few steps of research.

浮萍、无处依 2024-08-09 02:43:59

在 Subversion 1.7 中,您可以使用 svndumpfilter 工具从 svnadmin dump 创建的转储文件中过滤掉不需要的提交:

http://svnbook.red-bean.com/en/1.7/svn.reposadmin。 maint.html#svn.reposadmin.maint.filtering

从该页面:

[svndumpfilter] 充当存储库转储流的基于路径的过滤器

,因此这可以用于从特定路径中删除提交数据,这在某些存储库管理场景(但不是全部)中很有帮助; 具体来说,当对存储库的提交按文件夹(例如发布标识符)聚合时,svndumpfilter 将有助于减小存储库大小,从而允许您删除不需要的文件夹。

With Subversion 1.7 you can use the svndumpfilter tool to filter out unwanted commits from a dump file created by svnadmin dump:

http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering

From that page:

[svndumpfilter] acts as a path-based filter for repository dump streams

So this can be used to remove commit data from particular paths, which is helpful in some repo management scenarios (but not all); specifically, where commits to a repo are aggregated by folders (such as a release identifier), svndumpfilter will help to reduce the repo size, allowing you to remove unwanted folders.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文