diff --git a/distrib/autobuild.py b/distrib/autobuild.py index 06b341ea6f..187171384d 100755 --- a/distrib/autobuild.py +++ b/distrib/autobuild.py @@ -84,7 +84,7 @@ def todays_platform_release(): remote_copy('dsfmod/fmod-out-%s.txt' % sys_id(), ev.file_path('fmod-out-%s.txt' % sys_id())) remote_copy('dsfmod/fmod-err-%s.txt' % sys_id(), ev.file_path('fmod-err-%s.txt' % sys_id())) - git_checkout('master') + git_checkout(builder.config.BRANCH) def update_changes(fromTag=None, toTag=None, debChanges=False): @@ -94,7 +94,7 @@ def update_changes(fromTag=None, toTag=None, debChanges=False): # Make sure we have the latest changes. git_pull() fromTag = aptrepo_find_latest_tag() - toTag = 'master' # Everything up to now. + toTag = builder.config.BRANCH # Everything up to now. else: # Use the two most recent builds by default. if fromTag is None or toTag is None: diff --git a/distrib/builder/changes.py b/distrib/builder/changes.py index 2865b64eb0..2e3e6dd508 100644 --- a/distrib/builder/changes.py +++ b/distrib/builder/changes.py @@ -74,8 +74,8 @@ def __init__(self, fromTag, toTag): self.parse() def should_ignore(self, subject): - if subject.startswith("Merge branch 'master' of"): - # master->master merges are not listed. + if subject.startswith("Merge branch '%s' of" % config.BRANCH): + # Same-branch merges are not listed. return True return False @@ -144,7 +144,7 @@ def parse(self): def all_tags(self): # These words are always considered to be valid tags. - tags = ['Cleanup', 'Fixed', 'Added', 'Refactor', 'Performance', 'Optimize', 'merge branch'] + tags = ['Cleanup', 'Fixed', 'Added', 'Refactor', 'Performance', 'Optimize', 'Merge branch'] for e in self.entries: for t in e.tags + e.guessedTags: if t not in tags: diff --git a/distrib/builder/config.py b/distrib/builder/config.py index 72d1ce967d..dc6b626252 100644 --- a/distrib/builder/config.py +++ b/distrib/builder/config.py @@ -18,6 +18,7 @@ def get_arg(label): DISTRIB_DIR = '.' APT_REPO_DIR = '' TAG_MODIFIER = '' +BRANCH = 'master' val = get_arg('--distrib') if val is not None: DISTRIB_DIR = val @@ -28,6 +29,9 @@ def get_arg(label): val = get_arg('--apt') if val is not None: APT_REPO_DIR = val +val = get_arg('--branch') +if val is not None: BRANCH = val + val = get_arg('--tagmod') if val is not None: TAG_MODIFIER = val diff --git a/distrib/builder/git.py b/distrib/builder/git.py index daeebbcb20..6c93dc9ff0 100644 --- a/distrib/builder/git.py +++ b/distrib/builder/git.py @@ -18,9 +18,9 @@ def git_checkout(ident): def git_pull(): """Updates the source with a git pull.""" - print 'Updating source...' + print 'Updating source from branch %s...' % builder.config.BRANCH os.chdir(builder.config.DISTRIB_DIR) - run_git("git checkout master") + run_git("git checkout " + builder.config.BRANCH) run_git("git pull") diff --git a/distrib/builder/utils.py b/distrib/builder/utils.py index 043cd14a2d..e829dd163b 100644 --- a/distrib/builder/utils.py +++ b/distrib/builder/utils.py @@ -101,7 +101,7 @@ def aptrepo_by_time(): def aptrepo_find_latest_tag(): debs = aptrepo_by_time() - if not debs: return 'master' + if not debs: return config.BRANCH arch = deb_arch() biggest = 0 for deb in debs: