I'm trying out versioncontrol_git and I'm getting the following error when trying to fetch data from a repository:
Fatal error: require_once() [function.require]: Failed opening required './profiles/openatrium/modules/contrib/ctools/includes/plugins.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /profiles/openatrium/modules/contrib/ctools/ctools.module on line 109
This is due to a chdir() call:
*/
function _versioncontrol_git_log_update_repository(&$repository) {
$root = escapeshellcmd($repository->root);
$chdir_ok = @chdir($root); // Set working directory to root.
if ($chdir_ok === FALSE) {
return FALSE;
}
I was able to work around this by setting the include path and removing the './' from the ctools include, but there has to be a better way... :)
Comments
Comment #1
mgriego commentedI ran into this same problem and have coded the attached patch to fix this. It changes the way the git calls work to use the --git-dir option to the git command instead of doing a chdir() to the repository.
Comment #2
mgriego commentedComment #3
mgriego commentedComment #4
mgriego commentedRe-attaching patch with proper status and naming convention.
Comment #5
CorniI commentedHi,
thanks for your work, but unfortunately the log parser of vcs_git has undergone a rewrite in #714228: Cleanup and refactor of versioncontrol_git, where this patch doesn't apply anymore. Could you reroll it against the branch oop-refactored in this repository: http://github.com/CorniI/versioncontrol_git/tree/oop-refactored ?
Comment #6
mgriego commentedYes, I'll see about rerolling that today.
Comment #7
mgriego commentedHere's an updated version of the patch against the oop-refactored branch. This one also includes a small patch to the xgit scripts so that they don't chdir() back into the original working directory until after processing is complete.
Comment #8
mgriego commentedAny update on this? I notice that the refactoring is continuing ahead of the coming drupal.org migration...
Comment #9
CorniI commentedI have to admit that i totally forgot about this patch, sorry.
But at least committing it requires #714228: Cleanup and refactor of versioncontrol_git to be in, which needs to be reviewed by sdboyer...
Comment #10
marvil07 commentedMost of this was fixed at a sdboyer commit on june, but I still see it at xgit, so changing status accordingly and linking from #484366: Create serverside git hooks to get attention on the work at xgit.
Comment #11
eliza411 commentedTagging Git Sprint 8
Comment #12
sdboyer commentedComment #13
sdboyer commentedUnassigning from me
Comment #14
marvil07 commentedNot ready before hard code-freeze, so postponed after launch.
Comment #15
marvil07 commentedSince the only call to fix here is on #484366: Create serverside git hooks and that issue will change the code there, I am duplicating this one.