Rev 2300: Fix 2.5-ism. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5

Jelmer Vernooij jelmer at samba.org
Tue Jan 13 16:25:22 GMT 2009


At http://people.samba.org/bzr/jelmer/bzr-svn/0.5

------------------------------------------------------------
revno: 2300
revision-id: jelmer at samba.org-20090113162520-gzv3mg8t2hgl095h
parent: jelmer at samba.org-20090113153149-if5mqnj0e0wrqrjh
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Tue 2009-01-13 17:25:20 +0100
message:
  Fix 2.5-ism.
modified:
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
=== modified file 'commit.py'
--- a/commit.py	2009-01-11 13:48:53 +0000
+++ b/commit.py	2009-01-13 16:25:20 +0000
@@ -929,7 +929,10 @@
     """
     assert rev.revision_id in (None, revision_id)
     old_tree = source_repo.revision_tree(revision_id)
-    base_tree = source_repo.revision_tree(rev.parent_ids[0] if rev.parent_ids else NULL_REVISION)
+    if rev.parent_ids:
+        base_tree = source_repo.revision_tree(rev.parent_ids[0])
+    else:
+        base_tree = source_repo.revision_tree(NULL_REVISION)
 
     if push_metadata:
         base_revids = rev.parent_ids




More information about the bazaar-commits mailing list