Creating a patch file from a past revision

3,849 views
Skip to first unread message

Martin Bischoff

unread,
Jun 26, 2009, 11:28:03 AM6/26/09
to us...@tortoisesvn.tigris.org
Hi everyone,
is it possible to create a patch file from an old revision (e.g. from the "Show Log" window)?

I'd like to apply changes that were made some time ago to a working copy (that is based on a different repository). I have read the help file, but it only explains how to create a patch from the local changes in a working copy.

Thanks for any help.

-Martin

Stefan Küng

unread,
Jun 26, 2009, 12:34:29 PM6/26/09
to us...@tortoisesvn.tigris.org

Select the revision in the log dialog, right-click, choose "show changes
as unified diff". The 'patch' (a patch is just a unified diff file) will
open in your default text editor or the patch viewer you've configured
in the TSVN settings dialog.
Save that unified diff to a file and you have your patch.

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2365771

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

signature.asc

Martin Bischoff

unread,
Jun 26, 2009, 12:58:01 PM6/26/09
to us...@tortoisesvn.tigris.org
On Fri, Jun 26, 2009 at 18:34, Stefan Küng <torto...@gmail.com> wrote:
Martin Bischoff wrote:
> Hi everyone,
> is it possible to create a patch file from an old revision (e.g. from
> the "Show Log" window)?
>
> I'd like to apply changes that were made some time ago to a working copy
> (that is based on a different repository). I have read the help file,
> but it only explains how to create a patch from the local changes in a
> working copy.

Select the revision in the log dialog, right-click, choose "show changes
as unified diff". The 'patch' (a patch is just a unified diff file) will
open in your default text editor or the patch viewer you've configured
in the TSVN settings dialog.
Save that unified diff to a file and you have your patch.

Stefan

Thanks!
I guess this was a stupid question, because I can simply merge a revision from the repository into my working copy (even if the working copy is based on a different repository).

-Martin

Stefan Küng

unread,
Jun 26, 2009, 1:02:19 PM6/26/09
to us...@tortoisesvn.tigris.org

But if you use merge, and your working copy is from a different
repository, make sure you check the box "ignore ancestry". And you then
should remove all svn:mergeinfo properties that might get set during the
merge before you commit that change - there shouldn't be any, but non
the less you should check that first.

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2365784

signature.asc

Kenneth Lakin

unread,
Jun 26, 2009, 2:24:39 PM6/26/09
to us...@tortoisesvn.tigris.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan Küng wrote:
> But if you use merge, and your working copy is from a different
> repository, make sure you check the box "ignore ancestry". And you then
> should remove all svn:mergeinfo properties that might get set during the
> merge before you commit that change - there shouldn't be any, but non
> the less you should check that first.
>

How hard would it be for TSVN to determine if the WC and the repo that
you're merging from don't point to the same SVN repo? If this would not
be too hard, could we automatically check the "ignore ancestry" box and
remove any mergeinfo properties that might get applied?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJKRRJkAAoJEIsblWe5kJ+jWNcH/jKsHN/Q1ruUb1EG989regXY
QC3j3xqcfCyTG2zsa9EMIZLSHFowLvAEbZQotlnvMrDCHvJoPlAYGusWv3D3cL0r
bdkAEnk23547wJQuS1drph/qK434zNM6ndO3kWfORYhizKQLaHyBX+rsItP7skE7
mMztX7c/ynzLE369Myg9wF4MhEQTrbyiuXmfbMGtv9HadGur8YISXIhTO2TDYbkl
Wu7QmAzeSscBXRNHR5j/N07yPylle4VU2layMTXHkshontJMFAAPMF12KTT3g1x7
yLEfKJtlz213PwcYOMxXAkPbePVpeklKeh0ymgFPwNCewrYvVhqozfcmBqOyZiY=
=dtXT
-----END PGP SIGNATURE-----

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2365809

Stefan Küng

unread,
Jun 27, 2009, 10:20:55 AM6/27/09
to us...@tortoisesvn.tigris.org
Kenneth Lakin wrote:
> Stefan Küng wrote:
>> But if you use merge, and your working copy is from a different
>> repository, make sure you check the box "ignore ancestry". And you then
>> should remove all svn:mergeinfo properties that might get set during the
>> merge before you commit that change - there shouldn't be any, but non
>> the less you should check that first.
>
>
> How hard would it be for TSVN to determine if the WC and the repo that
> you're merging from don't point to the same SVN repo? If this would not
> be too hard, could we automatically check the "ignore ancestry" box and
> remove any mergeinfo properties that might get applied?

It's possible, but would require to contact the repository for the merge
url. And that's something I'd like to avoid doing in such a dialog.

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2365965

signature.asc
Reply all
Reply to author
Forward
0 new messages