Reputation: 50602
I had a private branch that I did a ton of commits to, then I merged it into trunk, and did a few little tweaks there.
Now the trunk maintainer wants a diff off all of my changes incase we need a rollback.
How can I create this? If you need numbers for your examples, assume that
224446
was my main revision where I merged into trunk,
224453
and 224462
were my minor fixes, and I have countless changes when in my private branch.
Upvotes: 34
Views: 27633
Reputation: 127447
One possible procedure would be to do this:
svn diff -r 224452:224463 > diff1.patch
).svn up -r224446
)patch -p0 -i diff1.patch
)svn diff -r 224445 > diff2.patch
)Upvotes: 31
Reputation: 1500065
One option would be to create a branch at 224446, then merge in 224453 and 224462. Then take a diff between that and 224445 on the trunk. That should be all the changes in one, and you can create it as a patch file should you need to:
# Branch from your initial checkin
svn cp svn://xyz/trunk@224446 svn://xyz/branches/foo
# Check it out
svn checkout svn://xyz/branches/foo tmp
# Merge in the two changes
svn merge -c 224453,224462 svn://xyz/trunk tmp
# Commit the changes
svn commit tmp -m "Extra commits 224453 and 224462"
# Diff the branch from mainline before original
svn diff svn://xyz/trunk@224445 svn://xyz/branches/foo
This is largely the same as Martin's answer, just with different ways of applying the changes and getting the diffs. Note that although in this case I've committed the changes, you don't really have to - you could just do svn diff svn://xyz/trunk@224445 tmp
instead of the last two commands. The nice thing about having it in the repository is then anyone can apply the diff in reverse to roll it back, should that be required.
Upvotes: 7