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("HGRCPATH='' hg parents --template='{rev}\n'").readlines()
 
    14     print "You are in the process of merging"
 
    18 f = os.popen("HGRCPATH='' hg log -r 0:tip --template='{rev} {parents}\n'").\
 
    27         print "Something is seriously wrong"
 
    32         par1 = par2 = int(s[1].split(":")[0])
 
    34         par1 = int(s[1].split(":")[0])
 
    35         par2 = int(s[2].split(":")[0])
 
    39         lengths.append(max(lengths[par1],lengths[par2])+1)