Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 6656: Mercurial: more accurate commit timestamp (fix second missing) #9

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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|short}">\n<author>{author|escape}</author>\n<date>{date|isodate}</date>\n<paths>\n{file_mods}{file_adds}{file_dels}{file_copies}</paths>\n<msg>{desc|escape}</msg>\n{tags}</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{tags}</logentry>\n\n'

file_mod = '<path action="M">{file_mod|escape}</path>\n'
file_add = '<path action="A">{file_add|escape}</path>\n'
Expand Down
10 changes: 9 additions & 1 deletion test/unit/repository_mercurial_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,20 @@ def test_locate_on_outdated_repository
assert_equal 2, @repository.entries("images", 2).size
end


def test_cat
assert @repository.scm.cat("sources/welcome_controller.rb", 2)
assert_nil @repository.scm.cat("sources/welcome_controller.rb")
end

def test_isodatesec
# Template keyword 'isodatesec' supported in Mercurial 1.0 and higher
if @repository.scm.class.client_version_above?([1, 0])
@repository.fetch_changesets
@repository.reload
rev0_committed_on = Time.gm(2007, 12, 14, 9, 22, 52)
assert_equal @repository.changesets.find_by_revision('0').committed_on, rev0_committed_on
end
end
else
puts "Mercurial test repository NOT FOUND. Skipping unit tests !!!"
def test_fake; assert true end
Expand Down