On 2018-07-04 11:06:19, Chris Lamb wrote: >> @wireprotocommand('listkeys', 'namespace') >> def listkeys(repo, proto, namespace): >> d = repo.listkeys(encoding.tolocal(namespace)).items() >> return pushkeymod.encodekeys(d) >> >> And in my tests this is returns as a list of tuples, >> deterministically. > > I'm skeptical, given that after a 30-second (!!) glance pushkey.py uses > a dict underneath. Only a recent Python 3.x defines insertion-order key > ordering and even that may not even be enough if, obviously, they are > inserted in a non-deterministic order.
I am skeptical as well, and yes, it's a dict (.items()), so it should *not* return constant ordering. But I'm just telling you what I am seeing here. The #mercurial devs proposed doing a sorted() here to return constant order, but I am not sure it's a better solution as it changes behavior more fundamentally.. >> ie. just pipe the output through sort to get consistent results. > > Yay! > > FYI I really don't have any secret insight into mercurial, I just > "keep" being CC'd on this ;) I'm fine with removing you from the CC, if you wish... The reason you are in CC is because you were the only one to reply to my original post with feedback. :) A. -- Brief is this existence, as a fleeting visit in a strange house. The path to be pursued is poorly lit by a flickering consciousness. - Albert Einstein