# HG changeset patch # User Benoit Boissinot # Date 1167099983 -3600 # Node ID ee5663cb440644da2f9169b0c8fed253d52e834c # Parent 95e6488bc8090e27fcf4cde9e9a4bfe3bcd57af7 hgk: remove unused code, node2 is always set diff -r 95e6488bc809 -r ee5663cb4406 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])