Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weixindut committed Jun 14, 2013
2 parents 1107a17 + 278144c commit 264c051
Show file tree
Hide file tree
Showing 24 changed files with 1,466 additions and 176 deletions.
86 changes: 76 additions & 10 deletions mixxx/build/mixxx.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import sys
import os
import re
import shutil

import SCons
from SCons import Script
Expand Down Expand Up @@ -194,6 +195,7 @@ def __init__(self, target, machine, build, toolchain, available_features=[]):
self.env.Append(LIBPATH=os.path.join(crosscompile_root, 'bin'))

self.install_options()
self.virtualize_build_dir()

def detect_platform(self):
if os.name == 'nt' or sys.platform == 'win32':
Expand Down Expand Up @@ -233,22 +235,17 @@ def read_environment_variables(self):
self.env['LIBS'] = []
self.env['LIBPATH'] = []

def install_options(self):
def get_cache_dir(self):
# Global cache directory Put all project files in it so a rm -rf cache
# will clean up the config
if not self.env.has_key('CACHEDIR'):
self.env['CACHEDIR'] = str(Script.Dir('#cache/'))
if not os.path.isdir(self.env['CACHEDIR']):
os.mkdir(self.env['CACHEDIR'])
return str(self.env['CACHEDIR'])

cachefile = os.path.join(str(self.env['CACHEDIR']), 'custom.py')

## Avoid spreading .sconsign files everywhere
#env.SConsignFile(env['CACHEDIR']+'/scons_signatures')
## WARNING - We found that the above line causes SCons to randomly not find
## dependencies for some reason. It might not happen right away, but
## a good number of users found that it caused weird problems - Albert (May 15/08)

def install_options(self):
cachefile = os.path.join(self.get_cache_dir(), 'custom.py')
vars = Script.Variables(cachefile)
vars.Add('prefix', 'Set to your install prefix', '/usr/local')
vars.Add('qtdir', 'Set to your QT4 directory', '/usr/share/qt4')
Expand All @@ -275,8 +272,77 @@ def install_options(self):
#Save the options to cache
vars.Save(cachefile, self.env)

def virtualize_build_dir(self):
# Symlinks don't work on Windows.
if self.host_platform == 'windows':
return

branch_name = util.get_branch_name()
if not branch_name:
return
# TODO(rryan) what other branch name characters aren't allowed in
# filenames?
branch_name = re.sub('[/<>|"]', '_', branch_name).lower()

branch_build_dir = os.path.join(self.get_cache_dir(), branch_name)

# Write sconsign.dblite files to branch_build_dir so that the file
# signatures are kept separate across branches.
sconsign_file = os.path.join(branch_build_dir, 'sconsign.dblite')
self.env.SConsignFile(sconsign_file)

try:
print "os.makedirs", branch_build_dir
os.makedirs(branch_build_dir)
except:
# os.makedirs throws an exception if branch_build_dir already
# exists.
pass
virtual_build_dir = os.path.join(branch_build_dir, self.build_dir)

# If build_dir is a symlink, check that it points to virtual_build_dir.
if os.path.islink(self.build_dir):
# Make sure virtual_build_dir exists. This happens if we are
# building for a new branch.
try:
print "os.makedirs", virtual_build_dir
os.makedirs(virtual_build_dir)
except:
# os.makedirs throws an exception if branch_build_dir already
# exists.
pass

# Get the path build_dir points to.
build_dir_path = os.readlink(self.build_dir)

# If it does not point to virtual_build_dir then unlink and link it
# to virtual_build_dir.
if os.path.abspath(build_dir_path) != os.path.abspath(virtual_build_dir):
print "os.unlink", self.build_dir
os.unlink(self.build_dir)
print "os.symlink", virtual_build_dir, self.build_dir
os.symlink(virtual_build_dir, self.build_dir)
elif os.path.isdir(self.build_dir):
# If build_dir is a directory, move it to virtual_build_dir.
print "shutil.move", self.build_dir, branch_build_dir
shutil.move(self.build_dir, branch_build_dir)
print "os.symlink", virtual_build_dir, self.build_dir
os.symlink(virtual_build_dir, self.build_dir)
else:
# Make sure virtual_build_dir exists. This happens if we are
# building for a new branch.
try:
print "os.makedirs", virtual_build_dir
os.makedirs(virtual_build_dir)
except:
# os.makedirs throws an exception if branch_build_dir already
# exists.
pass
print "os.symlink", virtual_build_dir, self.build_dir
os.symlink(virtual_build_dir, self.build_dir)

