Mercurial > hg
comparison tests/test-hgweb-commands.t @ 19094:fc1b77db123f stable
hgweb: handle filtered "0" rev in navigation
Before this changeset, navigation generation crashed if revision "0" was
filtered. We introduce a `_first` methods on revision navigation that return the
lowest unfiltered element and use it in two place were the "0" changeset was
explicitly referenced.
Test case are introduced.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 30 Apr 2013 13:53:49 +0200 |
parents | 6bc76c0e60b9 |
children | f2e4fdb3dd27 |
comparison
equal
deleted
inserted
replaced
19093:6f27efc7db23 | 19094:fc1b77db123f |
---|---|
1434 Content-Type: text/plain; charset=ascii\r (esc) | 1434 Content-Type: text/plain; charset=ascii\r (esc) |
1435 \r (esc) | 1435 \r (esc) |
1436 | 1436 |
1437 error: unknown revision '4' | 1437 error: unknown revision '4' |
1438 | 1438 |
1439 filtered '0' changeset | |
1440 | |
1441 (create new root) | |
1442 $ hg up null | |
1443 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1444 $ echo 'babar' > jungle | |
1445 $ hg add jungle | |
1446 $ hg ci -m 'Babar is in the jungle!' | |
1447 created new head | |
1448 $ hg graft 0:: | |
1449 grafting revision 0 | |
1450 grafting revision 1 | |
1451 grafting revision 2 | |
1452 grafting revision 3 | |
1453 grafting revision 4 | |
1454 grafting revision 5 | |
1455 (turning the initial root secret (filtered)) | |
1456 $ hg phase --force --secret 0 | |
1457 $ PATH_INFO=/graph/; export PATH_INFO | |
1458 $ QUERY_STRING='' | |
1459 $ python hgweb.cgi | grep Status | |
1460 Status: 200 Script output follows\r (esc) | |
1461 (check rendered revision) | |
1462 $ QUERY_STRING='style=raw' | |
1463 $ python hgweb.cgi | grep -v ETag | |
1464 Status: 200 Script output follows\r (esc) | |
1465 Content-Type: text/plain; charset=ascii\r (esc) | |
1466 \r (esc) | |
1467 | |
1468 # HG graph | |
1469 # Node ID 1d9b947fef1fbb382a95c11a8f5a67e9a10b5026 | |
1470 # Rows shown 7 | |
1471 | |
1472 changeset: 1d9b947fef1f | |
1473 user: test | |
1474 date: 1970-01-01 | |
1475 summary: 5 | |
1476 branch: default | |
1477 tag: tip | |
1478 | |
1479 node: (0, 0) (color 1) | |
1480 edge: (0, 0) -> (0, 1) (color 1) | |
1481 | |
1482 changeset: 0cfd435fd222 | |
1483 user: test | |
1484 date: 1970-01-01 | |
1485 summary: 4 | |
1486 | |
1487 node: (0, 1) (color 1) | |
1488 edge: (0, 1) -> (0, 2) (color 1) | |
1489 | |
1490 changeset: 6768b9939e82 | |
1491 user: test | |
1492 date: 1970-01-01 | |
1493 summary: 3 | |
1494 | |
1495 node: (0, 2) (color 1) | |
1496 edge: (0, 2) -> (0, 3) (color 1) | |
1497 | |
1498 changeset: 05b0497fd125 | |
1499 user: test | |
1500 date: 1970-01-01 | |
1501 summary: 2 | |
1502 | |
1503 node: (0, 3) (color 1) | |
1504 edge: (0, 3) -> (0, 4) (color 1) | |
1505 | |
1506 changeset: 9c102df67cfb | |
1507 user: test | |
1508 date: 1970-01-01 | |
1509 summary: 1 | |
1510 | |
1511 node: (0, 4) (color 1) | |
1512 edge: (0, 4) -> (0, 5) (color 1) | |
1513 | |
1514 changeset: 3ebcd7db11bf | |
1515 user: test | |
1516 date: 1970-01-01 | |
1517 summary: 0 | |
1518 | |
1519 node: (0, 5) (color 1) | |
1520 edge: (0, 5) -> (0, 6) (color 1) | |
1521 | |
1522 changeset: c5e9bd96ae01 | |
1523 user: test | |
1524 date: 1970-01-01 | |
1525 summary: Babar is in the jungle! | |
1526 | |
1527 node: (0, 6) (color 1) | |
1528 | |
1529 | |
1530 | |
1531 | |
1532 | |
1439 $ cd .. | 1533 $ cd .. |
1534 |