jhbuild r2568 - in trunk: . jhbuild/versioncontrol modulesets
- From: johncarr svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2568 - in trunk: . jhbuild/versioncontrol modulesets
- Date: Mon, 8 Dec 2008 15:07:52 +0000 (UTC)
Author: johncarr
Date: Mon Dec 8 15:07:52 2008
New Revision: 2568
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2568&view=rev
Log:
* jhbuild/versioncontrol/bzr.py:
Update jhbuild Bazaar support for tags and branches. (closes: #563658)
* modulesets/gtk.modules:
* modulesets/gnome-2.16.modules:
* modulesets/gnome-2.18.modules:
* modulesets/online-desktop.modules:
* modulesets/gnome-suites-2.20.modules:
* modulesets/gnome-suites-2.22.modules:
* modulesets/gnome-suites-2.24.modules:
* modulesets/gnome-suites-2.26.modules:
* modulesets/gnome-2.20.modules:
* modulesets/gnome-2.22.modules:
* modulesets/gnome-2.24.modules:
* modulesets/gnome-2.26.modules:
Update the mirror definitions to take advantage of this.
Modified:
trunk/ChangeLog
trunk/jhbuild/versioncontrol/bzr.py
trunk/modulesets/gnome-2.16.modules
trunk/modulesets/gnome-2.18.modules
trunk/modulesets/gnome-2.20.modules
trunk/modulesets/gnome-2.22.modules
trunk/modulesets/gnome-2.24.modules
trunk/modulesets/gnome-2.26.modules
trunk/modulesets/gnome-suites-2.20.modules
trunk/modulesets/gnome-suites-2.22.modules
trunk/modulesets/gnome-suites-2.24.modules
trunk/modulesets/gnome-suites-2.26.modules
trunk/modulesets/gtk.modules
trunk/modulesets/online-desktop.modules
Modified: trunk/jhbuild/versioncontrol/bzr.py
==============================================================================
--- trunk/jhbuild/versioncontrol/bzr.py (original)
+++ trunk/jhbuild/versioncontrol/bzr.py Mon Dec 8 15:07:52 2008
@@ -40,43 +40,55 @@
class BzrRepository(Repository):
"""A class representing a Bzr repository.
- Note that this is just the parent directory for a bunch of darcs
- branches, making it easy to switch to a mirror URI.
-
It can be a parent of a number of Bzr repositories or branches.
"""
- init_xml_attrs = ['href', 'trunk-path']
+ init_xml_attrs = ['href', 'trunk-template', 'branches-template']
- def __init__(self, config, name, href, trunk_path=''):
+ def __init__(self, config, name, href, trunk_template='%(module)s', branches_template=''):
Repository.__init__(self, config, name)
# allow user to adjust location of branch.
self.href = config.repos.get(name, href)
- self.trunk_path = trunk_path
+ self.trunk_template = trunk_template
+ self.branches_template = branches_template
- branch_xml_attrs = ['module', 'checkoutdir']
+ branch_xml_attrs = ['module', 'checkoutdir', 'revision', 'tag']
- def branch(self, name, module=None, checkoutdir=None):
+ def branch(self, name, module=None, checkoutdir=None, revision=None, tag=None):
+ module_href = None
if name in self.config.branches:
- module = self.config.branches[name]
- if not module:
+ module_href = self.config.branches[name]
+ if not module_href:
raise FatalError(_('branch for %s has wrong override, check your .jhbuildrc') % name)
+
+ if module is None:
+ module = name
+
+ if revision and not revision.isdigit():
+ template = urlparse.urljoin(self.href, self.branches_template)
else:
- if module is None:
- if self.trunk_path:
- module = name + "/" + self.trunk_path
- else:
- module = name
- module = urlparse.urljoin(self.href, module)
+ template = urlparse.urljoin(self.href, self.trunk_template)
+
+ if not module_href:
+ module_href = template % {
+ 'module': module,
+ 'revision': revision,
+ 'branch': revision,
+ 'tag': tag
+ }
if checkoutdir is None:
checkoutdir = name
- return BzrBranch(self, module, checkoutdir)
+ return BzrBranch(self, module_href, checkoutdir, tag)
class BzrBranch(Branch):
- """A class representing a Darcs branch."""
+ """A class representing a Bazaar branch."""
+
+ def __init__(self, repository, module_href, checkoutdir, tag):
+ Branch.__init__(self, repository, module_href, checkoutdir)
+ self.tag = tag
def srcdir(self):
if self.checkoutdir:
@@ -102,6 +114,9 @@
if self.checkoutdir:
cmd.append(self.checkoutdir)
+ if self.tag:
+ cmd.append('-rtag:%s' % self.tag)
+
if self.config.sticky_date:
raise FatalError(_('date based checkout not yet supported\n'))
@@ -113,6 +128,8 @@
cmd = ['bzr', 'pull']
if overwrite:
cmd.append('--overwrite')
+ if self.tag:
+ cmd.append('-rtag:%s' % self.tag)
cmd.append(self.module)
buildscript.execute(cmd, 'bzr', cwd=self.srcdir)
Modified: trunk/modulesets/gnome-2.16.modules
==============================================================================
--- trunk/modulesets/gnome-2.16.modules (original)
+++ trunk/modulesets/gnome-2.16.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="cvs" name="cairo.freedesktop.org"
Modified: trunk/modulesets/gnome-2.18.modules
==============================================================================
--- trunk/modulesets/gnome-2.18.modules (original)
+++ trunk/modulesets/gnome-2.18.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
Modified: trunk/modulesets/gnome-2.20.modules
==============================================================================
--- trunk/modulesets/gnome-2.20.modules (original)
+++ trunk/modulesets/gnome-2.20.modules Mon Dec 8 15:07:52 2008
@@ -5,8 +5,9 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
- <mirror type="git" href="git://git-mirror.gnome.org/git/" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
+ <mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
href="http://svn.gnome.org/svn/gnomemm/"/>
Modified: trunk/modulesets/gnome-2.22.modules
==============================================================================
--- trunk/modulesets/gnome-2.22.modules (original)
+++ trunk/modulesets/gnome-2.22.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
Modified: trunk/modulesets/gnome-2.24.modules
==============================================================================
--- trunk/modulesets/gnome-2.24.modules (original)
+++ trunk/modulesets/gnome-2.24.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
Modified: trunk/modulesets/gnome-2.26.modules
==============================================================================
--- trunk/modulesets/gnome-2.26.modules (original)
+++ trunk/modulesets/gnome-2.26.modules Mon Dec 8 15:07:52 2008
@@ -5,8 +5,9 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
- <mirror type="git" href="git://git-mirror.gnome.org/git/" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
+ <mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
href="http://svn.gnome.org/svn/gnomemm/"/>
Modified: trunk/modulesets/gnome-suites-2.20.modules
==============================================================================
--- trunk/modulesets/gnome-suites-2.20.modules (original)
+++ trunk/modulesets/gnome-suites-2.20.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
Modified: trunk/modulesets/gnome-suites-2.22.modules
==============================================================================
--- trunk/modulesets/gnome-suites-2.22.modules (original)
+++ trunk/modulesets/gnome-suites-2.22.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
Modified: trunk/modulesets/gnome-suites-2.24.modules
==============================================================================
--- trunk/modulesets/gnome-suites-2.24.modules (original)
+++ trunk/modulesets/gnome-suites-2.24.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
Modified: trunk/modulesets/gnome-suites-2.26.modules
==============================================================================
--- trunk/modulesets/gnome-suites-2.26.modules (original)
+++ trunk/modulesets/gnome-suites-2.26.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.gnomemm"
Modified: trunk/modulesets/gtk.modules
==============================================================================
--- trunk/modulesets/gtk.modules (original)
+++ trunk/modulesets/gtk.modules Mon Dec 8 15:07:52 2008
@@ -7,7 +7,8 @@
<repository type="svn" name="svn.gnome.org" default="yes"
developer-href-example="svn+ssh://USER svn gnome org/svn/"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="cvs" name="mime.freedesktop.org"
Modified: trunk/modulesets/online-desktop.modules
==============================================================================
--- trunk/modulesets/online-desktop.modules (original)
+++ trunk/modulesets/online-desktop.modules Mon Dec 8 15:07:52 2008
@@ -5,7 +5,8 @@
<moduleset>
<repository type="svn" name="svn.gnome.org" default="yes"
href="http://svn.gnome.org/svn/">
- <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
+ <mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/"
+ trunk-template="%(module)s/trunk" branches-template="%(module)s/branches/%(branch)s"/>
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
</repository>
<repository type="svn" name="svn.mugshot.org"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]