def get_features(self):
return self.available_features\
return self.available_features

class Dependence(object):

Expand Down
108 changes: 108 additions & 0 deletions mixxx/scripts/lp_to_github/AuthorCleanup.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
Aaron Mavrinac <mavrinac@gmail.com>,Aaron Mavrinac <mavrinac@gmail.com>
adam_d,Adam Davison <adamd@mixxx.org>
Adam Davison <adamdavison@gmail.com>,Adam Davison <adamd@mixxx.org>
Akash Shetye <shetyeakash@gmail.com>,Akash Shetye <shetyeakash@gmail.com>
alb <alb@mixxx-builder>,Albert Santoni <alberts@mixxx.org>
Albert <alb@mixxx-ubuntu810-32>,Albert Santoni <alberts@mixxx.org>
Albert Santoni <alberts@mixxx.org>,Albert Santoni <alberts@mixxx.org>
Albert Santoni alberts@mixxx.org <>,Albert Santoni <alberts@mixxx.org>
Albert Santoni <alb@jupiter.home>,Albert Santoni <alberts@mixxx.org>
Albert Santoni <alb@w052-215.wireless.uvic.ca>,Albert Santoni <alberts@mixxx.org>
Albert Santoni <alb@w143-126.wireless.uvic.ca>,Albert Santoni <alberts@mixxx.org>
Albert Santoni <asantoni@atrius>,Albert Santoni <alberts@mixxx.org>
Alex Barker <alex@1stleg.com>,Alex Barker <alex@1stleg.com>
Anders Gunnarsson <d00guan@gmail.com>,Anders Gunnarsson <d00guan@gmail.com>
Bill Good <bkgood@gmail.com>,Bill Good <bkgood@mixxx.org>
Box <Box@Box-PC>,Albert Santoni <alberts@mixxx.org>
ctaf,Cedric GESTES <ctaf42@gmail.com>
Daniel Lindenfelser <daniel@lindenfelser.de>,Daniel Lindenfelser <daniel@lindenfelser.de>
Daniel Schürmann <daschuer@gmx.de>,Daniel Schürmann <daschuer@mixxx.org>
Daniel Schürmann <daschuer@gmx.de>,Daniel Schürmann <daschuer@mixxx.org>
emaix,Pawel Bartkiewicz <tuuresairon@gmail.com>
eythian,Robin Sheat <robin@kallisti.net.nz>
gamegod,Albert Santoni <alberts@mixxx.org>
Garth Dahlstrom <ged@eeepc901>,Garth Dahlstrom <garth@mixxx.org>
Garth Dahlstrom <ged@garth-dahlstroms-macbook.local>,Garth Dahlstrom <garth@mixxx.org>
Garth Dahlstrom <ged@gmacbook>,Garth Dahlstrom <garth@mixxx.org>
Garth Dahlstrom <ged@gMacBook>,Garth Dahlstrom <garth@mixxx.org>
Garth Dahlstrom <ged@gMacBook.local>,Garth Dahlstrom <garth@mixxx.org>
Garth Dahlstrom <ged@quadcore>,Garth Dahlstrom <garth@mixxx.org>
ged <ged@eeepc-901>,Garth Dahlstrom <garth@mixxx.org>
Graeme Mathieson <mathieg2@mathieg2-sony32>,Graeme Mathieson <graeme@salsaholics.org>
ikdev,Ingo Kossyk <kossyki@cs.tu-berlin.de>
Ilkka Tuohela <hile@iki.fi>,Ilkka Tuohela <hile@iki.fi>
ironstorm,Garth Dahlstrom <garth@mixxx.org>
jammin23,Ben Wheeler <ben@qolc.net>
jayorama,Gianluca Romanin <romaninz@aruba.it>
jonathan,Jonathan Costers <jonathan.costers@googlemail.com>
Juan Pedro Bolívar Puente <raskolnikov@es.gnu.org>,Juan Pedro Bolívar Puente <raskolnikov@es.gnu.org>
jus <>,jus <s.brandt@mixxx.org>
jus <https>,jus <s.brandt@mixxx.org>
jus <https://launchpad.net/~jus>,jus <s.brandt@mixxx.org>
jus <jus@justmail.de>,jus <s.brandt@mixxx.org>
jus <jus@local>,jus <s.brandt@mixxx.org>
jus <jus@mbp>,jus <s.brandt@mixxx.org>
jus <s.brandt@mixxx.org>,jus <s.brandt@mixxx.org>
jus@ubuntu,jus <s.brandt@mixxx.org>
JWC <jwc@jwcxz.com>,JWC <jwc@jwcxz.com>
kenand,Ken Haste Andersen <ken@haste.dk>
kousu,Nick Guenther <nick@kousu.ca>
kousu <kousu@splat>,Nick Guenther <nick@kousu.ca>
Launchpad Translations on behalf of mixxxdevelopers,Launchpad Translations <rosetta@launchpad.net>
madjester <madjester@voidwalker>,Phillip Whelan <pwhelan@mixxx.org>
Maxime Bochon <maxime.bochon@gmail.com>,Maxime Bochon <maxime.bochon@gmail.com>
Max Linke <kain88@640X4>,Max Linke <kain88@mixxx.org>
Max Linke <kain88@640X4.kel.wh.lokal>,Max Linke <kain88@mixxx.org>
Max Linke <kain88@mixxx.org>,Max Linke <kain88@mixxx.org>
Max Linke <kain88@Thinki>,Max Linke <kain88@mixxx.org>
Mika Haulo <mika@haulo.fi>,Mika Haulo <mika@haulo.fi>
Miko Kiiski <mikoki@mikoki-laptop>,Miko Kiiski <miko.kiiski@gmail.com>
nategoofs,Nathan Prado <prado.nathan@gmail.com>
Neale Pickett <neale@woozle.org>,Neale Pickett <neale@woozle.org>
Nick Guenther <kousu@guarana.csclub.uwaterloo.ca>,Nick Guenther <nick@kousu.ca>
Nick <nick _a_t_ k o u s u dot CA>,Nick Guenther <nick@kousu.ca>
Nick <nick_a_t_kousudotCA>,Nick Guenther <nick@kousu.ca>
Nick <nick@kousu.ca>,Nick Guenther <nick@kousu.ca>
Owen Williams <owen@ywwg>,Owen Williams <owilliams@mixxx.org>
Owen Williams <owen@ywwg.com>,Owen Williams <owilliams@mixxx.org>
Owen Williams <owilliams@localhost>,Owen Williams <owilliams@mixxx.org>
Owen Williams <owilliams@mixxx.org>,Owen Williams <owilliams@mixxx.org>
Owen Williams <owen-github@ywwg.com>,Owen Williams <owilliams@mixxx.org>
pegasusrpg,Sean M. Pappalardo <spappalardo@mixxx.org>
petemix,Peter Chang <Peter.Chang@nottingham.ac.uk>
Phillip Whelan <madjester@voidwalker>,Phillip Whelan <pwhelan@mixxx.org>
Phillip Whelan <pwhelan@mixxx.org>,Phillip Whelan <pwhelan@mixxx.org>
Philllip Whelan <madjester@madjester-netbook>,Phillip Whelan <pwhelan@mixxx.org>
psyc0de,Tom Care <psyc0de@corrodedreality.org>
Qifan Xi <khyew@khyew.com>,Qifan Xi <khyew@khyew.com>
raffitea,Tobias Rafreider <trafreider@mixxx.org>
Raffitea,Tobias Rafreider <trafreider@mixxx.org>
RaffiTea <>,Tobias Rafreider <trafreider@mixxx.org>
RJ Ryan <rryan@mit.edu>,RJ Ryan <rryan@mixxx.org>
RJ Ryan <rryan@mixxx.org>,RJ Ryan <rryan@mixxx.org>
rryan,RJ Ryan <rryan@mixxx.org>
Russell Ryan <rryan@atrius>,RJ Ryan <rryan@mixxx.org>
Russell Ryan <rryan@free-radical>,RJ Ryan <rryan@mixxx.org>
Ryan Baker <ryanbaker@MacBookPro.local>,Ryan Baker <bakerry@onid.orst.edu>
Sean M. Pappalardo <pegasus@8440p>,Sean M. Pappalardo <spappalardo@mixxx.org>
Sean M. Pappalardo <pegasus@NikkiNetbook>,Sean M. Pappalardo <spappalardo@mixxx.org>
Sean M. Pappalardo <pegasus@presariolaptop>,Sean M. Pappalardo <spappalardo@mixxx.org>
Sean M. Pappalardo <pegasus@renegadetech.com>,Sean M. Pappalardo <spappalardo@mixxx.org>
Sean M. Pappalardo <spappalardo@mixxx.org>,Sean M. Pappalardo <spappalardo@mixxx.org>
snipexv,Micah Lee <snipexv@gmail.com>
Stefan Nuernberger <kabelfrickler@googlemail.com>,Stefan Nuernberger <kabelfrickler@googlemail.com>
sveinmb,Svein Magne Bang <sveinmb@stud.ntnu.no>
System Administrator <root@MacBookPro.local>,Ryan Baker <bakerry@onid.orst.edu>
Tobias Rafreider <tobias@tobias-laptop>,Tobias Rafreider <trafreider@mixxx.org>
Tobias <Tobias@Mixxx>,Tobias Rafreider <trafreider@mixxx.org>
Tobias <Tobias@Silverstar>,Tobias Rafreider <trafreider@mixxx.org>
Tom Mast thomasomast@gmail.com,Tom Mast <thomasomast@gmail.com>
tuehaste,Tue Haste Andersen <tue@haste.dk>
uid77225,Tue Haste Andersen <tue@haste.dk>
uklotzde,Uwe Klotz <uwe_klotz@web.de>
Vinícius Dias dos Santos <vininim@gmail.com>,Vinícius Dias dos Santos <vininim@gmail.com>
Vittorio <l0rdt@gmx.it>,Vittorio <l0rdt@gmx.it>
vrince <vrince@gmail.com>,vrince <vrince@gmail.com>
wesleyprofox,Wesley Stessens <wesley@ubuntu.com>
who8877,John Sully <jsully@scs.ryerson.ca>
zestoi@djism.com,zestoi <zestoi@djism.com>
23 changes: 23 additions & 0 deletions mixxx/scripts/lp_to_github/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
These scripts are in raw form and need to be edited to work on anyone's machine
but my own. But they are here so if someone else needs to move branches
from launchpad to github, it can be done.

