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

Steve Borho steve at borho.org
Sat Apr 10 15:16:00 CDT 2010


On Fri, Apr 9, 2010 at 11:28 PM, Brendan Cully <brendan at kublai.com> wrote:
> On Friday, 09 April 2010 at 22:41, Steve Borho wrote:
>> On Fri, Apr 9, 2010 at 7:22 PM, Dan Villiom Podlaski Christiansen
>> <danchr at gmail.com> wrote:
>> > 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.)
>>
>> We're recording the revision number you'll be rolling back to, not the
>> revision(s) being destroyed.  Transactions are inherently local, you
>> only ever run rollback on local repositories, so storing and reciting
>> a revision number does not seem out of place.  But I'm curious how
>> others feel about this.
>
> I agree that revision numbers are fine for rollback. I do wonder if it
> might be nice to capture the transaction source as well as type in the
> description:
>
> rolling back pull from http://foo/
> rolling back unbundle from ../foo.bundle
>
> etc.

I tried this, but in many operations the provided url is more noise
than information.  Something maybe with a little intelligence could be
added after my patch series is pushed.

--
Steve Borho


More information about the Mercurial-devel mailing list