[MERGE] Nicer default attachment names in bzr send

James Westby jw+debian at jameswestby.net
Fri Mar 7 19:30:46 GMT 2008


On Fri, 2008-03-07 at 18:27 +0000, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all,
> 
> This patch implements a nicer naming approach for attachments in bzr
> send.  It uses the branch nick, plus the (possibly dotted) revno, to
> give some semblance of uniqueness and sequence.
> 
> For example, the filename of this merge directive is "send-nick-3253.patch".

Yeah,

bb:cool from me too.



> +    def test_disk_name(self):
> +        tree_a, tree_b, branch_c = self.make_trees()
> +        tree_a.branch.nick = 'fancy-name'
> +        md = self.from_objects(tree_a.branch.repository, 'rev2a',
> 500, 120,
> +            tree_b.branch.base)
> +        self.assertEqual('fancy-name-2',
> md.get_disk_name(tree_a.branch))
> +
> +    def test_disk_name_old_revno(self):
> +        tree_a, tree_b, branch_c = self.make_trees()
> +        tree_a.branch.nick = 'fancy-name'
> +        md = self.from_objects(tree_a.branch.repository, 'rev1', 500,
> 120,
> +            tree_b.branch.base)
> +        self.assertEqual('fancy-name-1',
> md.get_disk_name(tree_a.branch))
> +

There's no dotted revno test here, but I realise the merge to do this
would be a hassle, and the code looks simple enough.

Thanks,

James





More information about the bazaar mailing list