#3499: Latest revision number not written correctly to hdf
---------------------------------+------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  cboos 
     Type:  defect               |       Status:  new   
 Priority:  normal               |    Milestone:  0.10.1
Component:  version control      |      Version:  devel 
 Severity:  normal               |   Resolution:        
 Keywords:  documentation        |  
---------------------------------+------------------------------------------
Changes (by cboos):

  * keywords:  needinfo => documentation
  * milestone:  => 0.10.1

Comment:

 Maybe the documentation string is not clear enough about that, but the
 intent of this method is really to normalize the given "rev" argument,
 which comes from the user and therefore can be anything, to a value
 suitable for use by the backend.
 So it's up to the backend to decide how user input translate to revisions,
 the only "constraint" being that `None` should be translated to the latest
 revision.

 The svn backend interprets a number to be a revision number (easy), but
 also "head" to be an alias to the latest revision (Ok, it will actually
 accept ''anything'' but a number as an alias to the latest revision ;) ).
 But the mercurial backend for example checks also whether the given input
 against the known tags and branch names.

 A better doc would perhaps be:
 {{{
 def normalize_rev(self, rev):
     """Return a canonical representation of a revision.

     It's up to the backend to decide what string values of `rev`
     (usually provided by the user) should be accepted, and how they
     should be normalized.

     In addition, if `rev` is `None`, the youngest revision should be
 returned.
     """
 }}}

-- 
Ticket URL: <http://trac.edgewall.org/ticket/3499#comment:5>
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