在已经将提交的文件提交到Svn中的存储库之后,将提交的文件分组(作为单个提交)?

时间:2021-12-15 23:58:13

Is it possible to group a number of committed files together (as a single commit) after you've already committed them to the repository in Svn?

在您已经将它们提交到Svn中的存储库之后,是否可以将多个已提交的文件组合在一起(作为单个提交)?

It seems I always forget a file or two after I've committed a bunch them (when not using subeclipse) and I was just wondering if anyone knew if this was possible or not.

在我犯了一堆文件之后,我总是会忘记一两个文件(当不使用subeclipse时),我只是想知道是否有人知道这是否可能。

5 个解决方案

#1


I find the best solution to use a higher level tool to group revisions together and track changes.

我找到了使用更高级别工具将修订组合在一起并跟踪更改的最佳解决方案。

We use redmine to document all tasks, and our svn revisions are automatically stamped against that. Working this way, even though a fix may take 7 or 8 commits, you can quickly search your log and roll the fixes for Bug #366 into release as a single unit.

我们使用redmine记录所有任务,我们的svn修订版会自动加盖标记。通过这种方式工作,即使修复可能需要7次或8次提交,您也可以快速搜索日志并将Bug#366的修复程序作为一个单元进行发布。

Redmine, trac, fogbugz, bugzilla, tfs, all good.

Redmine,trac,fogbugz,bugzilla,tfs,都很好。

#2


Once you make a commit, there is intentionally no way to modify it. This way r123 always refers to the same thing. If you could add files to a commit afterwards, then a person who checked-out r123 before the change would have a different view than someone who checked-out r123 after the change, breaking a key goal of any version control system.

一旦你提交,有意无法修改它。这样r123总是指同一件事。如果您之后可以将文件添加到提交中,那么在更改之前签出r123的人将具有与在更改之后签出r123的人不同的视图,从而打破任何版本控制系统的关键目标。

This really is no different than the question "what should I do if I commit code that has a syntax error in it and won't build?" The answer is to commit something else that has a fix in it. The two cases create the same problems and have the same solution.

这与“如果我提交的语法错误且不会构建的代码应该怎么办?”这个问题没有什么不同。答案是提交其他具有修复功能的内容。这两种情况产生了相同的问题并且具有相同的解决方案。

#3


No, for this kind of power you would need a tool like Git.

不,对于这种力量,你需要一个像Git这样的工具。

#4


To follow up on a previous answer.

跟进以前的答案。

I use Git SVN almost exclusively at this point for its ability to keep local revisions and then merge them into the SVN tree when i am fully done with the feature. When working with Git SVN, I commit my changes locally and when I am completely done, then sync to SVN.

我在这一点上几乎完全使用Git SVN,因为它能够保持本地修订,然后在我完成该功能时将它们合并到SVN树中。使用Git SVN时,我在本地提交更改,当我完成后,再同步到SVN。

#5


A workaround: reverse-merge all the revisions in question, commit, apply again the changes from those revisions to your WC, commit all at once.

解决方法:反向合并所有相关修订,提交,再次将这些修订中的更改应用到您的WC,一次提交。

Disclaimer: I haven't tried it.

免责声明:我没试过。

#1


I find the best solution to use a higher level tool to group revisions together and track changes.

我找到了使用更高级别工具将修订组合在一起并跟踪更改的最佳解决方案。

We use redmine to document all tasks, and our svn revisions are automatically stamped against that. Working this way, even though a fix may take 7 or 8 commits, you can quickly search your log and roll the fixes for Bug #366 into release as a single unit.

我们使用redmine记录所有任务,我们的svn修订版会自动加盖标记。通过这种方式工作,即使修复可能需要7次或8次提交,您也可以快速搜索日志并将Bug#366的修复程序作为一个单元进行发布。

Redmine, trac, fogbugz, bugzilla, tfs, all good.

Redmine,trac,fogbugz,bugzilla,tfs,都很好。

#2


Once you make a commit, there is intentionally no way to modify it. This way r123 always refers to the same thing. If you could add files to a commit afterwards, then a person who checked-out r123 before the change would have a different view than someone who checked-out r123 after the change, breaking a key goal of any version control system.

一旦你提交,有意无法修改它。这样r123总是指同一件事。如果您之后可以将文件添加到提交中,那么在更改之前签出r123的人将具有与在更改之后签出r123的人不同的视图,从而打破任何版本控制系统的关键目标。

This really is no different than the question "what should I do if I commit code that has a syntax error in it and won't build?" The answer is to commit something else that has a fix in it. The two cases create the same problems and have the same solution.

这与“如果我提交的语法错误且不会构建的代码应该怎么办?”这个问题没有什么不同。答案是提交其他具有修复功能的内容。这两种情况产生了相同的问题并且具有相同的解决方案。

#3


No, for this kind of power you would need a tool like Git.

不,对于这种力量,你需要一个像Git这样的工具。

#4


To follow up on a previous answer.

跟进以前的答案。

I use Git SVN almost exclusively at this point for its ability to keep local revisions and then merge them into the SVN tree when i am fully done with the feature. When working with Git SVN, I commit my changes locally and when I am completely done, then sync to SVN.

我在这一点上几乎完全使用Git SVN,因为它能够保持本地修订,然后在我完成该功能时将它们合并到SVN树中。使用Git SVN时,我在本地提交更改,当我完成后,再同步到SVN。

#5


A workaround: reverse-merge all the revisions in question, commit, apply again the changes from those revisions to your WC, commit all at once.

解决方法:反向合并所有相关修订,提交,再次将这些修订中的更改应用到您的WC,一次提交。

Disclaimer: I haven't tried it.

免责声明:我没试过。