Show More
@@ -2042,19 +2042,16 b' Test subdir' | |||||
2042 | $ cd .. |
|
2042 | $ cd .. | |
2043 |
|
2043 | |||
2044 | Test --hidden |
|
2044 | Test --hidden | |
|
2045 | (enable obsolete) | |||
2045 |
|
2046 | |||
2046 |
$ cat > $ |
|
2047 | $ cat > ${TESTTMP}/obs.py << EOF | |
2047 | > from mercurial import util |
|
2048 | > import mercurial.obsolete | |
2048 | > def reposetup(ui, repo): |
|
2049 | > mercurial.obsolete._enabled = True | |
2049 | > for line in repo.opener('hidden'): |
|
|||
2050 | > ctx = repo[line.strip()] |
|
|||
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!') |
|
|||
2054 | > EOF |
|
2050 | > EOF | |
2055 |
$ echo '[extensions]' >> |
|
2051 | $ echo '[extensions]' >> $HGRCPATH | |
2056 | $ echo "hidden=$HGTMP/testhidden.py" >> .hg/hgrc |
|
2052 | $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH | |
2057 | $ hg id --debug -i -r 8 > .hg/hidden |
|
2053 | ||
|
2054 | $ hg debugobsolete `hg id --debug -i -r 8` | |||
2058 | $ testlog |
|
2055 | $ testlog | |
2059 | [] |
|
2056 | [] | |
2060 | [] |
|
2057 | [] |
@@ -1142,19 +1142,20 b' Diff here should be the same:' | |||||
1142 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1142 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1143 | summary: a |
|
1143 | summary: a | |
1144 |
|
1144 | |||
1145 | $ cat > $HGTMP/testhidden.py << EOF |
|
1145 | enable obsolete to test hidden feature | |
1146 | > def reposetup(ui, repo): |
|
1146 | ||
1147 | > for line in repo.opener('hidden'): |
|
1147 | $ cat > ${TESTTMP}/obs.py << EOF | |
1148 | > ctx = repo[line.strip()] |
|
1148 | > import mercurial.obsolete | |
1149 | > repo.hiddenrevs.add(ctx.rev()) |
|
1149 | > mercurial.obsolete._enabled = True | |
1150 | > EOF |
|
1150 | > EOF | |
1151 | $ echo '[extensions]' >> $HGRCPATH |
|
1151 | $ echo '[extensions]' >> $HGRCPATH | |
1152 |
$ echo " |
|
1152 | $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH | |
1153 | $ touch .hg/hidden |
|
1153 | ||
1154 | $ hg log --template='{rev}:{node}\n' |
|
1154 | $ hg log --template='{rev}:{node}\n' | |
1155 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1155 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1156 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1156 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1157 |
$ |
|
1157 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f | |
|
1158 | $ hg up null -q | |||
1158 | $ hg log --template='{rev}:{node}\n' |
|
1159 | $ hg log --template='{rev}:{node}\n' | |
1159 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1160 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1160 | $ hg log --template='{rev}:{node}\n' --hidden |
|
1161 | $ hg log --template='{rev}:{node}\n' --hidden | |
@@ -1163,7 +1164,7 b' Diff here should be the same:' | |||||
1163 |
|
1164 | |||
1164 | clear extensions configuration |
|
1165 | clear extensions configuration | |
1165 | $ echo '[extensions]' >> $HGRCPATH |
|
1166 | $ echo '[extensions]' >> $HGRCPATH | |
1166 |
$ echo " |
|
1167 | $ echo "obs=!" >> $HGRCPATH | |
1167 | $ cd .. |
|
1168 | $ cd .. | |
1168 |
|
1169 | |||
1169 | test -u/-k for problematic encoding |
|
1170 | test -u/-k for problematic encoding |
General Comments 0
You need to be logged in to leave comments.
Login now