将外部更新到某个日期

将外部更新到某个日期

本文介绍了Subversion 将外部更新到某个日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 SVN 控制下开展一个大型的、已建立的项目.代码库的许多部分正在作为外部检查,但其他人正在积极工作.
我想更新我的整个工作副本、外部和所有内容,以便它在特定时间点反映各种存储库的 HEAD.我最初的尝试是:

I'm working on a large, established project under SVN control. Many parts of the code base are being checked out as externals, but are being actively worked on by other people.
I wanted to update my entire working copy, externals and all, so that it reflected the various repositories' HEADs at a specific point in time. My initial attempt was:

svn up -r'{20090324}'

这会将当前目录更新到指定日期,但将所有外部更新到当前日期.一次更新一个外部组件按预期工作.
我知道由于外部的性质,单个更新无法使用修订号,但为什么它不适用于日期?
在无需维护对各种外部进行硬编码的脚本的情况下,实现我正在寻找的时间点效果的最佳方法是什么?

This updates the current directory to the specified date, but updates all externals to the current date. Updating the externals one at a time works as expected.
I understand that due to the nature of externals, a single update couldn't work with a revision number, but why doesn't it work with a date?
What's the best way to achieve the point-in-time effect that I'm looking for, without having to maintain a script that hard-codes the various externals?

我正在运行 Linux 系统.

I'm running a Linux system.

推荐答案

这是低效的,因为它比(通常)需要的更频繁地调用 svn update.否则,它是短暂的甜蜜:

This is inefficient, in that it calls svn update more often than (usually) required. Otherwise, it is short an sweet:

Unix:

find . -name .svn -execdir svn update -r {2010-08-30} \;

视窗:

forfiles /m .svn /s /c "cmd /c svn up -r {2010-08-30}"

这篇关于Subversion 将外部更新到某个日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 14:42