[jhbuild] [bzr] Adding support for XML snapshots
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] [bzr] Adding support for XML snapshots
- Date: Fri, 11 Jun 2010 18:40:59 +0000 (UTC)
commit 5f0853ec367fef7293129cfe8daabe557f066519
Author: Dmitrijs Ledkovs <dmitrij ledkov ubuntu com>
Date: Sat May 1 17:54:21 2010 +0100
[bzr] Adding support for XML snapshots
jhbuild/versioncontrol/bzr.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/versioncontrol/bzr.py b/jhbuild/versioncontrol/bzr.py
index 0dad6d5..b13b6e3 100644
--- a/jhbuild/versioncontrol/bzr.py
+++ b/jhbuild/versioncontrol/bzr.py
@@ -29,6 +29,7 @@ from jhbuild.errors import FatalError, CommandError
from jhbuild.utils.cmds import get_output
from jhbuild.versioncontrol import Repository, Branch, register_repo_type
from jhbuild.commands.sanitycheck import inpath
+from jhbuild.utils.sxml import sxml
# Make sure that the urlparse module considers bzr://, bzr+ssh://, sftp:// and lp:
# scheme to be netloc aware and set to allow relative URIs.
@@ -94,6 +95,10 @@ class BzrRepository(Repository):
return BzrBranch(self, module_href, checkoutdir, tag, revspec)
+ def to_sxml(self):
+ return [sxml.repository(type='bzr', name=self.name, href=self.href,
+ trunk=self.trunk_template, branches=self.branches_template)]
+
class BzrBranch(Branch):
"""A class representing a Bazaar branch."""
@@ -204,4 +209,13 @@ Remove it or change your dvcs_mirror_dir settings.""") % self.srcdir)
cmd = ['bzr', 'revision-info', '--tree', '-d', self.srcdir]
return get_output(cmd).strip()
+ def to_sxml(self):
+ attrs = {}
+ if self.revspec:
+ attrs = self.revspec()[0]
+ return [sxml.branch(repo=self.repository.name,
+ module=self.module,
+ revid=self.tree_id(),
+ **attrs)]
+
register_repo_type('bzr', BzrRepository)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]