Show More
@@ -306,6 +306,8 b' class localrepository(object):' | |||||
306 | Note that the hiddenrevs will needs invalidations when |
|
306 | Note that the hiddenrevs will needs invalidations when | |
307 | - a new changesets is added (possible unstable above extinct) |
|
307 | - a new changesets is added (possible unstable above extinct) | |
308 | - a new obsolete marker is added (possible new extinct changeset) |
|
308 | - a new obsolete marker is added (possible new extinct changeset) | |
|
309 | ||||
|
310 | hidden changesets cannot have non-hidden descendants | |||
309 | """ |
|
311 | """ | |
310 | hidden = set() |
|
312 | hidden = set() | |
311 | if self.obsstore: |
|
313 | if self.obsstore: |
@@ -2044,20 +2044,40 b' Test subdir' | |||||
2044 | Test --hidden |
|
2044 | Test --hidden | |
2045 |
|
2045 | |||
2046 | $ cat > $HGTMP/testhidden.py << EOF |
|
2046 | $ cat > $HGTMP/testhidden.py << EOF | |
|
2047 | > from mercurial import util | |||
2047 | > def reposetup(ui, repo): |
|
2048 | > def reposetup(ui, repo): | |
2048 | > for line in repo.opener('hidden'): |
|
2049 | > for line in repo.opener('hidden'): | |
2049 | > ctx = repo[line.strip()] |
|
2050 | > ctx = repo[line.strip()] | |
2050 | > repo.hiddenrevs.add(ctx.rev()) |
|
2051 | > repo.hiddenrevs.add(ctx.rev()) | |
|
2052 | > if repo.revs('children(%ld) - %ld', repo.hiddenrevs, repo.hiddenrevs): | |||
|
2053 | > raise util.Abort('hidden revision with children!') | |||
2051 | > EOF |
|
2054 | > EOF | |
2052 | $ echo '[extensions]' >> .hg/hgrc |
|
2055 | $ echo '[extensions]' >> .hg/hgrc | |
2053 | $ echo "hidden=$HGTMP/testhidden.py" >> .hg/hgrc |
|
2056 | $ echo "hidden=$HGTMP/testhidden.py" >> .hg/hgrc | |
2054 |
$ hg id --debug -i -r |
|
2057 | $ hg id --debug -i -r 8 > .hg/hidden | |
2055 | $ testlog |
|
2058 | $ testlog | |
2056 | [] |
|
2059 | [] | |
2057 | [] |
|
2060 | [] | |
2058 | $ testlog --hidden |
|
2061 | $ testlog --hidden | |
2059 | [] |
|
2062 | [] | |
2060 | [] |
|
2063 | [] | |
|
2064 | $ hg glog --template '{rev} {desc}\n' | |||
|
2065 | o 7 Added tag foo-bar for changeset fc281d8ff18d | |||
|
2066 | | | |||
|
2067 | o 6 merge 5 and 4 | |||
|
2068 | |\ | |||
|
2069 | | o 5 add another e | |||
|
2070 | | | | |||
|
2071 | o | 4 mv dir/b e | |||
|
2072 | |/ | |||
|
2073 | @ 3 mv a b; add d | |||
|
2074 | | | |||
|
2075 | o 2 mv b dir/b | |||
|
2076 | | | |||
|
2077 | o 1 copy a b | |||
|
2078 | | | |||
|
2079 | o 0 add a | |||
|
2080 | ||||
2061 |
|
2081 | |||
2062 | A template without trailing newline should do something sane |
|
2082 | A template without trailing newline should do something sane | |
2063 |
|
2083 | |||
@@ -2066,6 +2086,8 b' A template without trailing newline shou' | |||||
2066 | | |
|
2086 | | | |
2067 | o 1 copy a b |
|
2087 | o 1 copy a b | |
2068 | | |
|
2088 | | | |
|
2089 | o 0 add a | |||
|
2090 | ||||
2069 |
|
2091 | |||
2070 | Extra newlines must be preserved |
|
2092 | Extra newlines must be preserved | |
2071 |
|
2093 | |||
@@ -2076,6 +2098,9 b' Extra newlines must be preserved' | |||||
2076 | o |
|
2098 | o | |
2077 | | 1 copy a b |
|
2099 | | 1 copy a b | |
2078 | | |
|
2100 | | | |
|
2101 | o | |||
|
2102 | 0 add a | |||
|
2103 | ||||
2079 |
|
2104 | |||
2080 | The almost-empty template should do something sane too ... |
|
2105 | The almost-empty template should do something sane too ... | |
2081 |
|
2106 | |||
@@ -2084,5 +2109,7 b' The almost-empty template should do some' | |||||
2084 | | |
|
2109 | | | |
2085 | o |
|
2110 | o | |
2086 | | |
|
2111 | | | |
|
2112 | o | |||
|
2113 | ||||
2087 |
|
2114 | |||
2088 | $ cd .. |
|
2115 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now