The migrate script expects that branches are already set up. To migrate a new
branch, do this:

1. clone the mixxx github repository
2. run git bzr import lp:foo/bar bar-update
(use -update so that you can still have the branch named bar which will
be the one synced with github. That way it has the same name)
3. git checkout -b bar
4. git-filter-branch-command-all.sh
5. git branch -u origin/bar
6. git push

Now you have a git branch, bar, which is the rewritten version of the launchpad
branch. If you run the migrate script and specify "bar-update" and "bar", it
will pull the updates from bzr into the update branch, checkout a temporary
branch, rewrite that, then checkout the "bar" branch, then merge in the new
rewritten changes.

This actually works.
58 changes: 58 additions & 0 deletions mixxx/scripts/lp_to_github/community.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
git bzr import lp:~ulatekh/mixxx/mingw
git bzr import lp:~max-linke/mixxx/chromaprint
git bzr import lp:~ulatekh/mixxx/auto-dj-crates
git bzr import lp:~rryan/mixxx/atomic-co
git bzr import lp:~pasanen-tuukka/mixxx/ffmpeg-libav-fix
git bzr import lp:~pasanen-tuukka/mixxx/mixxx-ffmpeg-0.11
git bzr import lp:~max-linke/mixxx/qsettings
git bzr import lp:~daschuer/mixxx/daschuers_trunk
git bzr import lp:~ywwg/mixxx/master_sync
git bzr import lp:~r0w4nj/mixxx/rowanstrunk
git bzr import lp:~ywwg/mixxx/DJO-hacks-trunk
git bzr import lp:~troyan3/mixxx/mixxx_tr0
git bzr import lp:~uklotzde/mixxx/Vestax-VCI-300
git bzr import lp:~harshadura/mixxx/harshadura
git bzr import lp:~hustcalm/mixxx/non-blocking-database-access
git bzr import lp:~konarak/mixxx/fixes
git bzr import lp:~ywwg/mixxx/DJO-hacks-1.11
git bzr import lp:~oberling/mixxx/feature_first-beat-in-bar
git bzr import lp:~mixxxcontributors/mixxx/rmx2
git bzr import lp:~raul-emmanuel-gil/mixxx/trunk
git bzr import lp:~smstewart91/mixxx/advanced_autodj
git bzr import lp:~daschuer/mixxx/features_banshee
git bzr import lp:~kabelfrickler/mixxx/snu
git bzr import lp:~shanx-shashank/mixxx/effects_parametricEq
git bzr import lp:~ervanalb/mixxx/midi_clock_out
git bzr import lp:~daschuer/mixxx/features_ipod
git bzr import lp:~mkas/mixxx/mysql
git bzr import lp:~mattmik/mixxx/mic_modifications
git bzr import lp:~hile/mixxx/hacks
git bzr import lp:~max-linke/mixxx/experiments
git bzr import lp:~hile/mixxx/hotplug
git bzr import lp:~neale/mixxx/m4a
git bzr import lp:~neale/mixxx/neale
git bzr import lp:~hile/mixxx/dragdrop
git bzr import lp:~hile/mixxx/osxbuildfixes
git bzr import lp:~mattmik/mixxx/duckmic
git bzr import lp:~mr-unwell2006/mixxx/features_key_preferences
git bzr import lp:~hile/mixxx/mbpskins
git bzr import lp:~mr-unwell2006/mixxx/track_selector_feature
git bzr import lp:~ferranpujol/mixxx/test
git bzr import lp:~mr-unwell2006/mixxx/key_features
git bzr import lp:~keithsalisbury/mixxx/track_selector_feature
git bzr import lp:~mr-unwell2006/mixxx/features_vamp
git bzr import lp:~keithsalisbury/mixxx/features_key_preferences
git bzr import lp:~mutil/mixxx/librarycover
git bzr import lp:~raskolnikov/mixxx/mpd
git bzr import lp:~keithsalisbury/mixxx/mixxx
git bzr import lp:~keithsalisbury/mixxx/advanced_autodj
git bzr import lp:~vrince/mixxx/playground-circular-waveform
git bzr import lp:~raskolnikov/mixxx/round-bpm
git bzr import lp:~daschuer/mixxx/features_clementine
git bzr import lp:~rockstarartist/mixxx/mixxx0src0codetesting
git bzr import lp:~stefan-derkits-net/mixxx/mixxx
git bzr import lp:~tgascoigne/mixxx/tgascoigne_branch
git bzr import lp:~mr-unwell2006/mixxx/mixxx
git bzr import lp:~dan-lin/mixxx/features_qml
git bzr import lp:~dan-lin/mixxx/qml
git bzr import lp:~stonby/mixxx/midi_mapping_radius2000
71 changes: 71 additions & 0 deletions mixxx/scripts/lp_to_github/fix_mixxx_authors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/python

