changeset 19719 | 2f9d5c5256ea |
parent 19706 | 26ddce1a2a55 |
child 19720 | f0b992a9be9c |
--- a/mercurial/revset.py Sat Sep 07 00:59:24 2013 -0700 +++ b/mercurial/revset.py Fri Aug 09 22:52:58 2013 +0400 @@ -1935,5 +1935,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()