changeset 3978:ee5663cb4406

hgk: remove unused code, node2 is always set
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 26 Dec 2006 03:26:23 +0100
parents 95e6488bc809
children e0d13267f7a4
files hgext/hgk.py
diffstat 1 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/hgk.py	Tue Dec 26 03:25:44 2006 +0100
+++ b/hgext/hgk.py	Tue Dec 26 03:26:23 2006 +0100
@@ -11,16 +11,11 @@
 def difftree(ui, repo, node1=None, node2=None, *files, **opts):
     """diff trees from two commits"""
     def __difftree(repo, node1, node2, files=[]):
-        if node2:
-            change = repo.changelog.read(node2)
-            mmap2 = repo.manifest.read(change[0])
-            status = repo.status(node1, node2, files=files)[:5]
-            modified, added, removed, deleted, unknown = status
-        else:
-            status = repo.status(node1, files=files)[:5]
-            modified, added, removed, deleted, unknown = status
-            if not node1:
-                node1 = repo.dirstate.parents()[0]
+        assert node2 is not None
+        change = repo.changelog.read(node2)
+        mmap2 = repo.manifest.read(change[0])
+        status = repo.status(node1, node2, files=files)[:5]
+        modified, added, removed, deleted, unknown = status
 
         change = repo.changelog.read(node1)
         mmap = repo.manifest.read(change[0])