批处理“svn cp”在服务器端

发布于 2024-09-18 03:22:19 字数 477 浏览 5 评论 0 原文

我有一个整体主干,由许多项目及其相应的共享模块组成。我希望数据库以更灵活的方式组织,但事实并非如此。我想做的是创建一个分支,它是一种特定于项目的主干的精细视图。实际上,它是一个标签,因为我只想写一次,但我只想标记数据库的选定部分。我可以通过什么方法来做到这一点,同时产生最少的提交噪音?

从工作空间中的命令行,我可以将工作空间目录 svn cp 到分支文件夹(仅选择项目特有的模块)。然而,行李箱是一个相当大的收银台,并且可能有大量的物品需要移动。因此,这很快就会变得很麻烦。

在服务器 url 上使用 svn cp 允许我有选择地将每个路径复制到我认为合适的分支/标签文件夹,但每次复制操作都会得到一次提交。当我们的项目足够稳定时,提交日志消息通常对项目经理很有用,因此这种级别的提交噪音会很烦人。

我想做的是使用一组过滤器复制主干。或者,也可以完全复制主干,然后删除不需要的文件夹(仅生成两个提交消息)。但是,据我所知,没有办法在服务器端“批量”删除或复制。这是正确的吗?还有其他选择吗?

I have a monolithic trunk which is comprised of many projects and their corresponding shared modules. I wish the database was organized in a more flexible manner, but it isn't. What I'd like to do is create a branch which is a sort of project-specific refined view of the trunk. Really, it's a tag, because I only want to write it once however I only want to label select parts of the database. What's the way I can do this while generating the least amount of commit noise?

From the command-line in my working space, I could svn cp the working space directories to the branch folder (selecting only the modules particular to a project). However, the trunk is quite a large checkout and there are potentially very large number of items to move. So, this quickly becomes cumbersome.

Using svn cp on the server url allows me to selectively copy each path to the branch/tag folder as I see fit, but I get a commit per copy operation. When our projects are stable enough, the commit log messages are usually useful for project managers, so this level of commit noise would be annoying.

What I'd like to do is either copy the trunk with a set of filters. Or, alternatively, copy the trunk wholly then delete the unneeded folders (generating only two commit messages). But, as far as I can tell, there's no way to 'batch up' deletes or copies on the server side. Is this correct? Any other alternatives?

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

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

发布评论

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

评论(2

女中豪杰 2024-09-25 03:22:19

我会将主干检出到工作目录中,可能使用 --depth 选项,这样我就没有大的源代码树(请参阅http://svnbook.red-bean.com/en/1.5/svn.ref.svn .c.checkout.html)。这种方法的最大好处是你可以尝试一下,抛弃任何错误,并进行一次提交。

I'd check out the trunk into a working directory, probably using the --depth option so that I don't have a big source tree (see http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.checkout.html). The biggest benefit of this approach is that you can play around, throw away any mistakes, and do a single commit.

此刻的回忆 2024-09-25 03:22:19

svn 手册涵盖了名为外部定义的部分

有时构建一个
工作副本是由
不同结帐的次数。为了
例如,您可能想要不同的
子目录来自不同的
存储库中的位置或者可能是
来自不同的存储库
总共。

也许 svn:externals 是围绕您必须处理的有限存储库设计的巧妙解决方案。

The svn manual covers a section called Externals Definitions.

Sometimes it is useful to construct a
working copy that is made out of a
number of different checkouts. For
example, you may want different
subdirectories to come from different
loca- tions in a repository or perhaps
from different repositories
altogether.

Maybe svn:externals is a slik solution around the limited repository design you have to deal with.

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