[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] RFC: Proposal for changes to patches

From: Simon Large <slarge_at_blazepoint.co.uk>
Date: 2004-10-06 13:01:28 CEST

This is a proposal/request to help make patches easier to create and apply.
Feel free to comment!
Stefan, feel free to say 'go away ...' ;-)

The current interface has no user interaction/feedback, except to select the
patch file name, and no way to include a log message.

Create Patch
The commit dialog is re-used to list the files which have changed and allow
the user to select the ones for the patch. The user can also enter a log
message.

The patch is created in the usual way using unified diff, then post
processed to strip out the files the user has not checked. Patch files are
normally quite small, so this should not require a lot of processing.

The log message is inserted before the unified diff at the top of the patch
file between triple square brackets, which has become something of an ad-hoc
'standard' for patches on the subversion list:
[[[
Log message lines ...
]]]
Unified diff starts here

At the moment, there is no way to add or delete files (delete just removes
all lines from the file, add just tries to set properties), and I don't know
if property changes work either. Not sure if this is due to SVN or TSVN.

Anything that SVN does not support should result in an error dialog
something like this:

-------
Test2.c - added
Test3.c - deleted
-------
These actions are not currently supported in patch files and will not be
included. Do you want to create the patch file anyway? [Yes] [No]
-------

It might be possible to exclude them from the commit/patch dialog to avoid
this error message, but that would mean more divergence from the Commit
dialog, and more questions from users about why some files are not there.

Apply Patch
When the patchfile is selected, open a dialog listing the changed files and
displaying the log message.

The supplied log message should have an additional line inserted at the
beginning in the form:
[PATCH] Patchfile.ext yyyy/mm/dd hh:mm:ss
The time shown is the timestamp of the patchfile

Buttons here are
[Open] select a different patch file
[Apply]
[Cancel]

If the user clicks on Apply, store the log message in the top level of the
commit dialog's log history, then strip the log message from (a copy of) the
patchfile and send to TMerge in the usual way.

If the patch is accepted, the log message is available at commit time from
the log message history. Prefixing the name/date of the file helps to
identify the correct log message from the history list if there have been
several attempts at patching.

Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Oct 6 14:08:20 2004

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.