开发者

Is it possible to tranfer changed files to another working folder in Subversion

I have question: If I have a working folder that points to the head revision. If I have made some changes to the working folder, what is the easiest way to move tho开发者_如何学运维se changes to another working folder that points to the same revision number. That is to say, how can I create an exact copy of the working folder including the changes I have made?

At some point in time I used a version control system that could do what I want by taking a copy of the changes, place them in a cmd file, which I were to execute on the other working folder. This it called a "changelist" which is not the same as a SVN changelist.

Thank you for your help Jeeji


You can do a svn diff and pipe the result to a file. Then you can go to your new WC and do a patch command to re-apply them (then use svn commit to commit them)

This will only work with files; things like renaming of files or deletion of directories will not be represented in such a file.

On Windows you can use TortoiseSVN which has graphical tools to do this sort of thing for you; on the command-line take a look at the man pages for the commands above.


Create a patch file with svn diff

svn diff > ~/changes.diff

and apply the patch to another working copy

patch -p0 -i ~/changes.diff


The easiest would certainly be to just copy the whole working copy at the file system level, creating a new working copy.

But I think svn copy path/to/old/wc path/to/new/wc should work, too (also creating a new working copy).

I haven't tested the latter, though, so you should first try it with a dummy copy of your working copy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