Indefero

Indefero Commit Details


Date:2009-01-26 10:58:58 (16 years 2 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:f203f7d78f6a1fa2abdf5ca7a12f302a0b64e131
Parents: c11cd7bc6260ad5da6f6070be1608b1f172a784a
Message:Fixed bad help message for the git access.

Git has 2 methods to access a repository, one with gitdaemon to do a
checkout and one with SSH to perform the push. We need to provide those
2 methods.
Changes:

File differences

src/IDF/Project.php
363363
364364
365365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
366382
367383
368384
    }
    /**
     * Get the remote write access url to the repository.
     *
     * Some SCM have a remote access URL to write which is not the
     * same as the one to read. For example, you do a checkout with
     * git-daemon and push with SSH.
     */
    public function getWriteRemoteAccessUrl()
    {
        $conf = $this->getConf();
        $scm = $conf->getVal('scm', 'git');
        $scms = Pluf::f('allowed_scm');
        return call_user_func(array($scms[$scm], 'getWriteRemoteAccessUrl'),
                              $this);
    }
    /**
     * Get the root name of the project scm
     *
     * @return string SCM root
src/IDF/Scm/Git.php
6767
6868
6969
70
71
72
73
74
75
76
77
78
79
80
7081
7182
7283
    }
    /**
     * Returns the URL for SSH access
     *
     * @param IDF_Project
     * @return string URL
     */
    public static function getWriteRemoteAccessUrl($project)
    {
        return sprintf(Pluf::f('git_write_remote_url'), $project->shortname);
    }
    /**
     * Returns this object correctly initialized for the project.
     *
     * @param IDF_Project
src/IDF/conf/idf.php-dist
6161
6262
6363
64
6465
6566
6667
# tree view.
#
$cfg['git_remote_url'] = 'git://localhost/%s.git';
$cfg['git_write_remote_url'] = 'git@localhost:%s.git';
# Same as for git, you can have multiple repositories, one for each
# project or a single one for all the projects.
src/IDF/templates/idf/source/git/help.html
2222
2323
2424
25
25
2626
2727
2828
git init
git add .
git commit -m "initial import"
git remote add origin {$project.getRemoteAccessUrl()}
git remote add origin {$project.getWriteRemoteAccessUrl()}
git push origin master
</pre>

Archive Download the corresponding diff file

Page rendered in 0.21396s using 13 queries.