stable
Clone or download
feat(git): Close request #36842 Git XML export and import must deal with default branch
Given a Tuleap Git repository exported in XML, then the default branch information must be exported. This information must also be imported. We fallback to main or master for legacy import with this information. How to test ----------- * Export a Tuleap project with some Git repositories => The exported Git content must contain the default branch information. * Import this newly exported project => Imported Git repositories must retrieve their default branches. * Import a Git repository exported before this patch or without the default branch information => The imported Git repository must have either main or master set as default branch if available, first found branch instead. * Import an empty Git repository => Ne default branch is set Change-Id: Ic62143a883b66481207ba1644dd4bc4b880b3c5c
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/git/include/DefaultBranch/DefaultBranchRetriever.php | +48 | −0 | Go to diff View file |
A | plugins/git/include/DefaultBranch/RetrieveRepositoryDefaultBranch.php | +37 | −0 | Go to diff View file |
M | plugins/git/include/GitXMLExporter.php | +25 | −11 | Go to diff View file |
A | plugins/git/include/GitXMLImportDefaultBranchRetriever.php | +55 | −0 | Go to diff View file |
M | plugins/git/include/GitXmlImporter.class.php | +36 | −16 | Go to diff View file |
A | plugins/git/include/RetrieveGitDefaultBranchInXMLImport.php | +29 | −0 | Go to diff View file |
M | plugins/git/include/gitPlugin.php | +5 | −0 | Go to diff View file |
M | plugins/git/tests/integration/GitXmlImporterTest.php | +3 | −0 | Go to diff View file |
M | plugins/git/tests/unit/GitXMLExporterTest.php | +57 | −28 | Go to diff View file |
A | plugins/git/tests/unit/GitXMLImportDefaultBranchRetrieverTest.php | +163 | −0 | Go to diff View file |
M | src/common/xml/resources/git-definition.rnc | +1 | −0 | Go to diff View file |
M | src/common/xml/resources/project/git-definition.rng | +5 | −0 | Go to diff View file |
M | src/common/xml/resources/project/project.rng | +5 | −0 | Go to diff View file |