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