[PATCH] tag: allow multiple tags to be added or removed
John.Coomes at sun.com
Wed Mar 12 01:25:41 CDT 2008
Matt Mackall (mpm at selenic.com) wrote:
> On Tue, 2008-03-11 at 12:23 -0700, John Coomes wrote:
> > Matt Mackall (mpm at selenic.com) wrote:
> > > John Coomes wrote:
> > > > Thomas Arendsen Hein (thomas at intevation.de) wrote:
> > > >> * John Coomes <John.Coomes at sun.com> [20080223 09:33]:
> > > >>> Patch to allow multiple tags to be added/removed in a single invocation
> > > >>> of hg tag. Basic example of the new usage is
> > > >> ...
> > > >>> + tag_word = (len(names) > 1 and _('tags')) or _('tag')
> > > >> Some languages use singular for 21, 31, ... so this will get you (or
> > > >> others) in translation hell :)
> > > >
> > > > I'll use i18n.t.ngettext() for this as suggested by Martin.
> > >
> > > No, don't. We intentionally ignore the whole pluralization issue, it's
> > > just not worth the complexity. For us or for parsers.
> > No problem. Say we've run the commands "hg tag beta-1" and "hg tag
> > beta-2 build-24". What should the respective commit messages look
> > like?
> > (a) Added tag beta-1 for changeset abcdefabcdef
> > Added tag beta-2, build-24 for changeset fedcbafedcba
> > (b) Added tag beta-1 for changeset abcdefabcdef
> > Added tag beta-2 and tag build-24 for changeset fedcbafedcba
> > (c) Added tag(s) beta-1 for changeset abcdefabcdef
> > Added tag(s) beta-2, build-24 for changeset fedcbafedcba
> And there's also:
> (d) Added tag beta-1..
> Added tag beta-2..
> Added tag build-24..
> That is, just put two lines in the commit. The downside, of course, is
> that you only get part of the picture with the short log message.
> I'd go with (a), because it's obvious what happens with 3 tags:
> Added tag a, b, c... (ie tags.join(", "))
> while b might give you either
> Added tag a, b, and c... (complicated, but standard English)
> Added tag a and b and c (ie tags.join(" and "))
FWIW, for (b) I was going to use " and tag ".join(tagnames) for a
Added tag a and tag b and tag c for changeset ...
But I'll go with (a) unless I hear something more.
More information about the Mercurial-devel