[jhbuild] [bzr] Updated bzr tree_id to a more bzr-backwards implementation
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] [bzr] Updated bzr tree_id to a more bzr-backwards implementation
- Date: Fri, 11 Jun 2010 18:41:04 +0000 (UTC)
commit 0bd4cf3ba2008c969f2c5fdacc353471d9a4c0ba
Author: Dmitrijs Ledkovs <dmitrij ledkov ubuntu com>
Date: Tue Jun 8 02:37:52 2010 +0100
[bzr] Updated bzr tree_id to a more bzr-backwards implementation
Recommending bzr 1.16+ in the docs since it can access 2a repositories without
doing on-the-fly conversions. Jhbuild can work with bzr older than 0.9.
doc/C/jhbuild.xml | 3 ++-
jhbuild/versioncontrol/bzr.py | 10 ++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/doc/C/jhbuild.xml b/doc/C/jhbuild.xml
index 3cbc1ff..764d27a 100644
--- a/doc/C/jhbuild.xml
+++ b/doc/C/jhbuild.xml
@@ -2195,7 +2195,8 @@ libgnomecanvas is missing branch definition for gnome-2-20
<section id="moduleset-syntax-sources-bzr">
<title>Bazaar</title>
- <para>This repository type is used to define a Bazaar repository.</para>
+ <para>This repository type is used to define a Bazaar repository. It is
+ recommended to have Bazaar 1.16 or higher.</para>
<programlisting>
<repository type="bzr" name="launchpad.net"
diff --git a/jhbuild/versioncontrol/bzr.py b/jhbuild/versioncontrol/bzr.py
index b13b6e3..b5f7d21 100644
--- a/jhbuild/versioncontrol/bzr.py
+++ b/jhbuild/versioncontrol/bzr.py
@@ -206,8 +206,14 @@ Remove it or change your dvcs_mirror_dir settings.""") % self.srcdir)
if not os.path.exists(self.srcdir):
return None
else:
- cmd = ['bzr', 'revision-info', '--tree', '-d', self.srcdir]
- return get_output(cmd).strip()
+ try:
+ # --tree is relatively new (bzr 1.17)
+ cmd = ['bzr', 'revision-info', '--tree']
+ tree_id = get_output(cmd, cwd=self.srcdir).strip()
+ except:
+ cmd = ['bzr', 'revision-info']
+ tree_id = get_output(cmd, cwd=self.srcdir).strip()
+ return tree_id
def to_sxml(self):
attrs = {}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]