#3340: Node attributes 'created_rev' and 'created_path' not documented
----------------------------------------------+-----------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  cboos
     Type:  defect                            |       Status:  new  
 Priority:  normal                            |    Milestone:       
Component:  version control                   |      Version:  devel
 Severity:  minor                             |   Resolution:       
 Keywords:  documentation                     |  
----------------------------------------------+-----------------------------
Changes (by cboos):

  * owner:  cmlenz => cboos

Comment:

 The semantic of `created_path` and `created_rev` were originally tied
 to the Subversion concepts of versioned trees of nodes.
 They were originally private fields, but I decided later to expose them
 and use them in the web_ui, partly because that was very convenient to
 address the need of showing the last change that happened on a node
 (see in particular r3099), partly because I came to think that this
 information could be meaningful for other backends as well.

 So the created path,rev correspond to the path and revision at which
 a given Node was created. Conceptually, a Node is created when its
 corresponding content would change. For a Node representing a file,
 that would be a change to the file's content.
 For a Node representing a folder, that would be any change to a Node
 located below that Node. Additionaly, change to properties also
 trigger a creation of a new node.

 So this is quite clear and simple, and I believe that this notion is at
 the heart of Trac's way to represent the content of a Repository, so
 you're right, it would be interesting to document it somewhere ;)

 OTOH, it's the Node rev and path properties that are a bit more confusing.
 The `rev` property is made equal to the `created_rev` one, for
 "historical"
 reasons. But the `path` remains the path under which the Node is currently
 seen, which may not correspond to the created path (in case one of the
 parent Node has been copied). That was causing a few problems, and that's
 why I introduced the `created_path` field (and the `created_rev` for
 symmetry).

 So my thinking was always to refactor the API to have:
  - (rev,path) => the Node as currently seen and requested
  - (created_rev, created_path) => the revision and path at which the Node
    got created (see above for when a Node gets created)

 I'm planning to do that in the next bunch of changes for the
 versioncontrol
 layer, which hopefully will take place in 0.11 during the upcoming weeks
 (see VcRefactoring).

 In the meantime, I'll try to summarize some of the above and put
 it in the doc, either for 0.10 or 0.10.1

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/3340>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to