$git_versions = $this->removeVersionsNotIn($git_versions, $from); $this->log(sprintf("Total versions: %d\n", count($git_versions))); $this->log('Getting versions without Git tags'); $versions = $this->diffVersions($svn_versions, $git_versions); $this->log(sprintf("Total versions: %d\n", count($versions))); foreach ($versions as $version) { if (!$version[3] || $this->isExcluded($version[3], $stringsToExclude) === false) { $this->log(sprintf('Mirroring %s', $this->getGitTagFromVersion($version))); $this->mirrorVersion($version); } } $this->log("Sync edge\n"); $this->run('git branch edge'); $this->run('git checkout edge'); $this->run(sprintf("svn switch %s/branches/%s", $this->svn_url, $this->trunk_branch)); $this->run('git add .'); $this->run(sprintf("git commit -am 'edge update'")); $this->run('git checkout master'); } public function push($remote = 'origin') { $this->log('Push'); $this->run('git push ' . $remote . ' master'); $this->run('git push ' . $remote . ' edge'); $this->run('git push ' . $remote . ' master --tags'); } } $mirror = new gitMirror('http://svn.symfony-project.com', '1.4', $argv[1]); $mirror->sync(array(1, 3, 0), array('RC', 'BETA', 'ALPHA')); $mirror->push('github');
$git_versions = $this->removeVersionsNotIn($git_versions, $from); $this->log(sprintf("Total versions: %d\n", count($git_versions))); $this->log('Getting versions without Git tags'); $versions = $this->diffVersions($svn_versions, $git_versions); $this->log(sprintf("Total versions: %d\n", count($versions))); foreach ($versions as $version) { if (!$version[3] || $this->isExcluded($version[3], $stringsToExclude) === false) { $this->log(sprintf('Mirroring %s', $this->getGitTagFromVersion($version))); $this->mirrorVersion($version); } } $this->log("Sync edge\n"); $this->run('git branch edge'); $this->run('git checkout edge'); $this->run(sprintf("svn switch %s/branches/%s", $this->svn_url, $this->trunk_branch)); $this->run('git add .'); $this->run(sprintf("git commit -am 'edge update'")); $this->run('git checkout master'); } public function push($remote = 'origin') { $this->log('Push'); $this->run('git push ' . $remote . ' master'); $this->run('git push ' . $remote . ' edge'); $this->run('git push ' . $remote . ' master --tags'); } } $mirror = new gitMirror('http://svn.symfony-project.com', '1.4', $argv[1]); $mirror->sync(array(1, 3, 0), array('RC', 'BETA', 'ALPHA')); $mirror->push();