gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
chg-len.py does not scan any hg config file now
0 1 0
default
1 file changed with 3 insertions and 0 deletions:
↑ Collapse diff ↑
Ignore white space 24 line context
1 1
#! /usr/bin/env python
2 2

	
3 3
import sys
4 4

	
5 5
from mercurial import ui, hg
6
from mercurial import util
7

	
8
util.rcpath = lambda : []
6 9

	
7 10
if len(sys.argv)>1 and sys.argv[1] in ["-h","--help"]:
8 11
    print """
9 12
This utility just prints the length of the longest path
10 13
in the revision graph from revison 0 to the current one.
11 14
"""
12 15
    exit(0)
13 16

	
14 17
u = ui.ui()
15 18
r = hg.repository(u, ".")
16 19
N = r.changectx(".").rev()
17 20
lengths=[0]*(N+1)
0 comments (0 inline)