6 if len(sys.argv)>1 and sys.argv[1] in ["-h","--help"]:
8 This utility just prints the length of the longest path
9 in the revision graph from revison 0 to the current one.
12 plist = os.popen("hg parents --template='{rev}\n'").readlines()
14 print "You are in the process of merging"
18 f = os.popen("hg log -r 0:tip --template='{rev} {parents}\n'").readlines()
26 print "Something is seriously wrong"
31 par1 = par2 = int(s[1].split(":")[0])
33 par1 = int(s[1].split(":")[0])
34 par2 = int(s[2].split(":")[0])
38 lengths.append(max(lengths[par1],lengths[par2])+1)