contrib/plan9/hgrc.d/9mail.rc
author Yuya Nishihara <yuya@tcha.org>
Sat, 24 Jun 2017 23:05:57 +0900
changeset 33092 a53bfc2845f2
parent 19617 ba89c3872801
permissions -rw-r--r--
revset: add depth limit to descendants() (issue5374) This is naive implementation using two-pass scanning. Tracking descendants isn't an easy problem if both start and stop depths are specified. It's impractical to remember all possible depths of each node while scanning from roots to descendants because the number of depths explodes. Instead, we could cache (min, max) depths as a good approximation and track ancestors back when needed, but that's likely to have off-by-one bug. Since this implementation appears not significantly slower, and is quite straightforward, I think it's good enough for practical use cases. The time and space complexity is O(n) ish. revisions: 0) 1-pass scanning with (min, max)-depth cache (worst-case quadratic) 1) 2-pass scanning (this version) repository: mozilla-central # descendants(0) (for reference) *) 0.430353 # descendants(0, depth=1000) 0) 0.264889 1) 0.398289 # descendants(limit(tip:0, 1, offset=10000), depth=1000) 0) 0.025478 1) 0.029099 # descendants(0, depth=2000, startdepth=1000) 0) painfully slow (due to quadratic backtracking of ancestors) 1) 1.531138
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19617
ba89c3872801 hgrc.d: separate namespace for mercurial scripts 9diff and 9mail
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     1
# The 9mail to support patchbomb and other email wrappers
ba89c3872801 hgrc.d: separate namespace for mercurial scripts 9diff and 9mail
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     2
[email]
ba89c3872801 hgrc.d: separate namespace for mercurial scripts 9diff and 9mail
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     3
method = /bin/mercurial/9mail
ba89c3872801 hgrc.d: separate namespace for mercurial scripts 9diff and 9mail
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     4