'Git'
end
+ def repo_log_encoding
+ 'UTF-8'
+ end
+
# Returns the identifier for the given git changeset
def self.changeset_identifier(changeset)
changeset.scmid
def lastrev(path, rev)
return nil if path.nil?
- cmd_args = %w|log --no-color --date=iso --pretty=fuller --no-merges -n 1|
+ cmd_args = %w|log --no-color --encoding=UTF-8 --date=iso --pretty=fuller --no-merges -n 1|
cmd_args << rev if rev
cmd_args << "--" << path unless path.empty?
lines = []
def revisions(path, identifier_from, identifier_to, options={})
revisions = Revisions.new
- cmd_args = %w|log --no-color --raw --date=iso --pretty=fuller|
+ cmd_args = %w|log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller|
cmd_args << "--reverse" if options[:reverse]
cmd_args << "--all" if options[:all]
cmd_args << "-n" << "#{options[:limit].to_i}" if options[:limit]
end
def test_branches
- assert_equal @adapter.branches, ['master', 'test_branch']
+ assert_equal @adapter.branches, ['master', 'test-latin-1', 'test_branch']
end
def test_getting_all_revisions
- assert_equal 15, @adapter.revisions('',nil,nil,:all => true).length
+ assert_equal 16, @adapter.revisions('',nil,nil,:all => true).length
end
def test_getting_certain_revisions
@repository.fetch_changesets
@repository.reload
- assert_equal 15, @repository.changesets.count
- assert_equal 24, @repository.changes.count
+ assert_equal 16, @repository.changesets.count
+ assert_equal 25, @repository.changes.count
commit = @repository.changesets.find(:first, :order => 'committed_on ASC')
assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments
# Remove the 3 latest changesets
@repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 3).each(&:destroy)
@repository.reload
- assert_equal 12, @repository.changesets.count
+ assert_equal 13, @repository.changesets.count
@repository.fetch_changesets
- assert_equal 15, @repository.changesets.count
+ assert_equal 16, @repository.changesets.count
end
def test_find_changeset_by_name