Ensure Copyright Checker/Updater works with Git - Tests

Bug: 345669
Change-Id: I78bcc28d3eafb5e9132448e8b5837bac14df28d1
diff --git a/org.eclipse.egit.relengtools.test/.classpath b/org.eclipse.egit.relengtools.test/.classpath
new file mode 100644
index 0000000..e3388b9
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<classpath>

+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

+	<classpathentry kind="src" path="tst"/>

+	<classpathentry kind="output" path="bin"/>

+</classpath>

diff --git a/org.eclipse.egit.relengtools.test/.gitignore b/org.eclipse.egit.relengtools.test/.gitignore
new file mode 100644
index 0000000..d567ba0
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/.gitignore
@@ -0,0 +1,2 @@
+bin
+target
diff --git a/org.eclipse.egit.relengtools.test/.project b/org.eclipse.egit.relengtools.test/.project
new file mode 100644
index 0000000..70c23f4
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.egit.relengtools.test</name>

+	<comment></comment>

+	<projects>

+	</projects>

+	<buildSpec>

+		<buildCommand>

+			<name>org.eclipse.jdt.core.javabuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.ManifestBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.SchemaBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+	</buildSpec>

+	<natures>

+		<nature>org.eclipse.pde.PluginNature</nature>

+		<nature>org.eclipse.jdt.core.javanature</nature>

+	</natures>

+</projectDescription>

diff --git a/org.eclipse.egit.relengtools.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egit.relengtools.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..15b0d17
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,279 @@
+#Fri Mar 02 13:23:28 CET 2012

+eclipse.preferences.version=1

+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled

+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6

+org.eclipse.jdt.core.compiler.compliance=1.6

+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error

+org.eclipse.jdt.core.compiler.source=1.6

+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_assignment=0

+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16

+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80

+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0

+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16

+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0

+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16

+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16

+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16

+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1

+org.eclipse.jdt.core.formatter.blank_lines_after_package=1

+org.eclipse.jdt.core.formatter.blank_lines_before_field=1

+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0

+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1

+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1

+org.eclipse.jdt.core.formatter.blank_lines_before_method=1

+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1

+org.eclipse.jdt.core.formatter.blank_lines_before_package=0

+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1

+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1

+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false

+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false

+org.eclipse.jdt.core.formatter.comment.format_block_comments=true

+org.eclipse.jdt.core.formatter.comment.format_header=false

+org.eclipse.jdt.core.formatter.comment.format_html=true

+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true

+org.eclipse.jdt.core.formatter.comment.format_line_comments=true

+org.eclipse.jdt.core.formatter.comment.format_source_code=true

+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true

+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true

+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert

+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert

+org.eclipse.jdt.core.formatter.comment.line_length=80

+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true

+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true

+org.eclipse.jdt.core.formatter.compact_else_if=true

+org.eclipse.jdt.core.formatter.continuation_indentation=2

+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2

+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off

+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on

+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false

+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true

+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true

+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true

+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true

+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true

+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true

+org.eclipse.jdt.core.formatter.indent_empty_lines=false

+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true

+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true

+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true

+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false

+org.eclipse.jdt.core.formatter.indentation.size=4

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert

+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert

+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert

+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert

+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert

+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.join_lines_in_comments=true

+org.eclipse.jdt.core.formatter.join_wrapped_lines=true

+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false

+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false

+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false

+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false

+org.eclipse.jdt.core.formatter.lineSplit=80

+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false

+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false

+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0

+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1

+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true

+org.eclipse.jdt.core.formatter.tabulation.char=tab

+org.eclipse.jdt.core.formatter.tabulation.size=4

+org.eclipse.jdt.core.formatter.use_on_off_tags=false

+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false

+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true

+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

diff --git a/org.eclipse.egit.relengtools.test/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.egit.relengtools.test/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..9db4ad5
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,114 @@
+#Thu Oct 14 11:19:18 CEST 2010

+cleanup.add_default_serial_version_id=true

+cleanup.add_generated_serial_version_id=false

+cleanup.add_missing_annotations=true

+cleanup.add_missing_deprecated_annotations=true

+cleanup.add_missing_methods=false

+cleanup.add_missing_nls_tags=false

+cleanup.add_missing_override_annotations=true

+cleanup.add_missing_override_annotations_interface_methods=true

