ooo-build r13116 - in trunk: . bin
- From: jannieuw svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13116 - in trunk: . bin
- Date: Tue, 8 Jul 2008 15:03:57 +0000 (UTC)
Author: jannieuw
Date: Tue Jul 8 15:03:57 2008
New Revision: 13116
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13116&view=rev
Log:
2008-07-08 Jan Nieuwenhuizen <janneke gnu org>
* bin/gob-bump: Allow running on multi-distro GIT using `gob
branches'.
* bin/gob: Some updates for m21, fixes for gob-* proxy commands.y
Modified:
trunk/ChangeLog
trunk/bin/gob
trunk/bin/gob-bump
Modified: trunk/bin/gob
==============================================================================
--- trunk/bin/gob (original)
+++ trunk/bin/gob Tue Jul 8 15:03:57 2008
@@ -66,6 +66,15 @@
if not patch_file:
return None
+ if options.milestone == '21':
+ # Additional dependency on cws-scsheetprotection02 in
+ # dev300-m21. This is most unfortunate, it pulls whole of vba
+ # into 4 other branches, instead of just
+ # cws-scsheetprotection02.
+ m = re.search ('cws-scsheetprotection02', patch_file)
+ if m:
+ return 'vba'
+
m = re.search ('(writerfilter-qnametostr-NOOPTFILES)', patch_file)
if m:
return m.group (1)
@@ -392,7 +401,7 @@
if not self.is_on_branch (branch):
self.system ('git-checkout %(branch)s' % locals ())
def get_current_branch (self):
- return self.pipe ('git-name-rev --name-only HEAD')[:-1]
+ return re.search ('(^|\n)\* (.+)', self.pipe ('git-branch')).group (2)
def is_on_branch (self, branch):
return branch == self.get_current_branch ()
def has_branch (self, branch):
@@ -537,6 +546,9 @@
def masters (self):
'''list masters'''
print '\n'.join (map (str, self.apply.master.keys ()))
+ def branches (self):
+ '''list branches'''
+ print '\n'.join (map (str, self.get_branches ().keys ()))
def get_branches (self):
if not self.branches_:
for patch in self.get_patches ():
@@ -609,28 +621,28 @@
print 'BRANCH:', branch, dependencies
print 'INDEPENDENT:', independent
def bump (self):
- '''bump BRANCH TAG-NAME - bump current branch (BRANCH=new, TAG-NAME=gob-*)'''
+ '''bump BRANCH TAG-NAME - bump current branch (BRANCH=new upstream)'''
if self.options.arguments != 2:
print 'Usage: gob bump BRANCH TAG-NAME'
print 'BRANCH: new upstream'
- print 'TAG-NAME: gob-*'
print 'Example:'
- print ' gob bump upstream/dev300-m21 gob-my-21-update'
+ print ' gob bump upstream/dev300-m21 my-21-update'
sys.exit (1)
- branch = options.arguments[0]
- tag = options.arguments[1]
- system ('gob-bump %(branch)s %(tag)s' % locals ())
+ branch = self.options.arguments[0]
+ tag = self.options.arguments[1]
+ git_dir = self.options.build_dir
+ system ('cd %(git_dir)s && gob-bump %(branch)s %(tag)s' % locals ())
def update (self):
'''update BRANCH - update current branch (BRANCH='master')'''
- if self.options.arguments != 2:
+ if self.options.arguments != 1:
print 'Usage: gob update BRANCH'
print '''BRANCH: the 'master' branch'''
print 'Example: '
print ' gob update distro/SUSE'
sys.exit (1)
- branch = options.arguments[0]
- tag = options.arguments[1]
- system ('gob-bump %(branch)s %(tag)s' % locals ())
+ branch = self.options.arguments[0]
+ git_dir = self.options.build_dir
+ system ('cdi %(git_dir)s && gob-update %(branch)s' % locals ())
def get_cli_parser ():
p = optparse.OptionParser ()
Modified: trunk/bin/gob-bump
==============================================================================
--- trunk/bin/gob-bump (original)
+++ trunk/bin/gob-bump Tue Jul 8 15:03:57 2008
@@ -2,25 +2,59 @@
set -e
-if test $# -lt 2
-then
- echo "gob-bump <branch> <tag-name>"
- echo "branch Merge the newest changes from here"
- echo "tag-name To create the new gob-tag-name tag"
- exit 1
-fi
+OPTIONS_KEEPDASHDASH=
+OPTIONS_SPEC="\
+gob-bump [options] <branch> <tag>
+--
+distro= use branches for distro
+apply-dir= use apply-dir
+
+ BRANCH Merge the newest changes from here
+ TAG To create the new gob-tag-name tag
+"
+
+. git-sh-setup
+
+parse_config () {
+ while test $# != 0; do
+ case "$1" in
+ --apply-dir)
+ shift
+ apply_dir=$1
+ ;;
+ --distro)
+ shift
+ distro=$1
+ ;;
+ --)
+ shift
+ break ;;
+ *) usage ;;
+ esac
+ shift
+ done
+ args_left=$#
+ echo args_left=$args_left
+}
+
+test $# != 0 || usage
+
+parse_config "$@"
+while test $args_left -lt $#; do shift; done
+
+test $# = 2 || usage
new_changes=$1
new_tag=gob-$2
# setup
-this_branch=$(git-name-rev --name-only HEAD)
+this_branch=$(git-branch | grep '^\*' | sed -e 's/^\* //')
gob_bases=$(git-tag | grep '^gob-')
if test -z "$gob_bases"
then
- echo 'cannot find any gob-* tag, aborting' 1>&2
- exit 1
+ echo 'cannot find any gob-* tag, aborting' 1>&2
+ exit 1
fi
# find the last unpatched version and create a 'reset' commit
@@ -51,23 +85,42 @@
git-tag $new_tag
# update the branches
-git-branch -r | sed 's#^.*origin/##' | grep -Ev '/|^HEAD$' |
- while read branch
- do
- temp_branch=$(mktemp fixme.$branch.XXXXXXXXXX)
- rm $temp_branch
- git-checkout -b $temp_branch origin/$branch
- if gob-update $this_branch
+if test -z "$apply_dir"
+then
+ branches="$(git-branch -r | sed 's#^.*origin/##' | grep -Ev '/|^(HEAD|master|patched|pristine)$')"
+else
+ # Allow gob-bump to work in multi-distro GIT: work with subset
+ # of [this distro's only] branches
+ if test -z "$distro"
+ then
+ distro=SUSE
+ fi
+ branches="$(gob --apply-dir=$apply_dir --distro=$distro branches)"
+fi
+broken='layout-plugin'
+echo "$branches" | grep -Ev $broken | while read branch
+do
+ temp_branch=$(mktemp fixme.$branch.XXXXXXXXXX)
+ rm $temp_branch
+ git-checkout -b $temp_branch origin/$branch
+ if gob-update $this_branch
+ then
+ git-push
+ git-checkout $this_branch
+ if git-merge $temp_branch
then
- git-push
- git-checkout $this_branch
- if git-merge $temp_branch
- then
- git-branch -d $temp_branch
- else
- echo "Merging back failed, please merge manually: $temp_branch" 1>&2
- fi
+## git-branch -d $temp_branch
+ echo "And now?"
+ exit 0
else
- echo "Update failed, please update manually: $temp_branch" 1>&2
+ echo "Merging back failed, please merge manually: $temp_branch" 1>&2
fi
- done
+ else
+ echo "Update failed, please update manually: $temp_branch" 1>&2
+ fi
+done
+
+# Local Variables:
+# mode:shell-script
+# sh-basic-offset:8
+# End:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]