Show More
@@ -664,10 +664,15 b' def _descendants(repo, subset, x, follow' | |||||
664 |
|
664 | |||
665 | # Both sets need to be ascending in order to lazily return the union |
|
665 | # Both sets need to be ascending in order to lazily return the union | |
666 | # in the correct order. |
|
666 | # in the correct order. | |
667 | args.sort() |
|
667 | base = subset & args | |
668 | result = (filteredset(s, subset.__contains__, ascending=True) + |
|
668 | desc = subset & s | |
669 | filteredset(args, subset.__contains__, ascending=True)) |
|
669 | result = base + desc | |
670 |
|
670 | if subset.isascending(): | ||
|
671 | result.sort() | |||
|
672 | elif subset.isdescending(): | |||
|
673 | result.sort(reverse=True) | |||
|
674 | else: | |||
|
675 | result = subset & result | |||
671 | return result |
|
676 | return result | |
672 |
|
677 | |||
673 | def descendants(repo, subset, x): |
|
678 | def descendants(repo, subset, x): |
@@ -1989,6 +1989,187 b' Test --follow and forward --rev' | |||||
1989 | | |
|
1989 | | | |
1990 | o 0 add a |
|
1990 | o 0 add a | |
1991 |
|
1991 | |||
|
1992 | $ hg export 'all()' | |||
|
1993 | # HG changeset patch | |||
|
1994 | # User test | |||
|
1995 | # Date 0 0 | |||
|
1996 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
1997 | # Node ID f8035bb17114da16215af3436ec5222428ace8ee | |||
|
1998 | # Parent 0000000000000000000000000000000000000000 | |||
|
1999 | add a | |||
|
2000 | ||||
|
2001 | diff -r 000000000000 -r f8035bb17114 a | |||
|
2002 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2003 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |||
|
2004 | @@ -0,0 +1,1 @@ | |||
|
2005 | +a | |||
|
2006 | diff -r 000000000000 -r f8035bb17114 aa | |||
|
2007 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2008 | +++ b/aa Thu Jan 01 00:00:00 1970 +0000 | |||
|
2009 | @@ -0,0 +1,1 @@ | |||
|
2010 | +aa | |||
|
2011 | diff -r 000000000000 -r f8035bb17114 f | |||
|
2012 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2013 | +++ b/f Thu Jan 01 00:00:00 1970 +0000 | |||
|
2014 | @@ -0,0 +1,1 @@ | |||
|
2015 | +f | |||
|
2016 | # HG changeset patch | |||
|
2017 | # User test | |||
|
2018 | # Date 0 0 | |||
|
2019 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
2020 | # Node ID 216d4c92cf98ff2b4641d508b76b529f3d424c92 | |||
|
2021 | # Parent f8035bb17114da16215af3436ec5222428ace8ee | |||
|
2022 | copy a b | |||
|
2023 | ||||
|
2024 | diff -r f8035bb17114 -r 216d4c92cf98 b | |||
|
2025 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2026 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |||
|
2027 | @@ -0,0 +1,1 @@ | |||
|
2028 | +a | |||
|
2029 | diff -r f8035bb17114 -r 216d4c92cf98 g | |||
|
2030 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2031 | +++ b/g Thu Jan 01 00:00:00 1970 +0000 | |||
|
2032 | @@ -0,0 +1,1 @@ | |||
|
2033 | +f | |||
|
2034 | # HG changeset patch | |||
|
2035 | # User test | |||
|
2036 | # Date 0 0 | |||
|
2037 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
2038 | # Node ID bb573313a9e8349099b6ea2b2fb1fc7f424446f3 | |||
|
2039 | # Parent 216d4c92cf98ff2b4641d508b76b529f3d424c92 | |||
|
2040 | mv b dir/b | |||
|
2041 | ||||
|
2042 | diff -r 216d4c92cf98 -r bb573313a9e8 b | |||
|
2043 | --- a/b Thu Jan 01 00:00:00 1970 +0000 | |||
|
2044 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2045 | @@ -1,1 +0,0 @@ | |||
|
2046 | -a | |||
|
2047 | diff -r 216d4c92cf98 -r bb573313a9e8 dir/b | |||
|
2048 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2049 | +++ b/dir/b Thu Jan 01 00:00:00 1970 +0000 | |||
|
2050 | @@ -0,0 +1,1 @@ | |||
|
2051 | +a | |||
|
2052 | diff -r 216d4c92cf98 -r bb573313a9e8 f | |||
|
2053 | --- a/f Thu Jan 01 00:00:00 1970 +0000 | |||
|
2054 | +++ b/f Thu Jan 01 00:00:00 1970 +0000 | |||
|
2055 | @@ -1,1 +1,2 @@ | |||
|
2056 | f | |||
|
2057 | +f | |||
|
2058 | diff -r 216d4c92cf98 -r bb573313a9e8 g | |||
|
2059 | --- a/g Thu Jan 01 00:00:00 1970 +0000 | |||
|
2060 | +++ b/g Thu Jan 01 00:00:00 1970 +0000 | |||
|
2061 | @@ -1,1 +1,2 @@ | |||
|
2062 | f | |||
|
2063 | +g | |||
|
2064 | # HG changeset patch | |||
|
2065 | # User test | |||
|
2066 | # Date 0 0 | |||
|
2067 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
2068 | # Node ID 5918b8d165d1364e78a66d02e66caa0133c5d1ed | |||
|
2069 | # Parent bb573313a9e8349099b6ea2b2fb1fc7f424446f3 | |||
|
2070 | mv a b; add d | |||
|
2071 | ||||
|
2072 | diff -r bb573313a9e8 -r 5918b8d165d1 a | |||
|
2073 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |||
|
2074 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2075 | @@ -1,1 +0,0 @@ | |||
|
2076 | -a | |||
|
2077 | diff -r bb573313a9e8 -r 5918b8d165d1 b | |||
|
2078 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2079 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |||
|
2080 | @@ -0,0 +1,1 @@ | |||
|
2081 | +a | |||
|
2082 | diff -r bb573313a9e8 -r 5918b8d165d1 d | |||
|
2083 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2084 | +++ b/d Thu Jan 01 00:00:00 1970 +0000 | |||
|
2085 | @@ -0,0 +1,1 @@ | |||
|
2086 | +a | |||
|
2087 | diff -r bb573313a9e8 -r 5918b8d165d1 g | |||
|
2088 | --- a/g Thu Jan 01 00:00:00 1970 +0000 | |||
|
2089 | +++ b/g Thu Jan 01 00:00:00 1970 +0000 | |||
|
2090 | @@ -1,2 +1,2 @@ | |||
|
2091 | f | |||
|
2092 | -g | |||
|
2093 | +f | |||
|
2094 | # HG changeset patch | |||
|
2095 | # User test | |||
|
2096 | # Date 0 0 | |||
|
2097 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
2098 | # Node ID 17d952250a9d03cc3dc77b199ab60e959b9b0260 | |||
|
2099 | # Parent 5918b8d165d1364e78a66d02e66caa0133c5d1ed | |||
|
2100 | mv dir/b e | |||
|
2101 | ||||
|
2102 | diff -r 5918b8d165d1 -r 17d952250a9d dir/b | |||
|
2103 | --- a/dir/b Thu Jan 01 00:00:00 1970 +0000 | |||
|
2104 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2105 | @@ -1,1 +0,0 @@ | |||
|
2106 | -a | |||
|
2107 | diff -r 5918b8d165d1 -r 17d952250a9d e | |||
|
2108 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2109 | +++ b/e Thu Jan 01 00:00:00 1970 +0000 | |||
|
2110 | @@ -0,0 +1,1 @@ | |||
|
2111 | +a | |||
|
2112 | # HG changeset patch | |||
|
2113 | # User test | |||
|
2114 | # Date 0 0 | |||
|
2115 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
2116 | # Node ID 99b31f1c2782e2deb1723cef08930f70fc84b37b | |||
|
2117 | # Parent 5918b8d165d1364e78a66d02e66caa0133c5d1ed | |||
|
2118 | add another e | |||
|
2119 | ||||
|
2120 | diff -r 5918b8d165d1 -r 99b31f1c2782 e | |||
|
2121 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2122 | +++ b/e Thu Jan 01 00:00:00 1970 +0000 | |||
|
2123 | @@ -0,0 +1,1 @@ | |||
|
2124 | +ee | |||
|
2125 | # HG changeset patch | |||
|
2126 | # User test | |||
|
2127 | # Date 0 0 | |||
|
2128 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
2129 | # Node ID fc281d8ff18d999ad6497b3d27390bcd695dcc73 | |||
|
2130 | # Parent 99b31f1c2782e2deb1723cef08930f70fc84b37b | |||
|
2131 | # Parent 17d952250a9d03cc3dc77b199ab60e959b9b0260 | |||
|
2132 | merge 5 and 4 | |||
|
2133 | ||||
|
2134 | diff -r 99b31f1c2782 -r fc281d8ff18d dir/b | |||
|
2135 | --- a/dir/b Thu Jan 01 00:00:00 1970 +0000 | |||
|
2136 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2137 | @@ -1,1 +0,0 @@ | |||
|
2138 | -a | |||
|
2139 | diff -r 99b31f1c2782 -r fc281d8ff18d e | |||
|
2140 | --- a/e Thu Jan 01 00:00:00 1970 +0000 | |||
|
2141 | +++ b/e Thu Jan 01 00:00:00 1970 +0000 | |||
|
2142 | @@ -1,1 +1,1 @@ | |||
|
2143 | -ee | |||
|
2144 | +merge | |||
|
2145 | # HG changeset patch | |||
|
2146 | # User test | |||
|
2147 | # Date 0 0 | |||
|
2148 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
2149 | # Node ID 02dbb8e276b8ab7abfd07cab50c901647e75c2dd | |||
|
2150 | # Parent fc281d8ff18d999ad6497b3d27390bcd695dcc73 | |||
|
2151 | Added tag foo-bar for changeset fc281d8ff18d | |||
|
2152 | ||||
|
2153 | diff -r fc281d8ff18d -r 02dbb8e276b8 .hgtags | |||
|
2154 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
2155 | +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 | |||
|
2156 | @@ -0,0 +1,1 @@ | |||
|
2157 | +fc281d8ff18d999ad6497b3d27390bcd695dcc73 foo-bar | |||
|
2158 | # HG changeset patch | |||
|
2159 | # User test | |||
|
2160 | # Date 0 0 | |||
|
2161 | # Thu Jan 01 00:00:00 1970 +0000 | |||
|
2162 | # Node ID 24c2e826ddebf80f9dcd60b856bdb8e6715c5449 | |||
|
2163 | # Parent fc281d8ff18d999ad6497b3d27390bcd695dcc73 | |||
|
2164 | add g | |||
|
2165 | ||||
|
2166 | diff -r fc281d8ff18d -r 24c2e826ddeb g | |||
|
2167 | --- a/g Thu Jan 01 00:00:00 1970 +0000 | |||
|
2168 | +++ b/g Thu Jan 01 00:00:00 1970 +0000 | |||
|
2169 | @@ -1,2 +1,1 @@ | |||
|
2170 | -f | |||
|
2171 | -f | |||
|
2172 | +g | |||
1992 | $ testlog --follow -r6 -r8 -r5 -r7 -r4 |
|
2173 | $ testlog --follow -r6 -r8 -r5 -r7 -r4 | |
1993 | ['6', '8', '5', '7', '4'] |
|
2174 | ['6', '8', '5', '7', '4'] | |
1994 | (group |
|
2175 | (group | |
@@ -1999,9 +2180,8 b' Test --follow and forward --rev' | |||||
1999 | +++ glog.nodes * (glob) |
|
2180 | +++ glog.nodes * (glob) | |
2000 | @@ -1,3 +1,3 @@ |
|
2181 | @@ -1,3 +1,3 @@ | |
2001 | -nodetag 6 |
|
2182 | -nodetag 6 | |
2002 | -nodetag 7 |
|
|||
2003 | nodetag 8 |
|
2183 | nodetag 8 | |
2004 |
|
|
2184 | nodetag 7 | |
2005 | +nodetag 6 |
|
2185 | +nodetag 6 | |
2006 |
|
2186 | |||
2007 | Test --follow-first and forward --rev |
|
2187 | Test --follow-first and forward --rev | |
@@ -2016,9 +2196,8 b' Test --follow-first and forward --rev' | |||||
2016 | +++ glog.nodes * (glob) |
|
2196 | +++ glog.nodes * (glob) | |
2017 | @@ -1,3 +1,3 @@ |
|
2197 | @@ -1,3 +1,3 @@ | |
2018 | -nodetag 6 |
|
2198 | -nodetag 6 | |
2019 | -nodetag 7 |
|
|||
2020 | nodetag 8 |
|
2199 | nodetag 8 | |
2021 |
|
|
2200 | nodetag 7 | |
2022 | +nodetag 6 |
|
2201 | +nodetag 6 | |
2023 |
|
2202 | |||
2024 | Test --follow and backward --rev |
|
2203 | Test --follow and backward --rev |
@@ -1509,6 +1509,7 b' 1. mq.secret=false' | |||||
1509 |
|
1509 | |||
1510 | $ rm .hg/store/phaseroots |
|
1510 | $ rm .hg/store/phaseroots | |
1511 | $ hg phase 'qparent::' |
|
1511 | $ hg phase 'qparent::' | |
|
1512 | -1: public | |||
1512 | 0: draft |
|
1513 | 0: draft | |
1513 | 1: draft |
|
1514 | 1: draft | |
1514 | 2: draft |
|
1515 | 2: draft | |
@@ -1516,6 +1517,7 b' 1. mq.secret=false' | |||||
1516 | $ echo 'secret=true' >> $HGRCPATH |
|
1517 | $ echo 'secret=true' >> $HGRCPATH | |
1517 | $ rm -f .hg/store/phaseroots |
|
1518 | $ rm -f .hg/store/phaseroots | |
1518 | $ hg phase 'qparent::' |
|
1519 | $ hg phase 'qparent::' | |
|
1520 | -1: public | |||
1519 | 0: secret |
|
1521 | 0: secret | |
1520 | 1: secret |
|
1522 | 1: secret | |
1521 | 2: secret |
|
1523 | 2: secret |
General Comments 0
You need to be logged in to leave comments.
Login now