Mercurial > hg
comparison hgext/hgk.py @ 3065:32fd512ca7c0
hgk.py: use nullid instead of a constant
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 07 Sep 2006 14:01:00 +0200 |
parents | fe5c92529d1c |
children | fbd3f9fd645d |
comparison
equal
deleted
inserted
replaced
3064:fe5c92529d1c | 3065:32fd512ca7c0 |
---|---|
84 if not node1: | 84 if not node1: |
85 node1 = repo.dirstate.parents()[0] | 85 node1 = repo.dirstate.parents()[0] |
86 | 86 |
87 change = repo.changelog.read(node1) | 87 change = repo.changelog.read(node1) |
88 mmap = repo.manifest.read(change[0]) | 88 mmap = repo.manifest.read(change[0]) |
89 empty = "0" * 40; | 89 empty = hg.nullid |
90 | 90 |
91 for f in modified: | 91 for f in modified: |
92 # TODO get file permissions | 92 # TODO get file permissions |
93 print ":100664 100664 %s %s M\t%s\t%s" % (hg.short(mmap[f]), | 93 print ":100664 100664 %s %s M\t%s\t%s" % (hg.short(mmap[f]), |
94 hg.short(mmap2[f]), | 94 hg.short(mmap2[f]), |
95 f, f) | 95 f, f) |
96 for f in added: | 96 for f in added: |
97 print ":000000 100664 %s %s N\t%s\t%s" % (empty, | 97 print ":000000 100664 %s %s N\t%s\t%s" % (hg.short(nullid), |
98 hg.short(mmap2[f]), | 98 hg.short(mmap2[f]), |
99 f, f) | 99 f, f) |
100 for f in removed: | 100 for f in removed: |
101 print ":100664 000000 %s %s D\t%s\t%s" % (hg.short(mmap[f]), | 101 print ":100664 000000 %s %s D\t%s\t%s" % (hg.short(mmap[f]), |
102 empty, | 102 hg.short(nullid), |
103 f, f) | 103 f, f) |
104 ## | 104 ## |
105 | 105 |
106 while True: | 106 while True: |
107 if opts['stdin']: | 107 if opts['stdin']: |