Wombling in the general direction of...

Nothing doing anything useful here, as yet
Demonstrate sort_domains work, and use it
Fix bugs in test
Heh, proper domain name sorting
More work, but breaks test_stamp.py
Only do the (not working) thing if -slow

Protect the old functionality of the "pull" command as the default,
at least for the moment, so that tests pass. This seems like the
sanest way to proceed.

A decision can be made later as to which mechanism should be the
actual default.
A new test that doesn't do much as yet

The repositories are taken from test_domain.py
Look, now I can see the problem in action
Cloning should contribute to _just_pulled.

When doing a "muddle pull" causes new things to be checked out
(cloned), as it can do in the new mechanism, then such should
count in _just_pulled.

Indeed, there's some sense in regarding "muddle checkout" as
setting _just_pulled.

Of course, in that case any new build descriptions "pulled"
because of subdomain changes should also count, which they
don't yet.
Some renaming and other tweaks
Attempt not to lose subdomain _just_pulled

(not that it includes "muddle checkout" as well)
Add a new simpler test, amend debugging info
Ah, that's what I was missing

When I reload the build description, the new builder.db has an
empty set in its builder.db.just_pulled, so if I want it to have
memory of the early value of just_pulled, I need to reinstate it
"by hand".

Which is obvious and so icky.
Make test_basics work again

(and fix some things which appear to have bit-rotted)
Better label sorting

Label sorting (a) now uses __eq__ and __lt__, instead of __cmp__
(which is how we're meant to do it these days), and (b) now sorts
domain names properly, consonant with utils.sort_domains().

And there is a little mild testing of that latter.
A little more testing, a little tidying
A better solution for total ordering
OK, that *was* a stupid bug

Writing the Label __lt__ method correctly makes it work so much
better...
Some progress, stopping for the day now

(test still broken)
So that's now passing