changeset 2227:69404d45f6c1 codereview

merged beta into code-review branch
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 03 May 2012 01:05:08 +0200
parents a02b5abe091a (current diff) ce04e6ef80c0 (diff)
children 09fd90d91b6a
files rhodecode/controllers/changelog.py rhodecode/templates/changelog/changelog.html
diffstat 6 files changed, 52 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/docs/changelog.rst	Tue May 01 22:32:53 2012 +0200
+++ b/docs/changelog.rst	Thu May 03 01:05:08 2012 +0200
@@ -23,6 +23,8 @@
 - #415: Adding comment to changeset causes reload. 
   Comments are now added via ajax and doesn't reload the page
 - #374 LDAP config is discarded when LDAP can't be activated
+- limited push/pull operations are now logged for git in the journal
+- bumped mercurial to 2.2.X series
 
 fixes
 +++++
@@ -31,7 +33,7 @@
 - fixed missing permission checks on show forks page
 - #418 cast to unicode fixes in notification objects
 - #426 fixed mention extracting regex
-
+- fixed remote-pulling for git remotes remopositories
 
 1.3.4 (**2012-03-28**)
 ----------------------
--- a/rhodecode/controllers/admin/settings.py	Tue May 01 22:32:53 2012 +0200
+++ b/rhodecode/controllers/admin/settings.py	Thu May 03 01:05:08 2012 +0200
@@ -67,7 +67,8 @@
         c.admin_user = session.get('admin_user')
         c.admin_username = session.get('admin_username')
         c.modules = sorted([(p.project_name, p.version)
-                            for p in pkg_resources.working_set])
+                            for p in pkg_resources.working_set],
+                           key=lambda k: k[0].lower())
         c.py_version = platform.python_version()
         c.platform = platform.platform()
         super(SettingsController, self).__before__()
--- a/rhodecode/controllers/changelog.py	Tue May 01 22:32:53 2012 +0200
+++ b/rhodecode/controllers/changelog.py	Thu May 03 01:05:08 2012 +0200
@@ -126,7 +126,12 @@
 
         elif repo.alias == 'hg':
             dag = graphmod.dagwalker(repo._repo, revs)
-            c.dag = graphmod.colored(dag, repo._repo)
+            try:
+                c.dag = graphmod.colored(dag)
+            except:
+                #HG 2.2+
+                c.dag = graphmod.colored(dag, repo._repo)
+
             for (id, type, ctx, vtx, edges) in c.dag:
                 if type != graphmod.CHANGESET:
                     continue
--- a/rhodecode/templates/admin/settings/settings.html	Tue May 01 22:32:53 2012 +0200
+++ b/rhodecode/templates/admin/settings/settings.html	Thu May 03 01:05:08 2012 +0200
@@ -226,7 +226,7 @@
           <tbody>
               %for key, value in c.modules:
                   <tr>
-                      <th>${key}</th>
+                      <th style="text-align: right;padding-right:5px;">${key}</th>
                       <td>${value}</td>
                   </tr>
               %endfor
--- a/rhodecode/templates/files/files_source.html	Tue May 01 22:32:53 2012 +0200
+++ b/rhodecode/templates/files/files_source.html	Thu May 03 01:05:08 2012 +0200
@@ -16,7 +16,7 @@
 	<div class="code-header">
         <div class="stats">
             <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div>
-            <div class="left item"><pre>${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</pre></div>
+            <div class="left item"><pre class="tooltip" title="${c.file.changeset.date}">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</pre></div>
             <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div>
             <div class="left item last"><pre>${c.file.mimetype}</pre></div>
             <div class="buttons">
--- a/rhodecode/tests/rhodecode_crawler.py	Tue May 01 22:32:53 2012 +0200
+++ b/rhodecode/tests/rhodecode_crawler.py	Thu May 03 01:05:08 2012 +0200
@@ -42,8 +42,22 @@
 sys.path.append(__root__)
 
 from rhodecode.lib import vcs
+from rhodecode.lib.compat import OrderedSet
+from rhodecode.lib.vcs.exceptions import RepositoryError
 
-BASE_URI = 'http://127.0.0.1:5001/%s'
+PASES = 3
+HOST = 'http://127.0.0.1'
+PORT = 5000
+BASE_URI = '%s:%s/' % (HOST, PORT)
+
+if len(sys.argv) == 2:
+    BASE_URI = sys.argv[1]
+
+if not BASE_URI.endswith('/'):
+    BASE_URI += '/'
+
+print 'Crawling @ %s' % BASE_URI
+BASE_URI += '%s'
 PROJECT_PATH = jn('/', 'home', 'marcink', 'hg_repos')
 PROJECTS = [
     'linux-magx-pbranch',
@@ -62,7 +76,20 @@
 urllib2.install_opener(o)
 
 
+def _get_repo(proj):
+    if isinstance(proj, basestring):
+        repo = vcs.get_repo(jn(PROJECT_PATH, proj))
+        proj = proj
+    else:
+        repo = proj
+        proj = repo.name
+
+    return repo, proj
+
+
 def test_changelog_walk(proj, pages=100):
+    repo, proj = _get_repo(proj)
+
     total_time = 0
     for i in range(1, pages):
 
@@ -81,10 +108,11 @@
 
 
 def test_changeset_walk(proj, limit=None):
+    repo, proj = _get_repo(proj)
+
     print 'processing', jn(PROJECT_PATH, proj)
     total_time = 0
 
-    repo = vcs.get_repo(jn(PROJECT_PATH, proj))
     cnt = 0
     for i in repo:
         cnt += 1
@@ -106,14 +134,11 @@
 
 
 def test_files_walk(proj, limit=100):
+    repo, proj = _get_repo(proj)
+
     print 'processing', jn(PROJECT_PATH, proj)
     total_time = 0
 
-    repo = vcs.get_repo(jn(PROJECT_PATH, proj))
-
-    from rhodecode.lib.compat import OrderedSet
-    from rhodecode.lib.vcs.exceptions import RepositoryError
-
     paths_ = OrderedSet([''])
     try:
         tip = repo.get_changeset('tip')
@@ -150,10 +175,10 @@
     print 'average on req', total_time / float(cnt)
 
 if __name__ == '__main__':
-
-    for p in PROJECTS:
-        test_changelog_walk(p, 40)
-        time.sleep(2)
-        test_changeset_walk(p, limit=100)
-        time.sleep(2)
-        test_files_walk(p, 100)
+    for path in PROJECTS:
+        repo = vcs.get_repo(jn(PROJECT_PATH, path))
+        for i in range(PASES):
+            print 'PASS %s/%s' % (i, PASES)
+            test_changelog_walk(repo, pages=80)
+            test_changeset_walk(repo, limit=100)
+            test_files_walk(repo, limit=100)