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

Re: [PATCH] support printing changed properties in svnlook

From: Erik Johansson <erik_at_ejohansson.se>
Date: Wed, 5 Jan 2011 22:43:51 +0100

Hi,

I have now redone the patch to fix some of the comments given in this
thread and I'm attaching the current working state of it so that we
can have something real to discuss around. This does not include any
changes to svnlook but have a test case to verify that it works as it
should (which it at the moment doesn't, see 10 below).

Further more, I've tried to enumerate all cases that I could think of
were properties are changed and how they should be handled. For some
of the cases I've changed my mind compared to what I've said in the
rest of the thread. Hopefully this is a complete list.

mod_props is the per node hash with properties (see svn_repos_node2_t).

1. Add node w/o props => mod_props is NULL
2. Add node w/ props => mod_props contains all props

Pretty straight-forward; mod_props contains what can be expected and
action is A for all props.

3. Delete node w/o props => mod_props is NULL
4. Delete node w/ props => mod_props is NULL

For case 4 it could be argued that mod_props should contain all props
that the node had prior to being deleted. First I thought it should,
but after thinking some more I now have the opinion that it isn't of
any real use. The node is gone after all, and it doesn't matter if the
node had e.g. svn:eol-style set or not.

5. Change (add, delete or modify) node props => mod_props contains all
changed props

Also straight-forward. Action is A, D or M depending on type of
change. Properties that haven't changed are not included in mod_props.

6. Copy (i.e. add-with-history) node w/o props => mod_props is NULL
7. Copy node w/ props => mod_props is NULL

Case 7 is somewhat similar to case 4 in that one could argue that
mod_props should contain all props that were copied with the node. But
as nothing has been changed and text_mod and prop_mod are both FALSE
in this case I think that mod_props should be NULL.

8. Copy node w/ changed props [1] => mod_props contains all changed props

In this case one or several properties are added, deleted or modified
between coping the node and committing. Unmodified props are not
included in mod_props (case 7).

9. Replace (without history) node (w/ or w/o props) with node w/o
props => mod_props is NULL

We don't include any props from the deleted node (case 3 and 4) and no
props are added for the new node (case 1).

10. Replace node (w/ or w/o props) with node w/ props => mod_props
contains all props

We don't include any props from the deleted node (case 3 and 4) but
new props are added with the new node (case 2). The test for this
fails as new props are marked as M if they existed in the deleted
node. Don't know a good solution for this yet. Suggestions welcome.

11. Replace (with history) node (w/ or w/o props) with copied node w/
or w/o props => mod_props is NULL

We don't include any props from the deleted node (case 3 and 4) nor
any props from the unmodified copy (case 6 and 7).

12. Replace node (w/ or w/o props) with copied node w/ modified props
=> mod_props contains all modified props

We don't include any props from the deleted node (case 3 and 4) but
the modified props from the copied node (case 8).

// Erik

-- 
Erik Johansson
Home Page: http://ejohansson.se/
PGP Key: http://ejohansson.se/erik.asc

Received on 2011-01-05 22:44:31 CET

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