Loading
#openttdcoop - Paste
Archives
Trending
Docs
Login
ABAP
ActionScript
ActionScript 3
Ada
AIMMS3
ALGOL 68
Apache configuration
AppleScript
Apt sources
ARM ASSEMBLER
ASM
ASP
asymptote
Autoconf
Autohotkey
AutoIt
AviSynth
awk
BASCOM AVR
Bash
Basic4GL
BibTeX
BlitzBasic
bnf
Boo
Brainfuck
C
C#
C (LoadRunner)
C (Mac)
C (WinAPI)
C++
C++ (Qt)
C++ (WinAPI)
CAD DCL
CAD Lisp
CFDG
ChaiScript
Chapel
CIL
Clojure
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
Dart
DCL
DCPU-16 Assembly
DCS
Delphi
Diff
DIV
DOS
dot
E
ECMAScript
Eiffel
eMail (mbox)
EPC
Erlang
Euphoria
EZT
F#
Falcon
FO (abas-ERP)
Formula One
Fortran
FreeBasic
FreeSWITCH
GADV 4CS
GAMBAS
GDB
genero
Genie
glSlang
GML
GNU/Octave
GNU Gettext
GNU make
Gnuplot
Go
Groovy
GwBasic
Haskell
Haxe
HicEst
HQ9+
HTML
HTML5
Icon
INI
Inno
INTERCAL
Io
ISPF Panel
J
Java
Java(TM) 2 Platform Standard Edition 5.0
Javascript
JCL
jQuery
KiXtart
KLone C
KLone C++
LaTeX
LDIF
Liberty BASIC
Lisp
LLVM Intermediate Representation
Locomotive Basic
Logtalk
LOLcode
Lotus Notes @Formulas
LotusScript
LScript
LSL2
Lua
MagikSF
MapBasic
Matlab M
Microchip Assembler
Microsoft Registry
mIRC Scripting
MMIX
Modula-2
Modula-3
MOS 6502 (6510) ACME Cross Assembler format
MOS 6502 (6510) Kick Assembler format
MOS 6502 (6510) TASM/64TASS 1.46 Assembler format
Motorola 68000 - HiSoft Devpac ST 2 Assembler format
Motorola 68000 Assembler
MXML
MySQL
Nagios
NetRexx
newlisp
nginx
Nimrod
NML NewGRF Meta Language
NSIS
Oberon-2
Objeck Programming Language
Objective-C
OCaml
OCaml (brief)
ooRexx
OpenBSD Packet Filter
OpenOffice.org Basic
Oracle 8 SQL
Oracle 11 SQL
Oxygene
OZ
ParaSail
PARI/GP
Pascal
PCRE
per
Perl
Perl 6
PHP
PHP (brief)
PIC16
Pike
Pixel Bender 1.0
PL/I
PL/SQL
PostgreSQL
PostScript
POVRAY
PowerBuilder
PowerShell
ProFTPd configuration
Progress
Prolog
PROPERTIES
ProvideX
Puppet
PureBasic
Python
Python for S60
q/kdb+
QBasic/QuickBASIC
QML
R / S+
Racket
Rails
RBScript
REBOL
rexx
robots.txt
RPM Specification File
Ruby
Rust
SAS
Scala
Scheme
SciLab
SCL
sdlBasic
Smalltalk
Smarty
SPARK
SPARQL
SQL
Squirrel Script
Squirrel Script with OpenTTD AI/GS
StandardML
StoneScript
SystemVerilog
T-SQL
TCL
Tera Term Macro
Text
thinBasic
TypoScript
Unicon (Unified Extended Dialect of Icon)
Uno Idl
Unreal Script
UPC
Urbi
Vala
vb.net
VBScript
Vedit macro language
Verilog
VHDL
Vim Script
Visual Basic
Visual Fox Pro
Visual Prolog
Whitespace
Whois (RPSL format)
Winbatch
X++
XBasic
XML
Xorg configuration
YAML
ZiLOG Z80 Assembler
ZXBasic
planetmaker@openttd$ cat update-others.sh #!/bin/sh # Update both git and mercurial, by checking where the commit was, and updating those repos REV=$1 cd /var/repos/scripts changed=`./detect-branch-changed.sh $REV` for i in $changed; do ./safe-svn-to-others.sh "$i" done planetmaker@openttd$ cat safe-svn-to-others.sh #!/bin/sh flock --exclusive --nonblock svn-to-others.lock -c "./svn-to-others.sh \"$1\"" || touch svn-to-others.rerun planetmaker@openttd$ cat svn-to-others.sh #!/bin/sh if [ `whoami` = "root" ]; then echo "Please only execute this script under 'www-data' user" exit 1 fi rm -f svn-to-others.rerun umask 007 SVN_REPOS=file:///path/to/svn-repo # converted svn repositories CONVERT_DIR=/path/to/scripts/convert_storage HG_REPOS=/path/to/hg-repos GIT_REPOS=/path/to/git-repos HG=/usr/bin/hg GIT=/usr/bin/git process_only=$1 cd $CONVERT_DIR function convert { name=$1 dir=$2 repos_name=$3 if [ -n "$process_only" ] && [ "$dir$name" != "$process_only" ]; then return fi cd $CONVERT_DIR mkdir -p hg cd hg if [ -n "$dir" ]; then mkdir -p $dir cd $dir fi # Load HG from SVN, and GIT from HG $HG --encoding UTF8 convert --datesort --config convert.svn.branches= --config convert.svn.tags= --config convert.svn.trunk= $SVN_REPOS/$dir$name $repos_name.hg cd $repos_name.hg # Set description echo "[web] description=OpenTTD SVN - $dir$repos_name contact=OpenTTD allow_archive = bz2 gz zip allowpull = true style = gitweb " > .hg/hgrc # Set the 'last change' date of 'hgweb' correct date=`hg tip | grep date: | cut -b 14- | sed 's/ +0000//'` touch -d "$date" .hg/store/00changelog.i cd $CONVERT_DIR mkdir -p git cd git if [ -n "$dir" ]; then mkdir -p $dir cd $dir fi if [ ! -d "$repos_name.git" ]; then mkdir $repos_name.git cd $repos_name.git $GIT svn init --no-metadata $SVN_REPOS/$dir$name $GIT config core.sharedRepository group $GIT config gitweb.owner "OpenTTD" $GIT svn fetch --no-follow-parent $GIT update-ref refs/heads/master git-svn $GIT checkout -f master else cd $repos_name.git $GIT svn fetch $GIT reset -q --hard git-svn fi echo "OpenTTD SVN - $dir$repos_name" > .git/description cd .. # Link to our repos dirs if [ ! -d "$HG_REPOS/$dir$repos_name.hg" ]; then mkdir -p $HG_REPOS/$dir$repos_name.hg ln -s $CONVERT_DIR/hg/$dir$repos_name.hg/.hg $HG_REPOS/$dir$repos_name.hg/.hg fi if [ ! -L "$GIT_REPOS/$dir$repos_name.git" ]; then mkdir -p $GIT_REPOS/$repos_dir ln -s $CONVERT_DIR/git/$dir$repos_name.git/.git $GIT_REPOS/$dir$repos_name.git fi if [ "$dir$name" = "trunk" ]; then if [ ! -d "$CONVERT_DIR/github" ]; then cd $CONVERT_DIR/ $GIT clone $GIT_REPOS/trunk.git github cd github $GIT remote add github git@github.com:OpenTTD/OpenTTD.git fi cd $CONVERT_DIR/github $GIT pull origin $GIT push github master fi } convert "trunk" "" "trunk" for svndir in branches extra; do for i in `svn ls $SVN_REPOS/$svndir/ | cut -d/ -f1`; do convert "$i" "$svndir/" "$i" done done if [ -f "svn-to-others.rerun" ]; then sh $0 fi
Mark as private
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
forever