hgext/hgk.py
changeset 3578 3b4e00cba57a
parent 3473 0e68608bd11d
child 3800 792e61e9a00a
equal deleted inserted replaced
3577:7f7425306925 3578:3b4e00cba57a
    76     (h, h1, h2) = map(hg.short, (n, p1, p2))
    76     (h, h1, h2) = map(hg.short, (n, p1, p2))
    77     (i1, i2) = map(repo.changelog.rev, (p1, p2))
    77     (i1, i2) = map(repo.changelog.rev, (p1, p2))
    78     if not changes:
    78     if not changes:
    79         changes = repo.changelog.read(n)
    79         changes = repo.changelog.read(n)
    80     print "tree %s" % (hg.short(changes[0]))
    80     print "tree %s" % (hg.short(changes[0]))
    81     if i1 != -1: print "parent %s" % (h1)
    81     if i1 != hg.nullrev: print "parent %s" % (h1)
    82     if i2 != -1: print "parent %s" % (h2)
    82     if i2 != hg.nullrev: print "parent %s" % (h2)
    83     date_ar = changes[2]
    83     date_ar = changes[2]
    84     date = int(float(date_ar[0]))
    84     date = int(float(date_ar[0]))
    85     lines = changes[4].splitlines()
    85     lines = changes[4].splitlines()
    86     if lines and lines[-1].startswith('committer:'):
    86     if lines and lines[-1].startswith('committer:'):
    87         committer = lines[-1].split(': ')[1].rstrip()
    87         committer = lines[-1].split(': ')[1].rstrip()
   239                 (i1, i2) = map(repo.changelog.rev, (p1, p2))
   239                 (i1, i2) = map(repo.changelog.rev, (p1, p2))
   240 
   240 
   241                 date = changes[2][0]
   241                 date = changes[2][0]
   242                 print "%s %s:%s" % (date, h, mask),
   242                 print "%s %s:%s" % (date, h, mask),
   243                 mask = is_reachable(want_sha1, reachable, p1)
   243                 mask = is_reachable(want_sha1, reachable, p1)
   244                 if i1 != -1 and mask > 0:
   244                 if i1 != hg.nullrev and mask > 0:
   245                     print "%s:%s " % (h1, mask),
   245                     print "%s:%s " % (h1, mask),
   246                 mask = is_reachable(want_sha1, reachable, p2)
   246                 mask = is_reachable(want_sha1, reachable, p2)
   247                 if i2 != -1 and mask > 0:
   247                 if i2 != hg.nullrev and mask > 0:
   248                     print "%s:%s " % (h2, mask),
   248                     print "%s:%s " % (h2, mask),
   249                 print ""
   249                 print ""
   250             if maxnr and count >= maxnr:
   250             if maxnr and count >= maxnr:
   251                 break
   251                 break
   252             count += 1
   252             count += 1