Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
664 views
in Technique[技术] by (71.8m points)

svn - Create "patch" between revisions?

It seems SVN's "patch" functionality is not exactly what I want. What I really want is to create a diff of files between revisions. So, I'd choose rev1 and rev 2 and end up with a folder containing all files that were changed or added between those revisions.

Can this be done with Tortoise SVN or plain-old svn?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

From the command line you could do this as follows.

All files in a folder

Create a patch in your Home folder that contains all the changes between revision 123 and 124 from all the changed files in the folder "my_project":

svn diff -r123:124 path/to/my_project > ~/my_project_changes_123_124.patch

One particular file

Create a patch in your Home folder that contains all the changes between revision 123 and 124 from only one file, name "my_project.php":

svn diff -r123:124 path/to/my_project/my_project.php > ~/my_project_changes_123_124.patch

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...