equal
deleted
inserted
replaced
23 if not node1: |
23 if not node1: |
24 node1 = repo.dirstate.parents()[0] |
24 node1 = repo.dirstate.parents()[0] |
25 |
25 |
26 change = repo.changelog.read(node1) |
26 change = repo.changelog.read(node1) |
27 mmap = repo.manifest.read(change[0]) |
27 mmap = repo.manifest.read(change[0]) |
28 empty = hg.nullid |
28 empty = hg.short(hg.nullid) |
29 |
29 |
30 for f in modified: |
30 for f in modified: |
31 # TODO get file permissions |
31 # TODO get file permissions |
32 print ":100664 100664 %s %s M\t%s\t%s" % (hg.short(mmap[f]), |
32 print ":100664 100664 %s %s M\t%s\t%s" % (hg.short(mmap[f]), |
33 hg.short(mmap2[f]), |
33 hg.short(mmap2[f]), |
34 f, f) |
34 f, f) |
35 for f in added: |
35 for f in added: |
36 print ":000000 100664 %s %s N\t%s\t%s" % (hg.short(nullid), |
36 print ":000000 100664 %s %s N\t%s\t%s" % (empty, |
37 hg.short(mmap2[f]), |
37 hg.short(mmap2[f]), |
38 f, f) |
38 f, f) |
39 for f in removed: |
39 for f in removed: |
40 print ":100664 000000 %s %s D\t%s\t%s" % (hg.short(mmap[f]), |
40 print ":100664 000000 %s %s D\t%s\t%s" % (hg.short(mmap[f]), |
41 hg.short(nullid), |
41 empty, |
42 f, f) |
42 f, f) |
43 ## |
43 ## |
44 |
44 |
45 while True: |
45 while True: |
46 if opts['stdin']: |
46 if opts['stdin']: |