Anonymous avatar Anonymous committed 5261b0c

Merge all pending changes from 0.12-stable.

Comments (0)

Files changed (4)

 *~
 .*.sw[op]
 .svn
-.git
+.hg
 build
 dist
 Trac.egg-info

trac/htdocs/js/expand_dir.js

     else { // rows are toplevel rows, this is the initial call
       var anchor = window.location.hash.substr(1);
       if (anchor)
-        autoexpand = anchor.split("/");
+        autoexpand = decodeURI(anchor).split("/");
     }
 
     var autoexpand_expander = null;

trac/versioncontrol/api.py

             return href.changeset(resource.id, parent and parent.id or None)
         elif resource.realm == 'source':
             parent = resource.parent
-            return href.source(parent and parent.id or None, resource.id)
+            return href.browser(parent and parent.id or None, resource.id,
+                                rev=resource.version or None)
         elif resource.realm == 'repository':
-            return href.source(resource.id or None)
+            return href.browser(resource.id or None)
 
     def resource_exists(self, resource):
         if resource.realm == 'repository':

trac/versioncontrol/tests/api.py

         res = Resource('source', '/trunk/src')
         self.assertEqual('path /trunk/src',
                          get_resource_description(self.env, res))
-        self.assertEqual('/trac.cgi/source/trunk/src',
+        self.assertEqual('/trac.cgi/browser/trunk/src',
                          get_resource_url(self.env, res, self.env.href))
 
         repo = Resource('repository', 'repo')
         res = Resource('source', '/trunk/src', parent=repo)
         self.assertEqual('path /trunk/src in repo',
                          get_resource_description(self.env, res))
-        self.assertEqual('/trac.cgi/source/repo/trunk/src',
+        self.assertEqual('/trac.cgi/browser/repo/trunk/src',
                          get_resource_url(self.env, res, self.env.href))
 
         repo = Resource('repository', 'repo')
         res = Resource('source', '/trunk/src', version=42, parent=repo)
         self.assertEqual('path /trunk/src@42 in repo',
                          get_resource_description(self.env, res))
-        self.assertEqual('/trac.cgi/source/repo/trunk/src',
+        self.assertEqual('/trac.cgi/browser/repo/trunk/src?rev=42',
                          get_resource_url(self.env, res, self.env.href))
 
 
         res = Resource('repository', 'testrepo')
         self.assertEqual('Repository testrepo',
                          get_resource_description(self.env, res))
-        self.assertEqual('/trac.cgi/source/testrepo',
+        self.assertEqual('/trac.cgi/browser/testrepo',
                          get_resource_url(self.env, res, self.env.href))
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.