[MERGE] add -c option to merge command (#141368)
Ian Clatworthy
ian.clatworthy at internode.on.net
Mon Sep 24 02:57:04 BST 2007
Alexander Belchenko wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Actually adding -c option was quite trivial, but as usual test for changes
> is much bigger than actual changes.
Sweet.
bb:tweak
> + def assertDirectoryContent(self, directory, entries, message=''):
> + """Assert whether entries (files or directories) are exist
> + in some directory. It's also check that there is no extra
> + entries.
> + """
As this is an internal method, I'd prefer a leading underscore on the
name. Some minor English grammar fixes needed as well. I suggest this ...
"""Assert whether entries (file or directories) exist in a directory.
It also checks that there are no extra entries.
"""
> + ondisk = sorted(os.listdir(directory))
> + if set(ondisk) == set(entries):
> + return
As you're comparing sets, I think the sorted() bit is not required. If
you want to sort for the purposes of output, I'd sort after the return
and sort both ondisk and entries.
Ian C.
More information about the bazaar
mailing list