You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <pe...@famlundblad.se> on 2004/10/24 21:01:19 UTC
[PATCH] RFC: #2064, new diff_callbacks API
Hi,
I'm starting to do something about issue #2064, which is about merge not
doing keyword expansion/special file handling correctly. This needs an API
change, which could have some feedback. Attached is a patch to svn_wc.h
with my proposed changes. Basically it puts file content changes (and
additions) together with prop changes in the same function call, so that
all information is available for the merge process. Then, there is the
usual compability and deprecation stuff.
I don't do this for directories, which might seem inconsistent. The reason
is that we want to add directories before getting file additions, but the
prop changes are not available until the directory is closed by the delta
editor.
Some questions:
* For file_deleted, we provide the deleted content, but not the props.
They are probably cheap to provide, since the mimetype ought to be
fetched if available. Should I add them. I see no use for them in my
planned merge changes.
* I kept the mimetype arguments in file_added and file_changed. Strictly
speaking, they can be derived from the props, which probably are available
and cheap if the mimetypes are. Fetching the mimetypes is not hard, but it
is convenient to just have it available and it keeps away some small code
duplication. I'm not sure if I'd drop the mimetype arguments.
* Currently, changedprops can be null, when there are no prop changes.
Maybe it is better to always pass an array and let ->nelts == 0 mean no
changes?
Comments?
Re: [PATCH] RFC: #2064, new diff_callbacks API
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Sun, 24 Oct 2004, Max Bowsher wrote:
> Peter N. Lundblad wrote:
> Whilst this is being considered, we should be aware that there is another
> propchange API change required.
> Currently propchanges are represented as "Set value to X". We need to change
> this to "Change value from A to B" to make merging possible. (Currently
Max,
We have both propchanges (a list of the form you describe) and origprops
in the API under discussion. I would say this gives what you ask for. What
do I miss?
Best,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] RFC: #2064, new diff_callbacks API
Posted by Max Bowsher <ma...@ukf.net>.
Peter N. Lundblad wrote:
> Hi,
>
> I'm starting to do something about issue #2064, which is about merge not
> doing keyword expansion/special file handling correctly. This needs an API
> change, which could have some feedback. Attached is a patch to svn_wc.h
> with my proposed changes. Basically it puts file content changes (and
> additions) together with prop changes in the same function call, so that
> all information is available for the merge process. Then, there is the
> usual compability and deprecation stuff.
Whilst this is being considered, we should be aware that there is another
propchange API change required.
Currently propchanges are represented as "Set value to X". We need to change
this to "Change value from A to B" to make merging possible. (Currently
propchange merging is extremely naive - a propchange to an already modified
property always conflicts, even when it should not)
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] RFC: #2064, new diff_callbacks API
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Mon, 25 Oct 2004, Julian Foad wrote:
> Peter N. Lundblad wrote:
> > * For file_deleted, we provide the deleted content, but not the props.
> > They are probably cheap to provide, since the mimetype ought to be
> > fetched if available. Should I add them. I see no use for them in my
> > planned merge changes.
>
> I think you should provide the deleted props. Otherwise there is an
> inconsistency here which will just be a nuisance in future.
>
OK. I added the originalprops argument to file_deleted. I don't currently
provide propchanges, since that seems too silly. I'd like to drop the
empty file for consistency.
regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] RFC: #2064, new diff_callbacks API
Posted by Julian Foad <ju...@btopenworld.com>.
Peter N. Lundblad wrote:
> * For file_deleted, we provide the deleted content, but not the props.
> They are probably cheap to provide, since the mimetype ought to be
> fetched if available. Should I add them. I see no use for them in my
> planned merge changes.
I think you should provide the deleted props. Otherwise there is an
inconsistency here which will just be a nuisance in future.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org