[Trac-tickets] Re: [The Trac Project] #2011: Use SVN-like peg revisions instead of own syntax

The Trac Project noreply at edgewall.com
Tue Sep 6 04:36:00 CDT 2005


#2011: Use SVN-like peg revisions instead of own syntax
-------------------------+--------------------------------------------------
 Reporter:  Manuzhai     |        Owner:  cboos   
     Type:  enhancement  |       Status:  assigned
 Priority:  normal       |    Milestone:          
Component:  browser      |      Version:  0.9b1   
 Severity:  minor        |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by cboos):

  * summary:  Use SVN-like peg revisions instead of invented syntax => Use
              SVN-like peg revisions instead of own syntax
  * status:  new => assigned
  * severity:  normal => minor
  * owner:  jonas => cboos

Comment:

 Yes; I'd prefer explaining things
 once to my users, and not have to answer questions like:
 ''why does Subversion use `@` and Trac uses `#`?''...

 The fix is easy:
 {{{
 Index: trac/versioncontrol/web_ui/util.py
 ===================================================================
 --- trac/versioncontrol/web_ui/util.py  (revision 2198)
 +++ trac/versioncontrol/web_ui/util.py  (working copy)
 @@ -24,7 +24,7 @@

  __all__ = [ 'get_changes', 'get_path_links', 'get_path_rev' ]

 -rev_re = re.compile(r"([^#]*)#(.+)")
 +rev_re = re.compile(r"([^@#]*)[@#](.+)") # also support SVN's peg
 revision

  def get_changes(env, repos, revs, full=None, req=None, format=None):
      db = env.get_db_cnx()
 }}}

 As a side-effect, the `log:` syntax will also support peg revisions:
 `log:trunk at 2000:2200`

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2011>
The Trac Project <http://trac.edgewall.com/>


More information about the Trac-Tickets mailing list