Commit Graph

18 Commits

Author SHA1 Message Date
Martin Geisler
af8a35e078 check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
Matt Mackall
112f27426d ancestor: improve description 2011-03-07 15:45:10 -06:00
Matt Mackall
51b3b09c8f backout most of 26e0b9a8ce0d 2010-09-24 12:46:54 -05:00
Brodie Rao
7362459729 cleanup: use x in (a, b) instead of x == a or x == b 2010-09-23 00:02:31 -05:00
Matt Mackall
299b7254c4 merge: sort arguments to stabilize the ancestor search 2010-06-21 13:25:42 -05:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Sune Foldager
910782bf26 ancestor: improve docstring
The term "least common ancestor" is highly ambiguous.
2009-11-24 09:49:23 +01:00
Benoit Boissinot
1f59ef6f81 ancestor: use set instead of dict 2009-05-17 03:53:13 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Nicolas Dumazet
5c8c0a663b ancestor: caching the parent list to improve performance
When computing the DAG depth, we walk through all ancestors: this commit adds
memoization during that first step. Then, the memorized parents are fetched
from a dict instead of calling parents() on each vertex.

This tweak, according to Kcachegrind, improves ancestor() performance by 16%
when cloning a big repository.
2009-03-23 15:36:30 +01:00
Matt Mackall
56e621f7bc symmetricdifference: move back to copies
It's too tightly dependent on known revlog ordering to fit well in ancestors
2008-03-29 12:39:47 -05:00
Matt Mackall
ab64062215 symmetricdifference: change colors to sides 2008-03-29 12:39:47 -05:00
Matt Mackall
469b176973 ancestors: simplify symmetric difference
- n_wanted/wanted -> interesting
- scan colors rather than managing ret
2008-03-29 12:39:47 -05:00
Matt Mackall
5c5200eb63 diff: use copy smarts from copies.py 2008-03-15 10:02:31 -05:00
Matt Mackall
ce54a3ea46 merge: move symmetricdifferences to ancestor.py 2008-03-15 10:02:31 -05:00
Thomas Arendsen Hein
411d64ce3e white space and line break cleanups 2006-11-17 08:06:54 +01:00
Matt Mackall
79aed53c85 Abstract ancestor algorithm into generic function
Make depth calculation non-recursive
Add simple shortcut for linear ancestry

Convert context to use ancestor function
 make memoized parents function

Convert revlog to use ancestor function
2006-09-20 16:50:50 -05:00