Mercurial > hg
comparison tests/test-hgweb-commands.t @ 17318:7ac5800dbc8f stable
hgweb: fix graph view paging
- Fix off-by-one error on displayed entries count in normal mode
- Fix incorrect paging when the top revision was lower than revcount
- Fix revcount not overriding web.maxshortchanges everywhere
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sun, 29 Jul 2012 23:16:20 +0200 |
parents | fa223eecc6d7 |
children | 3eb85477c0d9 |
comparison
equal
deleted
inserted
replaced
17317:0b8272274b56 | 17318:7ac5800dbc8f |
---|---|
32 $ echo default.width = 3 >> .hg/hgrc | 32 $ echo default.width = 3 >> .hg/hgrc |
33 $ echo stable.width = 3 >> .hg/hgrc | 33 $ echo stable.width = 3 >> .hg/hgrc |
34 $ echo stable.color = FF0000 >> .hg/hgrc | 34 $ echo stable.color = FF0000 >> .hg/hgrc |
35 $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log | 35 $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log |
36 $ cat hg.pid >> $DAEMON_PIDS | 36 $ cat hg.pid >> $DAEMON_PIDS |
37 $ hg log -G --template '{rev}:{node|short} {desc}\n' | |
38 @ 3:ba87b23d29ca branch | |
39 | | |
40 o 2:1d22e65f027e branch | |
41 | | |
42 o 1:a4f92ed23982 Added tag 1.0 for changeset 2ef0ac749a14 | |
43 | | |
44 o 0:2ef0ac749a14 base | |
45 | |
37 | 46 |
38 Logs and changes | 47 Logs and changes |
39 | 48 |
40 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/?style=atom' | 49 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/?style=atom' |
41 200 Script output follows | 50 200 Script output follows |
949 <a href="/file/ba87b23d29ca?style=gitweb">files</a> | | 958 <a href="/file/ba87b23d29ca?style=gitweb">files</a> | |
950 <a href="/help?style=gitweb">help</a> | 959 <a href="/help?style=gitweb">help</a> |
951 <br/> | 960 <br/> |
952 <a href="/graph/3?style=gitweb&revcount=30">less</a> | 961 <a href="/graph/3?style=gitweb&revcount=30">less</a> |
953 <a href="/graph/3?style=gitweb&revcount=120">more</a> | 962 <a href="/graph/3?style=gitweb&revcount=120">more</a> |
954 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-3</a> <a href="/graph/tip?style=gitweb">tip</a> <br/> | 963 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/tip?style=gitweb">tip</a> <br/> |
955 </div> | 964 </div> |
956 | 965 |
957 <div class="title"> </div> | 966 <div class="title"> </div> |
958 | 967 |
959 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript> | 968 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript> |
1030 </script> | 1039 </script> |
1031 | 1040 |
1032 <div class="page_nav"> | 1041 <div class="page_nav"> |
1033 <a href="/graph/3?style=gitweb&revcount=30">less</a> | 1042 <a href="/graph/3?style=gitweb&revcount=30">less</a> |
1034 <a href="/graph/3?style=gitweb&revcount=120">more</a> | 1043 <a href="/graph/3?style=gitweb&revcount=120">more</a> |
1035 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-3</a> <a href="/graph/tip?style=gitweb">tip</a> | 1044 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/tip?style=gitweb">tip</a> |
1036 </div> | 1045 </div> |
1037 | 1046 |
1038 <script type="text/javascript">process_dates()</script> | 1047 <script type="text/javascript">process_dates()</script> |
1039 <div class="page_footer"> | 1048 <div class="page_footer"> |
1040 <div class="page_footer_text">test</div> | 1049 <div class="page_footer_text">test</div> |
1285 heads | 1294 heads |
1286 | 1295 |
1287 ERRORS ENCOUNTERED | 1296 ERRORS ENCOUNTERED |
1288 | 1297 |
1289 $ cat errors.log | 1298 $ cat errors.log |
1299 $ "$TESTDIR/killdaemons.py" | |
1290 | 1300 |
1291 $ cd .. | 1301 $ cd .. |
1302 | |
1303 Test graph paging | |
1304 | |
1305 $ mkcommit() { | |
1306 > echo $1 >> a | |
1307 > hg ci -Am $1 a | |
1308 > } | |
1309 | |
1310 $ hg init graph | |
1311 $ cd graph | |
1312 $ mkcommit 0 | |
1313 $ mkcommit 1 | |
1314 $ mkcommit 2 | |
1315 $ mkcommit 3 | |
1316 $ mkcommit 4 | |
1317 $ mkcommit 5 | |
1318 $ hg serve --config server.uncompressed=False \ | |
1319 > --config web.maxshortchanges=2 \ | |
1320 > -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
1321 $ cat hg.pid >> $DAEMON_PIDS | |
1322 $ hg log -G --template '{rev}:{node|short} {desc}\n' | |
1323 @ 5:aed2d9c1d0e7 5 | |
1324 | | |
1325 o 4:b60a39a85a01 4 | |
1326 | | |
1327 o 3:ada793dcc118 3 | |
1328 | | |
1329 o 2:ab4f1438558b 2 | |
1330 | | |
1331 o 1:e06180cbfb0c 1 | |
1332 | | |
1333 o 0:b4e73ffab476 0 | |
1334 | |
1335 | |
1336 Test paging | |
1337 | |
1338 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT \ | |
1339 > 'graph/?style=raw' | grep changeset | |
1340 changeset: aed2d9c1d0e7 | |
1341 changeset: b60a39a85a01 | |
1342 | |
1343 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT \ | |
1344 > 'graph/?style=raw&revcount=3' | grep changeset | |
1345 changeset: aed2d9c1d0e7 | |
1346 changeset: b60a39a85a01 | |
1347 changeset: ada793dcc118 | |
1348 | |
1349 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT \ | |
1350 > 'graph/e06180cbfb0?style=raw&revcount=3' | grep changeset | |
1351 changeset: ab4f1438558b | |
1352 changeset: e06180cbfb0c | |
1353 changeset: b4e73ffab476 | |
1354 | |
1355 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT \ | |
1356 > 'graph/b4e73ffab47?style=raw&revcount=3' | grep changeset | |
1357 changeset: ab4f1438558b | |
1358 changeset: e06180cbfb0c | |
1359 changeset: b4e73ffab476 | |
1360 | |
1361 $ cat errors.log | |
1362 | |
1363 $ cd .. |