bring tulip up-to-date with mercurial branch,

also included is changes made in discussion https://groups.google.com/forum/?fromgroups#!topic/python-tulip/TpZWwXUh2zg, to be submitted as a patch seperately to the Mercurial base.