+cleanup.add_serial_version_id=false

+cleanup.always_use_blocks=true

+cleanup.always_use_parentheses_in_expressions=false

+cleanup.always_use_this_for_non_static_field_access=false

+cleanup.always_use_this_for_non_static_method_access=false

+cleanup.convert_to_enhanced_for_loop=false

+cleanup.correct_indentation=true

+cleanup.format_source_code=true

+cleanup.format_source_code_changes_only=false

+cleanup.make_local_variable_final=true

+cleanup.make_parameters_final=false

+cleanup.make_private_fields_final=true

+cleanup.make_type_abstract_if_missing_method=false

+cleanup.make_variable_declarations_final=false

+cleanup.never_use_blocks=false

+cleanup.never_use_parentheses_in_expressions=true

+cleanup.organize_imports=true

+cleanup.qualify_static_field_accesses_with_declaring_class=false

+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true

+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true

+cleanup.qualify_static_member_accesses_with_declaring_class=true

+cleanup.qualify_static_method_accesses_with_declaring_class=false

+cleanup.remove_private_constructors=true

+cleanup.remove_trailing_whitespaces=true

+cleanup.remove_trailing_whitespaces_all=true

+cleanup.remove_trailing_whitespaces_ignore_empty=false

+cleanup.remove_unnecessary_casts=true

+cleanup.remove_unnecessary_nls_tags=true

+cleanup.remove_unused_imports=true

+cleanup.remove_unused_local_variables=false

+cleanup.remove_unused_private_fields=true

+cleanup.remove_unused_private_members=false

+cleanup.remove_unused_private_methods=true

+cleanup.remove_unused_private_types=true

+cleanup.sort_members=false

+cleanup.sort_members_all=false

+cleanup.use_blocks=false

+cleanup.use_blocks_only_for_return_and_throw=false

+cleanup.use_parentheses_in_expressions=false

+cleanup.use_this_for_non_static_field_access=false

+cleanup.use_this_for_non_static_field_access_only_if_necessary=true

+cleanup.use_this_for_non_static_method_access=false

+cleanup.use_this_for_non_static_method_access_only_if_necessary=true

+cleanup_profile=_JGit Clean-Up

+cleanup_settings_version=2

+eclipse.preferences.version=1

+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true

+formatter_profile=_JGit Format

+formatter_settings_version=11

+org.eclipse.jdt.ui.ignorelowercasenames=true

+org.eclipse.jdt.ui.importorder=java;javax;org;com;

+org.eclipse.jdt.ui.ondemandthreshold=99

+org.eclipse.jdt.ui.staticondemandthreshold=99

+sp_cleanup.add_default_serial_version_id=true

+sp_cleanup.add_generated_serial_version_id=false

+sp_cleanup.add_missing_annotations=true

+sp_cleanup.add_missing_deprecated_annotations=true

+sp_cleanup.add_missing_methods=false

+sp_cleanup.add_missing_nls_tags=false

+sp_cleanup.add_missing_override_annotations=true

+sp_cleanup.add_missing_override_annotations_interface_methods=true

+sp_cleanup.add_serial_version_id=false

+sp_cleanup.always_use_blocks=true

+sp_cleanup.always_use_parentheses_in_expressions=false

+sp_cleanup.always_use_this_for_non_static_field_access=false

+sp_cleanup.always_use_this_for_non_static_method_access=false

+sp_cleanup.convert_to_enhanced_for_loop=false

+sp_cleanup.correct_indentation=true

+sp_cleanup.format_source_code=true

+sp_cleanup.format_source_code_changes_only=false

+sp_cleanup.make_local_variable_final=true

+sp_cleanup.make_parameters_final=false

+sp_cleanup.make_private_fields_final=true

+sp_cleanup.make_type_abstract_if_missing_method=false

+sp_cleanup.make_variable_declarations_final=true

+sp_cleanup.never_use_blocks=false

+sp_cleanup.never_use_parentheses_in_expressions=true

+sp_cleanup.on_save_use_additional_actions=true

+sp_cleanup.organize_imports=true

+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false

+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true

+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true

+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false

+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false

+sp_cleanup.remove_private_constructors=true

+sp_cleanup.remove_trailing_whitespaces=true

+sp_cleanup.remove_trailing_whitespaces_all=true

+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false

