[PATCH 1 of 3] localrepo: add desc parameter to transaction

Dan Villiom Podlaski Christiansen danchr at gmail.com
Fri Apr 9 19:22:18 CDT 2010


Hi,

I like the idea, but I have two questions about this:

First, are you certain that the revision number is a meaningful identifier? In most cases, rollback will be used without the --dry-run parameter, so you'll essentially be saying ‘destroying X’ after which X no longer refers to anything. (It seems to me that using the revision number is inconsistent with the rest of Mercurial; generally, the hash is used to refer to revisions. This has the advantage of retaining the ‘meaning’ of the identifier and making two separate rollbacks print out different messages.)

Second, the localised message will be stored on disk, possibly confusing users. The user performing the rollback may not be the same one that performed the operation… Wouldn't it be better to store the untranslated message on disk, and delay translation to when it is displayed?

Also, localisation support is somewhat inconsistent:

On 10 Apr 2010, at 00:33, Steve Borho wrote:

> -            tr = repo.transaction()
> +            tr = repo.transaction("MQ apply")

This message isn't translated…

> -        tr = self.transaction()
> +        tr = self.transaction(_("changegroup from %s") % srctype)

…but this one is…

> -    tr = repo.transaction()
> +    tr = repo.transaction("strip")

…and this one isn't :)

--

Dan Villiom Podlaski Christiansen
danchr at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1943 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100410/1d8d61b0/attachment.bin>


More information about the Mercurial-devel mailing list