[PATCH 1/2] hgit (v3)
Chris Mason
mason at suse.com
Mon Jun 6 19:21:33 UTC 2005
Incremental fix to hgit that updates to the current git-diff-tree output
format:
Signed-off-by: Chris Mason <mason at suse.com>
--- a/contrib/hgit Mon Jun 6 10:38:40 2005
+++ b/contrib/hgit Mon Jun 6 15:15:52 2005
@@ -32,21 +32,19 @@
change = repo.changelog.read(node1)
mmap = repo.manifest.read(change[0])
date1 = date(change)
+ empty = "0000000000000000000000000000000000000000"
if files:
c, a, d = map(lambda x: filterfiles(files, x), (c, a, d))
for f in c:
# TODO get file permissions
- print "*100664->100664 blob %s->%s %s" % (hg.hex(mmap[f]),
- hg.hex(mmap2[f]), f)
+ print ":100664 100664 %s %s %s %s" % (hg.hex(mmap[f]),
+ hg.hex(mmap2[f]), f, f)
for f in a:
- # print "Created: %s (mode: 100644)" % (f)
- print "+100664 blob %s %s" % (hg.hex(mmap2[f]), f)
+ print ":000000 100664 %s %s %s %s" % (empty, hg.hex(mmap2[f]), f, f)
for f in d:
- # print "Deleted: %s" % (f)
- print "-100664 blob %s %s" % (hg.hex(mmap[f]), f)
-
+ print ":100664 000000 %s %s %s %s" % (hg.hex(mmap[f]), empty, f, f)
##
revs = []
More information about the Mercurial
mailing list