+sp_cleanup.remove_unnecessary_casts=true

+sp_cleanup.remove_unnecessary_nls_tags=false

+sp_cleanup.remove_unused_imports=false

+sp_cleanup.remove_unused_local_variables=false

+sp_cleanup.remove_unused_private_fields=true

+sp_cleanup.remove_unused_private_members=false

+sp_cleanup.remove_unused_private_methods=true

+sp_cleanup.remove_unused_private_types=true

+sp_cleanup.sort_members=false

+sp_cleanup.sort_members_all=false

+sp_cleanup.use_blocks=false

+sp_cleanup.use_blocks_only_for_return_and_throw=false

+sp_cleanup.use_parentheses_in_expressions=false

+sp_cleanup.use_this_for_non_static_field_access=false

+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true

+sp_cleanup.use_this_for_non_static_method_access=false

+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

diff --git a/org.eclipse.egit.relengtools.test/.settings/org.eclipse.pde.core.prefs b/org.eclipse.egit.relengtools.test/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..09ed527
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Fri Mar 02 12:12:40 CET 2012

+eclipse.preferences.version=1

+resolve.requirebundle=false

diff --git a/org.eclipse.egit.relengtools.test/META-INF/MANIFEST.MF b/org.eclipse.egit.relengtools.test/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..99f4a7c
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.egit.relengtools.test;singleton:=true
+Bundle-Version: 0.12.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %Bundle-Vendor
+Export-Package: org.eclipse.egit.internal.relengtools;x-internal:=true
+Require-Bundle: org.eclipse.core.jobs;bundle-version="3.5.100",
+ org.eclipse.jgit;bundle-version="2.0.0",
+ org.eclipse.egit.core;bundle-version="2.0.0",
+ org.eclipse.releng.tools;bundle-version="3.6.100",
+ org.eclipse.egit.relengtools;bundle-version="0.12.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.resources;bundle-version="3.7.100",
+ org.eclipse.jgit.junit;bundle-version="2.0.0",
+ org.junit;bundle-version="4.8.2"
diff --git a/org.eclipse.egit.relengtools.test/build.properties b/org.eclipse.egit.relengtools.test/build.properties
new file mode 100644
index 0000000..19c68ad
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/build.properties
@@ -0,0 +1,14 @@
+###############################################################################

+# Copyright (c) 2012 IBM Corporation and others.

+# All rights reserved. This program and the accompanying materials

+# are made available under the terms of the Eclipse Public License v1.0

+# which accompanies this distribution, and is available at

+# http://www.eclipse.org/legal/epl-v10.html

+#

+# Contributors:

+#     Tomasz Zarna <Tomasz.Zarna@pl.ibm.com> - initial API and implementation

+###############################################################################

+source.. = tst/

+output.. = bin/

+bin.includes = META-INF/,\

+               .

diff --git a/org.eclipse.egit.relengtools.test/org.eclipse.egit.relengtools--Releng-Tests.launch b/org.eclipse.egit.relengtools.test/org.eclipse.egit.relengtools--Releng-Tests.launch
new file mode 100644
index 0000000..2808fa3
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/org.eclipse.egit.relengtools--Releng-Tests.launch
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">

+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>

+<booleanAttribute key="askclear" value="false"/>

+<booleanAttribute key="automaticAdd" value="true"/>

+<booleanAttribute key="automaticValidate" value="true"/>

+<stringAttribute key="bootstrap" value=""/>

+<stringAttribute key="checked" value="[NONE]"/>

+<booleanAttribute key="clearConfig" value="true"/>

+<booleanAttribute key="clearws" value="true"/>

+<booleanAttribute key="clearwslog" value="false"/>

+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>

+<booleanAttribute key="default" value="false"/>

+<stringAttribute key="deselected_workspace_plugins" value="org.apache.log4j,org.eclipse.egit,org.eclipse.egit.doc,org.eclipse.egit.mylyn.ui,org.eclipse.egit.mylyn.ui.test,org.eclipse.egit.ui,org.eclipse.egit.ui.test,org.eclipse.jgit.ant,org.eclipse.jgit.ant.test,org.eclipse.jgit.console,org.eclipse.jgit.http.server,org.eclipse.jgit.http.test,org.eclipse.jgit.iplog,org.eclipse.jgit.junit.http,org.eclipse.jgit.pgm,org.eclipse.jgit.test,org.eclipse.jgit.ui,org.kohsuke.args4j,swtbot.addition"/>