# double check with: git log --pretty=full |grep "^Author:" |sort |uniq

import os, sys

if len(sys.argv) < 2:
print "Need a csv filename with rewrite rules"
sys.exit(1)

print """#!/bin/bash
git filter-branch -f --env-filter '
if [ "$GIT_AUTHOR_NAME" = "" ] ; then
if [ "$GIT_AUTHOR_EMAIL" = "" ]; then
GIT_AUTHOR_NAME="unknown" ;
GIT_AUTHOR_EMAIL="unknown@unknown.com" ;
else
GIT_AUTHOR_NAME=$GIT_AUTHOR_EMAIL ;
fi ;
export GIT_AUTHOR_NAME ;
fi ;
if [ "$GIT_COMMITTER_NAME" = "" ] ; then
if [ "$GIT_COMMITTER_EMAIL" = "" ]; then
GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME;
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
else
GIT_COMMITTER_NAME=$GIT_COMMITTER_EMAIL;
fi;
export GIT_COMMITTER_NAME;
export GIT_COMMITTER_EMAIL;
fi;"""

def name_email(s):
if s.find('<') == -1:
return s.strip(),""
name = s.split('<')[0].strip()
email = s[s.find('<') + 1 : s.find('>')].strip()
return name,email

f = open(sys.argv[1])
for l in f.readlines():
before, after = l.split(',')[0:2]
if len(after.strip()) == 0:
continue
bad_name, bad_email = name_email(before)
new_name, new_email = name_email(after)
if len(bad_email.strip()) == 0:
print """if [ "$GIT_AUTHOR_NAME" = "%s" ]; then
GIT_AUTHOR_EMAIL="%s";
GIT_AUTHOR_NAME="%s";
fi;""" % (bad_name, new_email, new_name)
print """if [ "$GIT_COMMITTER_NAME" = "%s" ]; then
GIT_COMMITTER_EMAIL="%s";
GIT_COMMITTER_NAME="%s";
fi;""" % (bad_name, new_email, new_name)
else:
print """if [ "$GIT_AUTHOR_EMAIL" = "%s" ]; then
GIT_AUTHOR_EMAIL="%s";
GIT_AUTHOR_NAME="%s";
fi;""" % (bad_email, new_email, new_name)
print """if [ "$GIT_COMMITTER_EMAIL" = "%s" ]; then
GIT_COMMITTER_EMAIL="%s";
GIT_COMMITTER_NAME="%s";
fi;""" % (bad_email, new_email, new_name)

print """
export GIT_AUTHOR_NAME
export GIT_AUTHOR_EMAIL
export GIT_COMMITTER_NAME
export GIT_COMMITTER_EMAIL'
"""
Loading

0 comments on commit 264c051

Please sign in to comment.