forked from importers/git-importer
Fix up some code after aplanas' continued review
This commit is contained in:
@@ -9,12 +9,8 @@ class FlatNode:
|
||||
self.parent2 = parent2
|
||||
|
||||
def __str__(self) -> str:
|
||||
p1_str = ""
|
||||
if self.parent1:
|
||||
p1_str = f" p1:{self.parent1.short_string()}"
|
||||
p2_str = ""
|
||||
if self.parent2:
|
||||
p2_str = f" p2:{self.parent2.short_string()}"
|
||||
p1_str = f" p1:{self.parent1.short_string()}" if self.parent1 else ""
|
||||
p2_str = f" p2:{self.parent2.short_string()}" if self.parent2 else ""
|
||||
return f"{self.branch} c:{self.commit.short_string()}{p1_str}{p2_str}"
|
||||
|
||||
|
||||
@@ -36,8 +32,7 @@ class FlatTreeWalker(AbstractWalker):
|
||||
def handle_source_node(self, node) -> None:
|
||||
if self.rebase_devel and node.parent and node.parent.merged_into:
|
||||
self.add("devel", node.revision, node.parent.merged_into.revision)
|
||||
return
|
||||
if node.parent:
|
||||
elif node.parent:
|
||||
self.add("devel", node.revision, node.parent.revision)
|
||||
elif self.last_merge:
|
||||
self.add("devel", node.revision, self.last_merge.parent.revision)
|
||||
|
Reference in New Issue
Block a user