Rev 138: Support replaying in empty branch. in file:///home/jelmer/bzr-rebase/trunk/

Jelmer Vernooij jelmer at samba.org
Sat May 2 14:41:47 BST 2009


At file:///home/jelmer/bzr-rebase/trunk/

------------------------------------------------------------
revno: 138
revision-id: jelmer at samba.org-20090502134146-hxf1jc2eajsfny21
parent: jelmer at samba.org-20090429153925-dh1p1e4rjhj5xzov
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2009-05-02 15:41:46 +0200
message:
  Support replaying in empty branch.
modified:
  rebase.py                      rebase.py-20070626221123-ellanmf93nw8z9r1-1
=== modified file 'rebase.py'
--- a/rebase.py	2009-03-31 17:49:28 +0000
+++ b/rebase.py	2009-05-02 13:41:46 +0000
@@ -531,7 +531,7 @@
     newtree = wt.branch.repository.revision_tree(newparents[0])
     delta = wt.changes_from(newtree)
     wt.branch.generate_revision_history(newparents[0])
-    wt.set_parent_ids(newparents[:1])
+    wt.set_parent_ids([r for r in newparents[:1] if r != NULL_REVISION])
     for (f, _, _) in delta.added:
         abs_path = wt.abspath(f)
         if osutils.lexists(abs_path):
@@ -541,7 +541,7 @@
                 os.unlink(abs_path)
     wt.revert(None, old_tree=newtree, backups=False)
     assert not wt.changes_from(wt.basis_tree()).has_changed(), "Rev changed"
-    wt.set_parent_ids(newparents)
+    wt.set_parent_ids([r for r in newparents if r != NULL_REVISION])
 
 
 class ReplaySnapshotError(BzrError):




More information about the bazaar-commits mailing list