When I try to run a hg log date command like this hg log --date "2011-12-10 17:27:11 to 2012-02-06 17:27:11" The log processes as normal until it gets to a Merge entry on this date 2011-12-10 At this point the hg process then proceeds to consume all the available RAM on the system and needs to be killed. I am able to hg log and view the appropriate entries with this command hg log -v --limit 400 The relevant entries are detailed below (user details removed) changeset: 11382:fe5fbaab1893 branch: branch15 parent: 11381:ee1f3ef838b9 parent: 11368:c66124c260d8 date: Mon Dec 12 10:32:53 2011 +1100 summary: Merge changeset: 11381:ee1f3ef838b9 branch: branch15 parent: 11378:ab925627a790 date: Fri Dec 09 11:32:53 2011 +1100 files: configuration/pom.xml description: setup new style config for dev2 environment changeset: 11368:c66124c260d8 branch: branch15 date: Fri Dec 09 18:03:28 2011 +1100 files: cgu_base/src/au/com/cgu/Util.java description: removed unused code Is it possible that the merge CSET causes the date range to be exceeded (as the parents are from the 9th Dec) and this causes problems for the processing. I discovered this as I am attempting to write a log parser to generate release notes using the commandserver interface I am located in Australia (GMT +10) My platform is: Mercurial Distributed SCM (version 2.1) Windows 7 SP1 Core i7 2600 8GB RAM 120 GB SSD The repository is served from a Linux box running Mercurial Distributed SCM (version 1.4.3)
Hiccups in the log output stream are generally caused by buffering. It's more efficient to walk the log in the forward direction, so we walk N entries, buffer them, then display them in reverse. Then we double N. The notable thing about --date is that we have to visit ALL the changeset entries because dates are not guaranteed to be monotonic. How many entries do you have? Is that the -precise- command you ran that caused you to run out of memory? Or did you also include -v or -p? Are you using a 32-bit or 64-bit Mercurial?
The version of hg is the X64 command line version. The exact command that I ran to invoke the failure was as I detailed previously. ie hg log --date "2011-12-10 17:27:11 to 2012-02-06 17:27:11" (I copied pasted it out of my application that I was writing when I saw the memory issue). There was no "-v" or "-p" arguments. Running the command with the "-v" option yields the same memory issue, and stops at the same CSET I detailed previously. Ditto running it with the "-p" option (it just took longer to get to the failure point as it's displaying more to the console). Not sure which entries you are referring to. There are 11700 CSETs in the entire repository. The date range includes those from 11700 - 11382 (when it fails) - ie about 320. I am able to run a log command with 400 entries in the limit ie hg log --limit 400 That is how I obtained the trace of the parent CSETs of 11382 that I included earlier.
Let me reiterate: (a) Mercurial must inspect every single changeset in your repository when you use --date and (b) where the problem occurs in that process will not be clear due to buffering. It will almost certainly not be caused by any cset that is actually displayed. Can you report what happens with the following tests: hg log -q --time --date "2011-12-10 17:27:11 to 2012-02-06 17:27:11" hg log -q --time -r "date('2011-12-10 17:27:11 to 2012-02-06 17:27:11')" hg log -q --time -r "date('2011-12-10 17:27:11 to 2012-02-06 17:27:11') and not 11700:11382" The -q will minimize the need for buffering.
hg log -q --time --date "2011-12-10 17:27:11 to 2012-02-06 17:27:11" 11700:8630ba12de27 11699:ce4b95ac504a 11698:af0a1dfdf820 11697:e97e03a497a9 11696:2e465cb704da 11695:0b7b2e0c3cf5 11694:62a1567ab884 11693:27e59433e13d 11692:b1b8693a7b7d 11691:44c1ccbb1f29 11690:52786b94c6c1 11689:8a90731d4dbd 11688:1df085b832d1 11687:b2f61edc3538 11686:57d4f2325a04 11685:a6bcc289709a 11684:26f43198ac3c 11683:1ad2661c1913 11682:b6827ac56b60 11681:f21c37c4cdf0 11680:f725860cc7fc 11679:9471bb2b0051 11678:c4fac478fc66 11677:b7fe0373b19e 11676:d8a82cc1036d 11675:17d1d35c022e 11674:86d60e992f1e 11673:09fb25b0b663 11672:79d93292237f 11671:78a942213829 11670:a7ede677fb6d 11669:091534e0b2e4 11668:671de08c4f27 11667:dde7f47dc111 11666:6faa27fff08c 11665:669066e6ca6e 11664:09bb1b03fb0f 11663:4e5f415e550e 11662:683f1ffe84e8 11661:a23efcd9f34a 11660:fc64e8fe4a83 11659:d23cc1c31d21 11658:1df69bf3fa6a 11657:e8795291f79f 11656:16cc25535bf6 11655:07977bc6044c 11654:1c3ea3c608bb 11653:9ee94a2fa4bf 11652:a47ddb555620 11651:30054d0c1472 11650:e4a970520044 11649:e8dfd4e76807 11648:d19c986752b2 11647:09e75a8461af 11646:173a0d5eeda9 11645:fe0dfea31fd4 11644:1387d9c790f7 11643:f5757d6bffe6 11642:d8666752d2a9 11641:4d73938520bf 11640:77a5bc4d2f95 11639:9bd3c671097e 11638:60d8931e3805 11637:cbd3010238bb 11636:4c89be62f315 11635:804052cc1cef 11634:feed10966b98 11633:123815f73e96 11632:451314285094 11631:9219ed7dbcb9 11630:f6053bd4100d 11629:782342d24e33 11628:a8ee461edcfd 11627:079be2dcf490 11626:24d21df61bff 11625:9e8031049e03 11624:77fb056c41c0 11623:7dc9d111d571 11622:0cd3e210fd5b 11621:b742b8eef14e 11620:faaaaa50d1cb 11619:5de2bafd5e56 11618:71e4306ab304 11617:06e594a32e88 11616:221c53743e8e 11615:7c06a4423820 11614:e8636e0a74d8 11613:29540e7bea7b 11612:7f920715b396 11611:8157da54f91b 11610:3f9827e94cef 11609:6afbcae60232 11608:e8e20a7ef5db 11607:1e45ddaf6b41 11606:7a79eae1a0f0 11605:be5c5f8460d1 11604:2a093c69eb97 11603:520987bcaf42 11602:5982206cea9b 11601:240854fa7436 11600:af50539eb2d4 11599:88399d09cb0d 11598:13e004359777 11597:5b294c90df4b 11596:7d158a43304d 11595:57b89be3a4bd 11594:b4fb07622d19 11593:f3fcb16f98dc 11592:391c55f05893 11591:c587802f7132 11590:ee3a9aa56449 11589:b8bed562d05e 11588:650660e94520 11587:7a12d3151516 11586:b397e6101ca4 11585:e65ad02a9b18 11584:8e1db50ce0c9 11583:b223bb8805b0 11582:2b09732ef398 11581:85f8686a27e4 11580:2f21e5942829 11579:539ed2cbb715 11578:4ca0d3d9cc6a 11577:a7e7852038ff 11576:11f5b25b3101 11575:5ede0f9cc42d 11574:2638c2d10a22 11573:c2954800bdd1 11572:85e55b1fe0b4 11571:653c200829f5 11570:c12ac1800c40 11569:c7c3c43d95ae 11568:96fd9fcbdfea 11567:3a177620f8d4 11566:ccfe4ba0d9ad 11565:fd69e179df63 11564:ffac827e91d8 11563:1ad8da13a07b 11562:5dc78e367b24 11561:33f1fcf268c9 11560:8cc18fe5e1ab 11559:21adbd05d47a 11558:78ef89e8625d 11557:d61d42097161 11556:f8a9f58a4504 11555:def0a9ba09d7 11554:d5cffe279c93 11553:a3c98b6e915e 11552:46372960d581 11551:a85bf0455f9d 11550:e24d42cc3f0d 11549:64faf33dd45f 11548:8673ead95d7b 11547:d22ca3e81103 11546:366306144b89 11545:029c88bd7c1e 11544:d1286a5aace8 11543:c5915a79665a 11542:21922f773e60 11541:d0c4ceff2ed1 11540:a4791cb00988 11539:c39e88bb6ec0 11538:a6051846d22a 11537:7ab89afad951 11536:ba2ef65a574a 11535:f36c27a426d3 11534:38cfb9077c7d 11533:2337e36aa85a 11532:1923cd04eea6 11531:2191ae0c3645 11530:2d9217f09358 11529:552066ce7bb0 11528:7cd2009c0d92 11527:b4deb105eeb5 11526:aebf5cb8c739 11525:517a8d928ff1 11524:8afd39a1bf96 11523:a02048cc22a8 11522:272c37ac2065 11521:3c80f040d01c 11520:59e7654256bf 11519:c33fbedd9701 11518:9a8fc80c1bda 11517:064afe42c8c1 11516:0730819882ef 11515:45888d8db603 11514:13a0c12f1a05 11513:dc15bb83a9e4 11512:981b27b706b3 11511:62f5ae6b9da3 11510:8642733c3c6c 11509:cc0581006660 11508:53337edafacf 11507:818487e80c12 11506:e9b2c94f8885 11505:0ed3356761ad 11504:98e26ce42fca 11503:3b107cc501e1 11502:8548edad8162 11501:8c4dface57ab 11500:63cbee9a99c8 11499:bab3d776fbe1 11498:345a888f1cc8 11497:ed37c201b30b 11496:9a31d6b770d2 11495:28c3b1ae77e2 11494:6f0b88b8e90b 11493:85eef3d0c452 11492:f84613fb217b 11491:ab8b027a2433 11490:648a4bdb05da 11489:b4bbb64192d9 11488:f7c956b513b9 11487:3aed0191a28a 11486:d1aa4682d543 11485:bdef2a9411d1 11484:db7be151c029 11483:2823fc86ec4e 11482:f5dc082667a4 11481:02998e79b299 11480:98a4c9ca3965 11479:74bb8914bf3c 11478:c77fc9697ba2 11477:728768e20d51 11476:b7df091c4bdc 11475:48be7dca1673 11474:b69a8e64ef56 11473:17d6a84c1131 11472:7bbe517cc440 11471:6a4f0091387c 11470:59932b538a99 11469:4fe8b8b759f5 11468:742e99570459 11467:fc9b43d71d74 11466:2ce36fc7edcb 11465:5a2067f50ff6 11464:1234a3e20c88 11463:354167e1d6e0 11462:8e38aedcb779 11461:e2728f62199b 11460:062258fc6311 11459:2d25b13e1e16 11458:f27b91917a25 11457:4567d3961613 11456:e54d8a51adbd 11455:e4a29f59ca1f 11454:942b3d07107c 11453:05f117e0860a 11452:c6335aac3b6f 11451:f3523aa82eaf 11450:bce68a4d9c7d 11449:020a56a35d02 11448:9b5c701944a0 11447:70b585556f3a 11446:495c3a66b77b 11445:4091e0604cf6 11444:248bb4c34130 11443:7152b09972ca 11442:75e6b8f76493 11441:3ec97ec2d6b3 11440:afd48a1b0579 11439:2530d2ff99a4 11438:973903a1e368 11437:224494f3776b 11436:dde0ff0d03c5 11435:29433fdf2c25 11434:cdee74a1089e 11433:b6267f6db644 11432:74f35a3d7fbb 11431:baceddc4f635 11430:523ec0a1287d 11429:a5369599e8e2 11428:eea9fb62a0ac 11427:0cfb882439de 11426:abb92d07e70b 11425:da93ceea1735 11424:b9fbb941754b 11423:7717b1631007 11422:89d051701dbc 11421:6eb384212606 11420:587e37a00e5b 11419:820fe5d3d91f 11418:a4c60a76e869 11417:ebb3bd629074 11416:e60348401b03 11415:47b7285e18ea 11414:a5cae9400870 11413:04b12b2d15ec 11412:135615a526b5 11411:51404e433a83 11410:4e2e0b933a9a 11409:d11ab8e41206 11408:cdd9e3ba57d4 11407:1e8bc299ee2f 11406:f11b8a17c247 11405:5728f96eb979 11404:a7fbcd8a2719 11403:552728ca8c15 11402:2c153d51bfeb 11401:22afada218f0 11400:5be567384e6b 11399:355fa7d6cfd1 11398:c4f64bb4919c 11397:8156f4ca34e3 11396:ed5e52ddd40d 11395:aa9a85e0d31d 11394:4574ec5d580c 11393:f51b29825538 11392:e301b1d06e97 11391:b23721a625ea 11390:eca26940f061 11389:c31999727385 11388:94bc8f2539df 11387:bca021c2ff96 11386:8ae1818f5db3 11385:b805563ab0fe 11384:15de3c02504f 11383:93521aec52fc 11382:fe5fbaab1893 interrupted! Time: real 14.479 secs (user 12.433+0.000 sys 1.529+0.000) I then Cntrl-C ed the process at it was already at 7GB. D:\DEV\WS\CONNECT-CMD>hg log -q --time -r "date('2011-12-10 17:27:11 to 2012-02-06 17:27:11')" 11382:fe5fbaab1893 11383:93521aec52fc 11384:15de3c02504f 11385:b805563ab0fe 11386:8ae1818f5db3 11387:bca021c2ff96 11388:94bc8f2539df 11389:c31999727385 11390:eca26940f061 11391:b23721a625ea 11392:e301b1d06e97 11393:f51b29825538 11394:4574ec5d580c 11395:aa9a85e0d31d 11396:ed5e52ddd40d 11397:8156f4ca34e3 11398:c4f64bb4919c 11399:355fa7d6cfd1 11400:5be567384e6b 11401:22afada218f0 11402:2c153d51bfeb 11403:552728ca8c15 11404:a7fbcd8a2719 11405:5728f96eb979 11406:f11b8a17c247 11407:1e8bc299ee2f 11408:cdd9e3ba57d4 11409:d11ab8e41206 11410:4e2e0b933a9a 11411:51404e433a83 11412:135615a526b5 11413:04b12b2d15ec 11414:a5cae9400870 11415:47b7285e18ea 11416:e60348401b03 11417:ebb3bd629074 11418:a4c60a76e869 11419:820fe5d3d91f 11420:587e37a00e5b 11421:6eb384212606 11422:89d051701dbc 11423:7717b1631007 11424:b9fbb941754b 11425:da93ceea1735 11426:abb92d07e70b 11427:0cfb882439de 11428:eea9fb62a0ac 11429:a5369599e8e2 11430:523ec0a1287d 11431:baceddc4f635 11432:74f35a3d7fbb 11433:b6267f6db644 11434:cdee74a1089e 11435:29433fdf2c25 11436:dde0ff0d03c5 11437:224494f3776b 11438:973903a1e368 11439:2530d2ff99a4 11440:afd48a1b0579 11441:3ec97ec2d6b3 11442:75e6b8f76493 11443:7152b09972ca 11444:248bb4c34130 11445:4091e0604cf6 11446:495c3a66b77b 11447:70b585556f3a 11448:9b5c701944a0 11449:020a56a35d02 11450:bce68a4d9c7d 11451:f3523aa82eaf 11452:c6335aac3b6f 11453:05f117e0860a 11454:942b3d07107c 11455:e4a29f59ca1f 11456:e54d8a51adbd 11457:4567d3961613 11458:f27b91917a25 11459:2d25b13e1e16 11460:062258fc6311 11461:e2728f62199b 11462:8e38aedcb779 11463:354167e1d6e0 11464:1234a3e20c88 11465:5a2067f50ff6 11466:2ce36fc7edcb 11467:fc9b43d71d74 11468:742e99570459 11469:4fe8b8b759f5 11470:59932b538a99 11471:6a4f0091387c 11472:7bbe517cc440 11473:17d6a84c1131 11474:b69a8e64ef56 11475:48be7dca1673 11476:b7df091c4bdc 11477:728768e20d51 11478:c77fc9697ba2 11479:74bb8914bf3c 11480:98a4c9ca3965 11481:02998e79b299 11482:f5dc082667a4 11483:2823fc86ec4e 11484:db7be151c029 11485:bdef2a9411d1 11486:d1aa4682d543 11487:3aed0191a28a 11488:f7c956b513b9 11489:b4bbb64192d9 11490:648a4bdb05da 11491:ab8b027a2433 11492:f84613fb217b 11493:85eef3d0c452 11494:6f0b88b8e90b 11495:28c3b1ae77e2 11496:9a31d6b770d2 11497:ed37c201b30b 11498:345a888f1cc8 11499:bab3d776fbe1 11500:63cbee9a99c8 11501:8c4dface57ab 11502:8548edad8162 11503:3b107cc501e1 11504:98e26ce42fca 11505:0ed3356761ad 11506:e9b2c94f8885 11507:818487e80c12 11508:53337edafacf 11509:cc0581006660 11510:8642733c3c6c 11511:62f5ae6b9da3 11512:981b27b706b3 11513:dc15bb83a9e4 11514:13a0c12f1a05 11515:45888d8db603 11516:0730819882ef 11517:064afe42c8c1 11518:9a8fc80c1bda 11519:c33fbedd9701 11520:59e7654256bf 11521:3c80f040d01c 11522:272c37ac2065 11523:a02048cc22a8 11524:8afd39a1bf96 11525:517a8d928ff1 11526:aebf5cb8c739 11527:b4deb105eeb5 11528:7cd2009c0d92 11529:552066ce7bb0 11530:2d9217f09358 11531:2191ae0c3645 11532:1923cd04eea6 11533:2337e36aa85a 11534:38cfb9077c7d 11535:f36c27a426d3 11536:ba2ef65a574a 11537:7ab89afad951 11538:a6051846d22a 11539:c39e88bb6ec0 11540:a4791cb00988 11541:d0c4ceff2ed1 11542:21922f773e60 11543:c5915a79665a 11544:d1286a5aace8 11545:029c88bd7c1e 11546:366306144b89 11547:d22ca3e81103 11548:8673ead95d7b 11549:64faf33dd45f 11550:e24d42cc3f0d 11551:a85bf0455f9d 11552:46372960d581 11553:a3c98b6e915e 11554:d5cffe279c93 11555:def0a9ba09d7 11556:f8a9f58a4504 11557:d61d42097161 11558:78ef89e8625d 11559:21adbd05d47a 11560:8cc18fe5e1ab 11561:33f1fcf268c9 11562:5dc78e367b24 11563:1ad8da13a07b 11564:ffac827e91d8 11565:fd69e179df63 11566:ccfe4ba0d9ad 11567:3a177620f8d4 11568:96fd9fcbdfea 11569:c7c3c43d95ae 11570:c12ac1800c40 11571:653c200829f5 11572:85e55b1fe0b4 11573:c2954800bdd1 11574:2638c2d10a22 11575:5ede0f9cc42d 11576:11f5b25b3101 11577:a7e7852038ff 11578:4ca0d3d9cc6a 11579:539ed2cbb715 11580:2f21e5942829 11581:85f8686a27e4 11582:2b09732ef398 11583:b223bb8805b0 11584:8e1db50ce0c9 11585:e65ad02a9b18 11586:b397e6101ca4 11587:7a12d3151516 11588:650660e94520 11589:b8bed562d05e 11590:ee3a9aa56449 11591:c587802f7132 11592:391c55f05893 11593:f3fcb16f98dc 11594:b4fb07622d19 11595:57b89be3a4bd 11596:7d158a43304d 11597:5b294c90df4b 11598:13e004359777 11599:88399d09cb0d 11600:af50539eb2d4 11601:240854fa7436 11602:5982206cea9b 11603:520987bcaf42 11604:2a093c69eb97 11605:be5c5f8460d1 11606:7a79eae1a0f0 11607:1e45ddaf6b41 11608:e8e20a7ef5db 11609:6afbcae60232 11610:3f9827e94cef 11611:8157da54f91b 11612:7f920715b396 11613:29540e7bea7b 11614:e8636e0a74d8 11615:7c06a4423820 11616:221c53743e8e 11617:06e594a32e88 11618:71e4306ab304 11619:5de2bafd5e56 11620:faaaaa50d1cb 11621:b742b8eef14e 11622:0cd3e210fd5b 11623:7dc9d111d571 11624:77fb056c41c0 11625:9e8031049e03 11626:24d21df61bff 11627:079be2dcf490 11628:a8ee461edcfd 11629:782342d24e33 11630:f6053bd4100d 11631:9219ed7dbcb9 11632:451314285094 11633:123815f73e96 11634:feed10966b98 11635:804052cc1cef 11636:4c89be62f315 11637:cbd3010238bb 11638:60d8931e3805 11639:9bd3c671097e 11640:77a5bc4d2f95 11641:4d73938520bf 11642:d8666752d2a9 11643:f5757d6bffe6 11644:1387d9c790f7 11645:fe0dfea31fd4 11646:173a0d5eeda9 11647:09e75a8461af 11648:d19c986752b2 11649:e8dfd4e76807 11650:e4a970520044 11651:30054d0c1472 11652:a47ddb555620 11653:9ee94a2fa4bf 11654:1c3ea3c608bb 11655:07977bc6044c 11656:16cc25535bf6 11657:e8795291f79f 11658:1df69bf3fa6a 11659:d23cc1c31d21 11660:fc64e8fe4a83 11661:a23efcd9f34a 11662:683f1ffe84e8 11663:4e5f415e550e 11664:09bb1b03fb0f 11665:669066e6ca6e 11666:6faa27fff08c 11667:dde7f47dc111 11668:671de08c4f27 11669:091534e0b2e4 11670:a7ede677fb6d 11671:78a942213829 11672:79d93292237f 11673:09fb25b0b663 11674:86d60e992f1e 11675:17d1d35c022e 11676:d8a82cc1036d 11677:b7fe0373b19e 11678:c4fac478fc66 11679:9471bb2b0051 11680:f725860cc7fc 11681:f21c37c4cdf0 11682:b6827ac56b60 11683:1ad2661c1913 11684:26f43198ac3c 11685:a6bcc289709a 11686:57d4f2325a04 11687:b2f61edc3538 11688:1df085b832d1 11689:8a90731d4dbd 11690:52786b94c6c1 11691:44c1ccbb1f29 11692:b1b8693a7b7d 11693:27e59433e13d 11694:62a1567ab884 11695:0b7b2e0c3cf5 11696:2e465cb704da 11697:e97e03a497a9 11698:af0a1dfdf820 11699:ce4b95ac504a 11700:8630ba12de27 Time: real 40.953 secs (user 34.757+0.000 sys 4.165+0.000) The process completed successfully and used an acceptable amount of RAM. hg log -q --time -r "date('2011-12-10 17:27:11 to 2012-02-06 17:27:11') and not 11700:11382" Time: real 38.020 secs (user 34.071+0.000 sys 3.931+0.000) The process completed successfully and used an acceptable amount of RAM. I hope the above help identify the cause. I originally, thought that it was the Merge CSETs as I had 3 other date ranges that I had tried that all yielded the same results and all stopped upon the Merge CSET. I have since tried several other variations and it appears to have just been coincidence that they were all Merges (ie we have a large number of Merge CSETs).
Fixed by http://selenic.com/repo/hg/rev/f7e0d95d0a0b Matt Mackall <mpm@selenic.com> log: remove caching of all visited revisions (issue3253) (please test the fix)
Is there somewhere I can obtain a nightly build for the Windows variant of Mercurial? The closest that I could find was this https://bitbucket.org/tortoisehg/thg-winbuild/downloads and nothing of note mentioned here http://mercurial.selenic.com/wiki/MercurialDevelopmentProcess. I don't have the time to setup a Windows build http://mercurial.selenic.com/wiki/BuildingOnWindows?highlight=%28\bCategoryDeveloper\b%29 ... and I don't know how valid that would be either as it would be a new (unproven) environment.
I recommend trying: http://mercurial.selenic.com/wiki/HackableMercurial
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:27 EDT --- This bug was previously known as _bug_ 3253 at http://mercurial.selenic.com/bts/issue3253