Grouping committed files together (as a single commit) after you've already committed them to the repository in Svn?

人盡茶涼 提交于 2019-12-04 04:40:10

问题


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?

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.


回答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, trac, fogbugz, bugzilla, tfs, all good.




回答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.

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.




回答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.




回答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.

Disclaimer: I haven't tried it.



来源:https://stackoverflow.com/questions/926354/grouping-committed-files-together-as-a-single-commit-after-youve-already-comm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!