+<booleanAttribute key="includeOptional" value="true"/>

+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>

+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">

+<listEntry value="/org.eclipse.egit.relengtools.test"/>

+</listAttribute>

+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">

+<listEntry value="4"/>

+</listAttribute>

+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>

+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">

+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>

+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>

+</listAttribute>

+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.egit.relengtools.test"/>

+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>

+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>

+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>

+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>

+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.egit.relengtools.test"/>

+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>

+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>

+<stringAttribute key="pde.version" value="3.3"/>

+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>

+<booleanAttribute key="run_in_ui_thread" value="true"/>

+<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,com.jcraft.jsch@default:default,javax.transaction@default:false,org.apache.ant@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.help@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.jsch.core@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.team.core@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.junit4@default:default"/>

+<stringAttribute key="selected_workspace_plugins" value="com.thoughtworks.qdox@default:default,javax.servlet@default:default,org.easymock@default:default,org.eclipse.egit.core.test@default:false,org.eclipse.egit.core@default:default,org.eclipse.egit.relengtools.test@default:default,org.eclipse.egit.relengtools@default:default,org.eclipse.jgit.junit@default:default,org.eclipse.jgit@default:default,org.eclipse.releng.tools@default:default,org.hamcrest.core@default:default,org.hamcrest.generator@default:default,org.hamcrest.integration@default:default,org.hamcrest.library@default:default,org.hamcrest.text@default:default,org.hamcrest@default:default,org.junit@default:default,org.mockito@default:default,org.objenesis@default:default"/>

+<booleanAttribute key="show_selected_only" value="true"/>

+<stringAttribute key="timestamp" value="1330698347453"/>

+<booleanAttribute key="tracing" value="false"/>

+<booleanAttribute key="useCustomFeatures" value="false"/>

+<booleanAttribute key="useDefaultConfig" value="true"/>

+<booleanAttribute key="useDefaultConfigArea" value="false"/>

+<booleanAttribute key="useProduct" value="false"/>

