Skip to content
James Nylen edited this page Feb 18, 2017 · 4 revisions

Welcome to the wordpress-develop-svn wiki!

Travis

I created this repository in February 2017 when several of the official or semi-official git mirrors (develop.git, WordPress/wordpress-develop, aaronjorbin/develop.wordpress for example) were temporarily broken. The official git repos are usually up to date with https://core.trac.wordpress.org/log/ in which case you should look at one of them instead.

OK but what is this anyway

Here are the steps I used to initialize it:

git svn clone https://develop.svn.wordpress.org/trunk/ wordpress-develop-svn # this takes a couple of hours
git remote add origin [email protected]:nylen/wordpress-develop-svn.git
git push origin master

Next I set up Travis by enabling the repository in their web dashboard.

Finally here is the cron job running every minute on my server:

#!/bin/sh

set -e # exit on error

(
	if ! flock -n 9; then
		echo "Failed to acquire lock" >&2
		exit 1
	fi

	cd /home/james/code/wordpress-develop-svn/

	git svn rebase > /dev/null
	git push origin master --quiet

	# This updates the description of this repository
	node /home/james/code/wp-mirror-status/bin/wp-mirror-status.js
) 9> /tmp/update-wordpress-develop-svn.lock

This is pretty close to the bare minimum that is at all useful for development. Possible future enhancements:

  • Make sure the git repo is on the master branch pointing to the same place as .git/refs/remotes/git-svn - otherwise the automated push would probably break.
  • Correctly load SVN branches and tags into GitHub. Here are some likely useful tips and links. May require rewriting the commit history depending on how this is done.
  • Try to map WP.org usernames to email addresses, and use this to populate Git author/committer with better information. I do not know how this used to work, but it will definitely require rewriting the commit history.
  • Travis hooks.
Clone this wiki locally