comparison tests/test-hgweb.t @ 22577:a111e460318a stable

hgweb: refresh hgweb.repo on phase change (issue4061) Make hgweb.refresh() also look at phaseroots file (in addition to 00changelog.i file) and reload the repo when os.stat returns different mtime or size than cached, signifying the file was modified. This way if user changes phase of a changeset (secret <-> draft), there's no need to restart hg serve to see the change.
author Anton Shestakov <engored@ya.ru>
date Sat, 27 Sep 2014 21:59:55 +0900
parents 6e1fbcb18a75
children 939ce500c92a
comparison
equal deleted inserted replaced
22576:c712238c4f9b 22577:a111e460318a
529 background-color: #FFCCCC !important; 529 background-color: #FFCCCC !important;
530 } 530 }
531 304 Not Modified 531 304 Not Modified
532 532
533 533
534 phase changes are refreshed (issue4061)
535
536 $ echo bar >> foo
537 $ hg ci -msecret --secret
538 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log?style=raw'
539 200 Script output follows
540
541
542 # HG changelog
543 # Node ID 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
544
545 changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
546 revision: 0
547 user: test
548 date: Thu, 01 Jan 1970 00:00:00 +0000
549 summary: base
550 branch: default
551 tag: tip
552
553
554 $ hg phase --draft tip
555 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log?style=raw'
556 200 Script output follows
557
558
559 # HG changelog
560 # Node ID a084749e708a9c4c0a5b652a2a446322ce290e04
561
562 changeset: a084749e708a9c4c0a5b652a2a446322ce290e04
563 revision: 1
564 user: test
565 date: Thu, 01 Jan 1970 00:00:00 +0000
566 summary: secret
567 branch: default
568 tag: tip
569
570 changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
571 revision: 0
572 user: test
573 date: Thu, 01 Jan 1970 00:00:00 +0000
574 summary: base
575
576
577
534 errors 578 errors
535 579
536 $ cat errors.log 580 $ cat errors.log
537 581
538 $ cd .. 582 $ cd ..