diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-01 08:46:47 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-01 08:46:47 +0000 |
commit | f2ec6f8d77ec1fd9f00ab1c24dc1379c70245f6b (patch) | |
tree | 57b8e833b86f2813706d68d3f1038e9daa420f69 /lib/redmine | |
parent | ae68ff11004d6a0bae0affd41b3a9823c30fb75c (diff) | |
download | redmine-f2ec6f8d77ec1fd9f00ab1c24dc1379c70245f6b.tar.gz redmine-f2ec6f8d77ec1fd9f00ab1c24dc1379c70245f6b.zip |
back out r12752 (#14361)
Revision, Author and Comment of repository browser are broken.
git-svn-id: http://svn.redmine.org/redmine/trunk@12753 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r-- | lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl | 4 | ||||
-rw-r--r-- | lib/redmine/scm/adapters/mercurial/redminehelper.py | 10 | ||||
-rw-r--r-- | lib/redmine/scm/adapters/mercurial_adapter.rb | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl b/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl index b5b4e9203..a2a324ba2 100644 --- a/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl +++ b/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl @@ -1,12 +1,12 @@ changeset = 'This template must be used with --debug option\n' changeset_quiet = 'This template must be used with --debug option\n' changeset_verbose = 'This template must be used with --debug option\n' -changeset_debug = '<logentry revision="{rev}" node="{node}">\n<author>{author|escape}</author>\n<date>{date|isodatesec}</date>\n<paths>\n{file_mods}{file_adds}{file_dels}{file_copies}</paths>\n<msg>{desc|escape}</msg>\n<parents>\n{parents}</parents>\n</logentry>\n\n' +changeset_debug = '<logentry revision="{rev}" node="{node|short}">\n<author>{author|escape}</author>\n<date>{date|isodatesec}</date>\n<paths>\n{file_mods}{file_adds}{file_dels}{file_copies}</paths>\n<msg>{desc|escape}</msg>\n<parents>\n{parents}</parents>\n</logentry>\n\n' file_mod = '<path action="M">{file_mod|urlescape}</path>\n' file_add = '<path action="A">{file_add|urlescape}</path>\n' file_del = '<path action="D">{file_del|urlescape}</path>\n' file_copy = '<path-copied copyfrom-path="{source|urlescape}">{name|urlescape}</path-copied>\n' -parent = '<parent>{node}</parent>\n' +parent = '<parent>{node|short}</parent>\n' header='<?xml version="1.0" encoding="UTF-8" ?>\n<log>\n\n' # footer="</log>" diff --git a/lib/redmine/scm/adapters/mercurial/redminehelper.py b/lib/redmine/scm/adapters/mercurial/redminehelper.py index a3a8d802f..bd82c0020 100644 --- a/lib/redmine/scm/adapters/mercurial/redminehelper.py +++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py @@ -16,7 +16,7 @@ I/O encoding: :file path: urlencoded, raw string :tag name: utf-8 :branch name: utf-8 -:node: hex string +:node: 12-digits (short) hex string Output example of rhsummary:: @@ -60,7 +60,7 @@ def _tip(ui, repo): return repo.changelog.count() - 1 tipctx = repo.changectx(tiprev()) ui.write('<tip revision="%d" node="%s"/>\n' - % (tipctx.rev(), _x(node.hex(tipctx.node())))) + % (tipctx.rev(), _x(node.short(tipctx.node())))) _SPECIAL_TAGS = ('tip',) @@ -74,7 +74,7 @@ def _tags(ui, repo): except error.LookupError: continue ui.write('<tag revision="%d" node="%s" name="%s"/>\n' - % (r, _x(node.hex(n)), _x(t))) + % (r, _x(node.short(n)), _x(t))) def _branches(ui, repo): # see mercurial/commands.py:branches @@ -89,7 +89,7 @@ def _branches(ui, repo): for t, n, r in sorted(iterbranches(), key=lambda e: e[2], reverse=True): if repo.lookup(r) in branchheads(t): ui.write('<branch revision="%d" node="%s" name="%s"/>\n' - % (r, _x(node.hex(n)), _x(t))) + % (r, _x(node.short(n)), _x(t))) def _manifest(ui, repo, path, rev): ctx = repo.changectx(rev) @@ -114,7 +114,7 @@ def _manifest(ui, repo, path, rev): tm, tzoffset = fctx.date() ui.write('<file name="%s" revision="%d" node="%s" ' 'time="%d" size="%d"/>\n' - % (_u(name), fctx.rev(), _x(node.hex(fctx.node())), + % (_u(name), fctx.rev(), _x(node.short(fctx.node())), tm, fctx.size(), )) ui.write('</manifest>\n') diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 881fdc89c..f82af1a59 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -219,7 +219,7 @@ module Redmine end.sort { |a, b| a[:path] <=> b[:path] } parents_ary = [] as_ary(le['parents']['parent']).map do |par| - parents_ary << par['__content__'] if par['__content__'] != "0000000000000000000000000000000000000000" + parents_ary << par['__content__'] if par['__content__'] != "000000000000" end yield Revision.new(:revision => le['revision'], :scmid => le['node'], @@ -234,7 +234,7 @@ module Redmine # Returns list of nodes in the specified branch def nodes_in_branch(branch, options={}) - hg_args = ['rhlog', '--template', '{node}\n', '--rhbranch', CGI.escape(branch)] + hg_args = ['rhlog', '--template', '{node|short}\n', '--rhbranch', CGI.escape(branch)] hg_args << '--from' << CGI.escape(branch) hg_args << '--to' << '0' hg_args << '--limit' << options[:limit] if options[:limit] |