仅基于标签的 CVS 结账

发布于 2024-10-09 15:00:35 字数 236 浏览 0 评论 0原文

我有一个文件,其中包含 CVS 存储库中包含的许多标签。有没有一种方法可以仅使用这些标签来签出所有文件及其关联目录,而无需签出整个存储库?

我没有存储库中的目录列表,因此无法运行 cvs co -r baz_1_0_0_0 foo/bar/baz 因为我不知道 baz 实际位于。

我正在运行 CVS 1.11,因此没有像 rls 这样的命令可用。

I have a file containing a number of tags contained in a a CVS repository. Is there a way I can checkout all the files and their associated directories using only these tags without checking out the whole repository?

I don't have a list of the directories in the repository so I can't run cvs co -r baz_1_0_0_0 foo/bar/baz since I don't know where baz is actually located.

I am running CVS 1.11 so I don't have commands like rls available.

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

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

发布评论

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

评论(2

梦里的微风 2024-10-16 15:00:35

如果您执行以下操作:

   cvs history -T

它将为您提供标签和关联的模块(假设您已定义 CVSROOT)。
然后,您可以 grep 查找您正在查找的标签并仅签出这些模块。

例如

mods=`cvs history -T | grep $TAG | awk '{print $6}'`
for mod in $mods; do
   cvs co -r $TAG $mod
done

If you do a:

   cvs history -T

it will give you tags and associated modules (assuming you have CVSROOT defined).
You can then grep for the TAG you are looking for and checkout only those modules.

e.g.

mods=`cvs history -T | grep $TAG | awk '{print $6}'`
for mod in $mods; do
   cvs co -r $TAG $mod
done
梦境 2024-10-16 15:00:35

查看.。这将为您提供存储库中的所有文件。使用 -r 可以检查具有该修订或标记的所有文件。

请注意,签出 . 会填充当前目录,因此您可能需要首先创建一个顶级目录。

mkdir baz
cd baz
cvs co -r baz_1_0_0_0 .

Check out .. That gives you all the files in the repository. With -r, that checks out all the files with that revision or tag.

Note that checking out . populates the current directory, so you may want to create a toplevel directory first.

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