# HG changeset patch # User Mads Kiilerich # Date 1470963888 -7200 # Node ID 12919ffab34c748a861e6be6a73d18c9066e74df # Parent 3ef5534fc2d9580a928c893bce62d0b110a5fc77 pullrequests: use monospace for hashes - columns of hashes look messy when they have different lenght 17f9f921a538 was insufficient. diff -r 3ef5534fc2d9 -r 12919ffab34c kallithea/templates/changelog/changelog.html --- a/kallithea/templates/changelog/changelog.html Fri Aug 12 03:04:48 2016 +0200 +++ b/kallithea/templates/changelog/changelog.html Fri Aug 12 03:04:48 2016 +0200 @@ -106,9 +106,7 @@ ${h.shorter(h.person(cs.author),22)} - - ${h.show_id(cs)} - + ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id), class_='changeset_hash')}
${h.age(cs.date,True)}
diff -r 3ef5534fc2d9 -r 12919ffab34c kallithea/templates/changeset/changeset.html --- a/kallithea/templates/changeset/changeset.html Fri Aug 12 03:04:48 2016 +0200 +++ b/kallithea/templates/changeset/changeset.html Fri Aug 12 03:04:48 2016 +0200 @@ -118,13 +118,13 @@ <% rev = c.changeset.extra.get('source') %> %if rev:
- ${_('Grafted from:')} ${h.link_to(h.short_id(rev),h.url('changeset_home',repo_name=c.repo_name,revision=rev))} + ${_('Grafted from:')} ${h.link_to(h.short_id(rev),h.url('changeset_home',repo_name=c.repo_name,revision=rev), class_="changeset_hash")}
%endif <% rev = c.changeset.extra.get('transplant_source', '').encode('hex') %> %if rev:
- ${_('Transplanted from:')} ${h.link_to(h.short_id(rev),h.url('changeset_home',repo_name=c.repo_name,revision=rev))} + ${_('Transplanted from:')} ${h.link_to(h.short_id(rev),h.url('changeset_home',repo_name=c.repo_name,revision=rev), class_="changeset_hash")}
%endif diff -r 3ef5534fc2d9 -r 12919ffab34c kallithea/templates/compare/compare_cs.html --- a/kallithea/templates/compare/compare_cs.html Fri Aug 12 03:04:48 2016 +0200 +++ b/kallithea/templates/compare/compare_cs.html Fri Aug 12 03:04:48 2016 +0200 @@ -6,7 +6,7 @@ %if c.ancestor:
${_('Ancestor')}: - ${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor))} + ${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor), class_="changeset_hash")}
%endif @@ -56,7 +56,7 @@ ${h.gravatar_div(h.email_or_none(cs.author), size=14, div_commit_id="${cs.raw_id}")} %endif
${h.person(cs.author)}
- ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))} + ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id), class_='changeset_hash')} %if cs.branch: ${h.link_to(cs.branch,h.url('changelog_home',repo_name=c.cs_repo.repo_name,branch=cs.branch))} @@ -96,7 +96,7 @@
${_('Common ancestor')}: %if c.ancestor: - ${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor))} + ${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor), class_="changeset_hash")} %else: ${_('No common ancestor found - repositories are unrelated')} %endif diff -r 3ef5534fc2d9 -r 12919ffab34c kallithea/templates/pullrequests/pullrequest_show.html --- a/kallithea/templates/pullrequests/pullrequest_show.html Fri Aug 12 03:04:48 2016 +0200 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Fri Aug 12 03:04:48 2016 +0200 @@ -196,7 +196,7 @@ %endif ${cs.date} - ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))} + ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id), class_='changeset_hash')}
%for tag in cs.tags: @@ -317,7 +317,7 @@
${_('Common ancestor')}: - ${h.link_to(h.short_id(c.a_rev),h.url('changeset_home',repo_name=c.a_repo.repo_name,revision=c.a_rev))} + ${h.link_to(h.short_id(c.a_rev),h.url('changeset_home',repo_name=c.a_repo.repo_name,revision=c.a_rev), class_="changeset_hash")}
## FILES diff -r 3ef5534fc2d9 -r 12919ffab34c kallithea/tests/functional/test_changelog.py --- a/kallithea/tests/functional/test_changelog.py Fri Aug 12 03:04:48 2016 +0200 +++ b/kallithea/tests/functional/test_changelog.py Fri Aug 12 03:04:48 2016 +0200 @@ -17,7 +17,7 @@ ) #rev 640: code garden response.mustcontain( - """r640:0a4e54a44604""" + """r640:0a4e54a44604""" % HG_REPO ) response.mustcontain("""code garden""") @@ -48,7 +48,7 @@ ) response.mustcontain( - """r539:22baf968d547""" + """r539:22baf968d547""" ) def test_index_git(self): @@ -65,7 +65,7 @@ ) response.mustcontain( - """r613:95f9a91d775b""" + """r613:95f9a91d775b""" ) response.mustcontain("""fixing stupid typo in context for mercurial""") @@ -104,7 +104,7 @@ ) response.mustcontain( - """r515:636ed213f2f1""" + """r515:636ed213f2f1""" ) def test_index_hg_with_filenode(self): diff -r 3ef5534fc2d9 -r 12919ffab34c kallithea/tests/functional/test_compare.py --- a/kallithea/tests/functional/test_compare.py Fri Aug 12 03:04:48 2016 +0200 +++ b/kallithea/tests/functional/test_compare.py Fri Aug 12 03:04:48 2016 +0200 @@ -68,8 +68,8 @@ response.mustcontain(_commit_div(cs1.raw_id, 'commit2')) response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) - response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) - response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) + response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) + response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) ## files response.mustcontain("""file1""") #swap @@ -119,8 +119,8 @@ response.mustcontain(_commit_div(cs1.raw_id, 'commit2')) response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) - response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) - response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) + response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) + response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) ## files response.mustcontain("""file1""") #swap @@ -178,8 +178,8 @@ response.mustcontain(_commit_div(cs1.raw_id, 'commit2')) response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) - response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) - response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) + response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) + response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) ## files response.mustcontain("""file1""") #swap @@ -237,8 +237,8 @@ response.mustcontain(_commit_div(cs1.raw_id, 'commit2')) response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) - response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) - response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) + response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) + response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) ## files response.mustcontain("""file1""") #swap @@ -306,9 +306,9 @@ response.mustcontain(_commit_div(cs3.raw_id, 'commit4')) response.mustcontain(_commit_div(cs4.raw_id, 'commit5')) - response.mustcontain("""r2:%s""" % (repo1.repo_name, cs2.raw_id, cs2.short_id)) - response.mustcontain("""r3:%s""" % (repo1.repo_name, cs3.raw_id, cs3.short_id)) - response.mustcontain("""r4:%s""" % (repo1.repo_name, cs4.raw_id, cs4.short_id)) + response.mustcontain("""r2:%s""" % (repo1.repo_name, cs2.raw_id, cs2.short_id)) + response.mustcontain("""r3:%s""" % (repo1.repo_name, cs3.raw_id, cs3.short_id)) + response.mustcontain("""r4:%s""" % (repo1.repo_name, cs4.raw_id, cs4.short_id)) ## files response.mustcontain("""#C--826e8142e6ba">file1""") @@ -372,9 +372,9 @@ response.mustcontain(_commit_div(cs4.raw_id, 'commit5')) response.mustcontain(_commit_div(cs5.raw_id, 'commit6')) - response.mustcontain("""r3:%s""" % (repo1.repo_name, cs3.raw_id, cs3.short_id)) - response.mustcontain("""r4:%s""" % (repo1.repo_name, cs4.raw_id, cs4.short_id)) - response.mustcontain("""r5:%s""" % (repo1.repo_name, cs5.raw_id, cs5.short_id)) + response.mustcontain("""r3:%s""" % (repo1.repo_name, cs3.raw_id, cs3.short_id)) + response.mustcontain("""r4:%s""" % (repo1.repo_name, cs4.raw_id, cs4.short_id)) + response.mustcontain("""r5:%s""" % (repo1.repo_name, cs5.raw_id, cs5.short_id)) ## files response.mustcontain("""#C--826e8142e6ba">file1""") @@ -403,9 +403,9 @@ response.mustcontain('%s@%s' % (HG_FORK, rev2)) ## outgoing changesets between those revisions - response.mustcontain("""r4:2dda4e345fac""" % (HG_FORK)) - response.mustcontain("""r5:6fff84722075""" % (HG_FORK)) - response.mustcontain("""r6:%s""" % (HG_FORK, rev2)) + response.mustcontain("""r4:2dda4e345fac""" % (HG_FORK)) + response.mustcontain("""r5:6fff84722075""" % (HG_FORK)) + response.mustcontain("""r6:%s""" % (HG_FORK, rev2)) ## files response.mustcontain("""vcs/backends/hg.py""") @@ -433,9 +433,9 @@ response.mustcontain('%s@%s' % (GIT_FORK, rev2)) ## outgoing changesets between those revisions - response.mustcontain("""r4:49d3fd156b6f""" % (GIT_FORK)) - response.mustcontain("""r5:2d1028c05466""" % (GIT_FORK)) - response.mustcontain("""r6:%s""" % (GIT_FORK, rev2[:12])) + response.mustcontain("""r4:49d3fd156b6f""" % (GIT_FORK)) + response.mustcontain("""r5:2d1028c05466""" % (GIT_FORK)) + response.mustcontain("""r6:%s""" % (GIT_FORK, rev2[:12])) ## files response.mustcontain("""vcs/backends/hg.py""") diff -r 3ef5534fc2d9 -r 12919ffab34c kallithea/tests/functional/test_compare_local.py --- a/kallithea/tests/functional/test_compare_local.py Fri Aug 12 03:04:48 2016 +0200 +++ b/kallithea/tests/functional/test_compare_local.py Fri Aug 12 03:04:48 2016 +0200 @@ -18,13 +18,13 @@ response.mustcontain('%s@%s' % (HG_REPO, tag2)) ## outgoing changesets between tags - response.mustcontain('''r112:c5ddebc06eaa''' % HG_REPO) - response.mustcontain('''r115:70d4cef8a376''' % HG_REPO) - response.mustcontain('''r116:9749bfbfc0d2''' % HG_REPO) - response.mustcontain('''r117:41fda979f02f''' % HG_REPO) - response.mustcontain('''r118:bb1a3ab98cc4''' % HG_REPO) - response.mustcontain('''r119:36e0fc9d2808''' % HG_REPO) - response.mustcontain('''r120:17544fbfcd33''' % HG_REPO) + response.mustcontain('''r112:c5ddebc06eaa''' % HG_REPO) + response.mustcontain('''r115:70d4cef8a376''' % HG_REPO) + response.mustcontain('''r116:9749bfbfc0d2''' % HG_REPO) + response.mustcontain('''r117:41fda979f02f''' % HG_REPO) + response.mustcontain('''r118:bb1a3ab98cc4''' % HG_REPO) + response.mustcontain('''r119:36e0fc9d2808''' % HG_REPO) + response.mustcontain('''r120:17544fbfcd33''' % HG_REPO) response.mustcontain('11 files changed with 94 insertions and 64 deletions') @@ -78,13 +78,13 @@ response.mustcontain('%s@%s' % (GIT_REPO, tag2)) ## outgoing changesets between tags - response.mustcontain('''r113:794bbdd31545''' % GIT_REPO) - response.mustcontain('''r115:e36d8c502532''' % GIT_REPO) - response.mustcontain('''r116:5c9ff4f6d750''' % GIT_REPO) - response.mustcontain('''r117:b7187fa2b8c1''' % GIT_REPO) - response.mustcontain('''r118:5f3b74262014''' % GIT_REPO) - response.mustcontain('''r119:17438a11f72b''' % GIT_REPO) - response.mustcontain('''r120:5a3a8fb00555''' % GIT_REPO) + response.mustcontain('''r113:794bbdd31545''' % GIT_REPO) + response.mustcontain('''r115:e36d8c502532''' % GIT_REPO) + response.mustcontain('''r116:5c9ff4f6d750''' % GIT_REPO) + response.mustcontain('''r117:b7187fa2b8c1''' % GIT_REPO) + response.mustcontain('''r118:5f3b74262014''' % GIT_REPO) + response.mustcontain('''r119:17438a11f72b''' % GIT_REPO) + response.mustcontain('''r120:5a3a8fb00555''' % GIT_REPO) response.mustcontain('11 files changed with 94 insertions and 64 deletions') @@ -149,7 +149,7 @@ response.mustcontain('%s@%s' % (HG_REPO, rev2)) ## outgoing changesets between those revisions - response.mustcontain("""r1:%s""" % (HG_REPO, rev2)) + response.mustcontain("""r1:%s""" % (HG_REPO, rev2)) response.mustcontain('1 file changed with 7 insertions and 0 deletions') ## files @@ -171,7 +171,7 @@ response.mustcontain('%s@%s' % (GIT_REPO, rev2)) ## outgoing changesets between those revisions - response.mustcontain("""r1:%s""" % (GIT_REPO, rev2[:12])) + response.mustcontain("""r1:%s""" % (GIT_REPO, rev2[:12])) response.mustcontain('1 file changed with 7 insertions and 0 deletions') ## files @@ -193,10 +193,10 @@ extra_environ={'HTTP_X_PARTIAL_XHR': '1'},) ## outgoing changesets between those revisions - response.mustcontain("""r1:%s""" % (HG_REPO, rev2)) + response.mustcontain("""r1:%s""" % (HG_REPO, rev2)) response.mustcontain('Common ancestor') - response.mustcontain("""%s""" % (HG_REPO, rev1)) + response.mustcontain("""%s""" % (HG_REPO, rev1)) def test_compare_revisions_git_as_form(self): self.log_user() @@ -213,7 +213,7 @@ ), extra_environ={'HTTP_X_PARTIAL_XHR': '1'},) ## outgoing changesets between those revisions - response.mustcontain("""r1:%s""" % (GIT_REPO, rev2[:12])) + response.mustcontain("""r1:%s""" % (GIT_REPO, rev2[:12])) response.mustcontain('Common ancestor') - response.mustcontain("""%s""" % (GIT_REPO, rev1[:12])) + response.mustcontain("""%s""" % (GIT_REPO, rev1[:12]))