stable

Clone or download

Read-only

Import cmmtXXXX git references

This task is part of story #9027 Preserve links at import Install the plugin, then xml import a project with a git repository that contains references. Ex: <?xml version="1.0" encoding="UTF-8"?> <project unix-name="project42" full-name="Project 42" description="Secret project to find the answer" access="public"> <long-description> This is the long description of project 42 </long-description> <services> <service shortname="plugin_git" enabled="true" /> </services> <git> <repository name="MyRepository" bundle-path="git.bundle"> <references> <reference source="cmmt1234" target="2c72aca709a3df41212883902b255868eb24e9cd" /> </references> </repository> </git> </project> If the git.bundle contains the commit 2c72ac…, then when you create a comment in a changeset with the following body: See cmmt1234 or cmmt1235 for details. Then you can click on cmmt1234 and you are redirected to the commit in the git repository MyRepository. You cannot click on cmmt1235 as it is unknown. If the target commit does not exist, then the link is still extracted bc the git commits are only managed by git server and Tuleap does not know if it exists or not. User will get an error page (beautifully rendered by gitphp :/). We assume that the cmmtXXXX references are unique between git and svn services (they share the same pattern). If it is not the case (a reference cmmtXXX target both svn revision and git commit), then the reference is still imported for both services however only one service will handle the link. The format of import should be changed in the user documentation after the merge since we now use: <repository …> <permissions> <read>… <write>… <wplus>… </permissions> </repository> instead of: <repository …> <read>… <write>… <wplus>… </repository> Please note that both format can still be imported, you won't be able to import references with legacy format though. Change-Id: Ib0c310c4a1ec67cdbaaa2a51c9b5330e1368a231

Modified Files

Name
M plugins/git/include/GitXmlImporter.class.php +67 −9 Go to diff View file
M plugins/git/include/gitPlugin.class.php +4 −1 Go to diff View file
M plugins/git/tests/GitXmlImporterTest.php +54 −1 Go to diff View file
A plugins/teamforge_compat_git/ChangeLog +0 −0 Go to diff View file
A plugins/teamforge_compat_git/README.mkd +5 −0 Go to diff View file
A plugins/teamforge_compat_git/VERSION +1 −0 Go to diff View file
A plugins/teamforge_compat_git/db/install.sql +5 −0 Go to diff View file
A plugins/teamforge_compat_git/db/uninstall.sql +1 −0 Go to diff View file
A plugins/teamforge_compat_git/include/TeamforgeCompatGit/Plugin/PluginDescriptor.php +36 −0 Go to diff View file
A plugins/teamforge_compat_git/include/TeamforgeCompatGit/Plugin/PluginInfo.php +32 −0 Go to diff View file
A plugins/teamforge_compat_git/include/TeamforgeCompatGit/Reference.php +51 −0 Go to diff View file
A plugins/teamforge_compat_git/include/TeamforgeCompatGit/ReferencesImporter.php +79 −0 Go to diff View file
A plugins/teamforge_compat_git/include/TeamforgeCompatGit/TeamforgeCompatDao.php +51 −0 Go to diff View file
A plugins/teamforge_compat_git/include/TeamforgeCompatGit/TeamforgeReferencesBuilder.php +132 −0 Go to diff View file
A plugins/teamforge_compat_git/include/autoload.php +24 −0 Go to diff View file
A plugins/teamforge_compat_git/include/constants.php +21 −0 Go to diff View file
A plugins/teamforge_compat_git/include/teamforge_compat_gitPlugin.class.php +108 −0 Go to diff View file
A plugins/teamforge_compat_git/site-content/en_US/teamforge_compat_git.tab +2 −0 Go to diff View file
A plugins/teamforge_compat_git/site-content/fr_FR/teamforge_compat_git.tab +2 −0 Go to diff View file
A plugins/teamforge_compat_git/tests/TeamforgeReferencesImporterTest.php +71 −0 Go to diff View file
A plugins/teamforge_compat_git/tests/bootstrap.php +23 −0 Go to diff View file
M src/common/xml/resources/git-definition.rnc +19 −3 Go to diff View file
M src/common/xml/resources/project/git-definition.rng +68 −24 Go to diff View file
M src/common/xml/resources/project/tracker-definition.rng +10 −0 Go to diff View file
M tools/rpm/Makefile +2 −0 Go to diff View file
M tools/rpm/tuleap.rhel6.spec +2 −0 Go to diff View file
M tools/rpm/tuleap.spec +2 −0 Go to diff View file