[PATCH V2] revert: add support for reverting subrepos

Greg Ward greg-hg at gerg.ca
Sat Oct 15 10:28:38 CDT 2011

On Fri, Oct 14, 2011 at 6:27 PM, Angel Ezquerra
<angel.ezquerra at gmail.com> wrote:
>>> +    wlock = repo.wlock()
>> This lock should be in the top-level function. Releasing and retaking a
>> lock in the middle of an operation is just as bad as not taking it all.
> I don't really know what lock does (though I kind of suspect it) but
> it'd be nice to get a short explanation :-)

I had that problem too when I first started hacking on Mercurial. So I
wrote some docstrings, sent in patches with the docs, and
hey-what-do-you-know, localrepository.lock() and wlock() are now
usefully documented. Writing docstring patches is an excellent way to
learn your way around the code *and* earn brownie points.


More information about the Mercurial-devel mailing list