#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        |  
---------------------------------+------------------------------------------
Comment (by [EMAIL PROTECTED]):

 I agree that the backend should be able to implement what ever string->rev
 translation he pleases. As I haven't used anything but revision numbers in
 Trac I wasn't even aware of this being done ;)

 Anyways, I'm +1 on the documentation change. How about (basically adding
 your explanations and one extra comment):

 {{{
 def normalize_rev(self, rev):
     """Return a canonical representation of a revision.

     It's up to the backend to decide which string values of `rev`
     (usually provided by the user) should be accepted, and how they
     should be normalized. Some backends may for instance want to match
     against known tags or branch names.

     In addition, if `rev` is `None` or '' (a zero length Unicode string),
     the youngest revision should be returned.
     """
 }}}

 The reason for me adding the "`or ''`" comment is that this is (if I'm not
 mistaken) a requirement from Trac (see `process_request`, line 781 in
 [source:trunk/trac/versioncontrol/web_ui/changeset.py changeset.py]). If
 trac calls `normalize_rev` with an empty string it expects to get the
 latest revision, right ?

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