Hmm.. think my explanation was too elaborate and the feature that I
wanted got lost in the process... so much for my grand schemes (the ones
that doesn't get lost in cyberspace that is)! :-)
I suppose what I really want is just a "do stuff" button which extracts
the list of files for a given version in Unified Diff format as well as
the actual version.
I.e. suppose I wanted to make a patch of revision 123, the Unified Diff
file would look like this:
+++ <PATH TO FILE ON SERVER> (revision 123)
It would be prudent to make the path to file relative to the top most
folder.
I.e. assuming that I have my files in /trunk/api/classes/myclass.php,
the path in the Unified Diff file would be api/classes/myclass.php.
This would make it possible to create a patch from a Windows machine
(where the files are located on D:\www\lalalal) to a *nix machine (where
the files are located in /opt/www/lalala)
Would it be possible to create such a functionality? Either as a button
or as a menu option.
The same functionality seems to be archievable by using the "Show
Differences as Unified Diff" as you described, however this assumes that
you know the actual revision that the service you want to apply the
patch to is running (which you should, I know, am just saying... :-)
The reason why I'd prefer the other is cause I'm lazy (show me a
programmer who isn't and I'll show you a liar) and don't want to confirm
all the merge changes on each of the servers I need to apply the patch to.
Furthermore, once you've commited the changes from the working copy to
the repository you're not longer capable of creating a patch (the file
created is 0 bytes) and finally the save dialog for the "create patch"
option neglects to set the file type to .patch as TortoiseMerge requires.
Is this on purpose(if so, I fail to see why?:-) or is it a bug?
/Jona
Stefan Küng wrote:
> Jona wrote:
>
>> Hi Stefan,
>> I must apologize for writing you directly but I sent the following
>> mail to the mailing lists a month or so ago and it has been blatantly
>> ignored.
>
>
> As far as I remember, I answered you on the list? Hmmm - maybe it got
> lost somewhere in the electrical void ;)
>
>> I've been searching far and wide for a feature which enables me to
>> create a list of patched files.
>>
>> What I want to do is, once changes are commited to the repository,
>> extract a list of changed files with their revision number in the
>> repository in Unified Diff format.
>> This functionality is similar to the Create Patch functionality
>> already present with 2 differences:
>> 1) The create patch option creates a Unified Diff file with the
>> current revision number in the repository
>
>
> Not quite correct: the "last commited" revision numbers found in the
> working copy.
>
>> 2) The create patch option writes the changes to be made to the
>> current revision of the file in order to apply the patch
>
>
> You mean the "apply patch" function? Yes, the patch is always applied
> to the working copy.
>
>> Doing it this way means that a user has to sort any conflicts every
>> time the patch is applied using the Merge program.
>
>
> But usually a patch only gets applied once.
>
>> Seems to me that it would be prudent to be able to extract a list of
>> changed files with their respective revision numbers in order to make
>> a patch which would fetch the correct revision directly from the
>
>
> You can create a patchfile with the revision numbers from the log
> dialog. Just select the two revisions and then "show unified diff".
> Then save the created tempfile in your text editor (which is started
> to show the diff).
>
>> repository and replace any existing files in the selected directory
>> (a backup of the existing files would be nice here, I think, or a
>> list which enabled de-patching directly from the repository)
>
>
>
>> Furthermore, it seems that the current "apply patch" functionality
>> expects the patch to be applied directly in the correct directory.
>> That is, it doesn't appear to be possible to apply a patch to a top
>> folder eventhough the path is clearly written in the generated
>> Unified Diff file.
>
>
> You can create a patch from the working copy root, and then you also
> have to apply the patch on the working copy root. It's as simple as
> that: apply it where you created it.
>
> Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Aug 23 16:27:35 2004