hgk: remove unused code, node2 is always set
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 26 Dec 2006 03:26:23 +0100
changeset 3978 ee5663cb4406
parent 3977 95e6488bc809
child 3979 e0d13267f7a4
hgk: remove unused code, node2 is always set
hgext/hgk.py
--- 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])