Submitter | Alexander Plavin |
---|---|
Date | Sept. 6, 2013, 9:35 a.m. |
Message ID | <e87a93bf4c2fb8229fe3.1378460134@debian-alexander.dolgopa> |
Download | mbox | patch |
Permalink | /patch/2393/ |
State | Accepted |
Commit | 2f9d5c5256ea4db1b7c52a892b9e2e977ceb7af4 |
Headers | show |
Comments
Patch
diff -r f0f63ed56acb -r e87a93bf4c2f mercurial/revset.py --- a/mercurial/revset.py Wed Jul 24 03:20:26 2013 +0400 +++ b/mercurial/revset.py Fri Aug 09 22:52:58 2013 +0400 @@ -1945,5 +1945,11 @@ output = '\n'.join((' '*l + s) for l, s in lines) return output +def depth(tree): + if isinstance(tree, tuple): + return max(map(depth, tree)) + 1 + else: + return 0 + # tell hggettext to extract docstrings from these functions: i18nfunctions = symbols.values()