comparison hgext/hgk.py @ 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 ba45041827a2
children e0d13267f7a4
comparison
equal deleted inserted replaced
3977:95e6488bc809 3978:ee5663cb4406
9 from mercurial import hg, fancyopts, commands, ui, util, patch, revlog 9 from mercurial import hg, fancyopts, commands, ui, util, patch, revlog
10 10
11 def difftree(ui, repo, node1=None, node2=None, *files, **opts): 11 def difftree(ui, repo, node1=None, node2=None, *files, **opts):
12 """diff trees from two commits""" 12 """diff trees from two commits"""
13 def __difftree(repo, node1, node2, files=[]): 13 def __difftree(repo, node1, node2, files=[]):
14 if node2: 14 assert node2 is not None
15 change = repo.changelog.read(node2) 15 change = repo.changelog.read(node2)
16 mmap2 = repo.manifest.read(change[0]) 16 mmap2 = repo.manifest.read(change[0])
17 status = repo.status(node1, node2, files=files)[:5] 17 status = repo.status(node1, node2, files=files)[:5]
18 modified, added, removed, deleted, unknown = status 18 modified, added, removed, deleted, unknown = status
19 else:
20 status = repo.status(node1, files=files)[:5]
21 modified, added, removed, deleted, unknown = status
22 if not node1:
23 node1 = repo.dirstate.parents()[0]
24 19
25 change = repo.changelog.read(node1) 20 change = repo.changelog.read(node1)
26 mmap = repo.manifest.read(change[0]) 21 mmap = repo.manifest.read(change[0])
27 empty = hg.short(hg.nullid) 22 empty = hg.short(hg.nullid)
28 23