diff --git a/treemanifest/__init__.py b/treemanifest/__init__.py --- a/treemanifest/__init__.py +++ b/treemanifest/__init__.py @@ -626,9 +626,16 @@ # happens during amend. tr.addpending('treepack', writepending) + # returning False indicates there are no pending changes. + return False + tr.addfinalize('treepack', finalize) tr.addabort('treepack', abort) tr.addpending('treepack', writepending) + else: + # Write the pending changes so any recursive calls to this method can + # potentially leverage on it. + tr.writepending() # If the manifest was already committed as a flat manifest, use # its node.