+</launchConfiguration>
\ No newline at end of file
diff --git a/org.eclipse.egit.relengtools.test/pom.xml b/org.eclipse.egit.relengtools.test/pom.xml
new file mode 100644
index 0000000..660b87e
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/pom.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright (c) 2012 IBM Corporation and others.
+    All rights reserved.
+
+    This program and the accompanying materials are made available under the
+    terms of the Eclipse Public License v1.0 which accompanies this distribution,
+    and is available at http://www.eclipse.org/legal/epl-v10.html.
+
+    Contributors:
+        Tomasz Zarna - initial API and implementation
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.eclipse.egit.pde</groupId>
+    <artifactId>egit-pde-parent</artifactId>
+    <version>0.12.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.egit.relengtools.test</artifactId>
+  <packaging>eclipse-plugin</packaging>
+
+  <name>EGit Releng Tools Integration Tests (Incubation)</name>
+
+  <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
+  <build>
+    <resources>
+      <resource>
+        <directory>src</directory>
+        <excludes>
+          <exclude>**/*.java</exclude>
+        </excludes>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.sonatype.tycho</groupId>
+        <artifactId>maven-osgi-source-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/org.eclipse.egit.relengtools.test/tst/org/eclipse/egit/internal/relengtools/GitCopyrightAdapterTest.java b/org.eclipse.egit.relengtools.test/tst/org/eclipse/egit/internal/relengtools/GitCopyrightAdapterTest.java
new file mode 100644
index 0000000..11da18a
--- /dev/null
+++ b/org.eclipse.egit.relengtools.test/tst/org/eclipse/egit/internal/relengtools/GitCopyrightAdapterTest.java
@@ -0,0 +1,141 @@
+/*******************************************************************************

+ * Copyright (c) 2012 IBM Corporation and others.

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *     Tomasz Zarna <Tomasz.Zarna@pl.ibm.com> - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.egit.internal.relengtools;

+

+import static org.junit.Assert.assertEquals;

+

+import java.io.ByteArrayInputStream;

+import java.io.File;

+import java.text.ParseException;

+import java.text.SimpleDateFormat;

+import java.util.Date;

+

+import org.eclipse.core.resources.IFile;

+import org.eclipse.core.resources.IProject;

+import org.eclipse.core.resources.IProjectDescription;

+import org.eclipse.core.resources.IResource;

+import org.eclipse.core.resources.ResourcesPlugin;

+import org.eclipse.core.runtime.CoreException;

+import org.eclipse.core.runtime.IProgressMonitor;

+import org.eclipse.core.runtime.NullProgressMonitor;

+import org.eclipse.core.runtime.Path;

+import org.eclipse.egit.core.op.ConnectProviderOperation;

+import org.eclipse.jgit.api.Git;

+import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;

+import org.eclipse.jgit.lib.Constants;

+import org.eclipse.jgit.lib.PersonIdent;

+import org.eclipse.jgit.lib.Repository;

+import org.eclipse.jgit.util.FileUtils;

+import org.junit.After;

+import org.junit.Before;

+import org.junit.Test;

+

+public class GitCopyrightAdapterTest extends LocalDiskRepositoryTestCase {

+

+	private static final IProgressMonitor NULL_MONITOR = new NullProgressMonitor();

+

+	private static final String PROJECT_NAME = "Project";

+

+	private static final String FILE_NAME = "Dummy.java";

+

+	private Repository db;

+

+	private File trash;

+

+	private File gitDir;

+

+	private IProject project;

+

+	private IFile file;

+

+	@Override

+	@Before

+	public void setUp() throws Exception {

+		super.setUp();

+		db = createWorkRepository();

+		trash = db.getWorkTree();

+		gitDir = new File(trash, Constants.DOT_GIT);

+		project = createProject(PROJECT_NAME);

+		file = project.getFile(FILE_NAME);

+		connect();

+	}

+

+	@Override

+	@After

+	public void tearDown() throws Exception {

+		if (project.exists())

+			project.delete(true, true, NULL_MONITOR);

+		if (gitDir.exists())

+			FileUtils.delete(gitDir, FileUtils.RECURSIVE | FileUtils.RETRY);

+		super.tearDown();

+	}

+

+	@Test

+	public void testLastModifiedYear() throws Exception {

+		final Git git = new Git(db);

+		git.add().addFilepattern(PROJECT_NAME + "/" + FILE_NAME).call();

+		final PersonIdent committer2012 = new PersonIdent(committer,

+				getDateForYear(2012));

+		git.commit().setMessage("initial commit").setCommitter(committer2012)

+				.call();

+

+		final GitCopyrightAdapter adapter = new GitCopyrightAdapter(

+				new IResource[] { project });

+		adapter.initialize(NULL_MONITOR);

+		final int lastModifiedYear = adapter.getLastModifiedYear(file,

+				NULL_MONITOR);

+

+		assertEquals(2012, lastModifiedYear);

+	}

+

+	@Test

+	public void testCopyrightUpdateComment() throws Exception {

+		final Git git = new Git(db);

+		git.add().addFilepattern(PROJECT_NAME + "/" + FILE_NAME).call();

+		git.commit().setMessage("copyright update").call();

+

+		final GitCopyrightAdapter adapter = new GitCopyrightAdapter(

+				new IResource[] { project });

+		adapter.initialize(NULL_MONITOR);

+		final int lastModifiedYear = adapter.getLastModifiedYear(file,

+				NULL_MONITOR);

+

+		assertEquals(0, lastModifiedYear);

+	}

+

+	private IProject createProject(String name) throws Exception {

+		final IProject project = ResourcesPlugin.getWorkspace().getRoot()

+				.getProject(name);

+		if (project.exists())

+			project.delete(true, null);

+		final IProjectDescription desc = ResourcesPlugin.getWorkspace()

+				.newProjectDescription(name);

+		desc.setLocation(new Path(new File(db.getWorkTree(), name).getPath()));

+		project.create(desc, null);

+		project.open(null);

+

+		final IFile file = project.getFile(FILE_NAME);

+		file.create(

+				new ByteArrayInputStream("Hello, world".getBytes(project

+						.getDefaultCharset())), false, null);

+		return project;

+	}

+

+	private void connect() throws CoreException {

+		new ConnectProviderOperation(project, gitDir).execute(null);

+	}

+

+	private Date getDateForYear(int year) throws ParseException {

+		final SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd");

+		return formatter.parse(Integer.toString(year) + "/6/30");

+	}

+

+}