$ hg log -G -r 'date("2014-08-22")' On the MacPorts repo, that will result in a lot of changesets. For a portfile, you really must specify a commit hash. In the py-sphinx-contrib port, I use '0.0.YYYYMMDD' for the version. If the project ever decides to tag a version, then that will be higher than the one I made up. Also, it's clear from reading the version that it's a made up one.