[PATCH] [PATCH 04 of 11 RFC] histedit: add execute function (issue4036)
Olle
olle.lundberg at gmail.com
Wed Mar 5 14:11:44 CST 2014
On Wed, Mar 5, 2014 at 7:56 PM, David Soria Parra <dsp at experimentalworks.net
> wrote:
> Olle <olle.lundberg at gmail.com> writes:
>
> > On Wed, Mar 5, 2014 at 7:00 PM, David Soria Parra
> > <dsp at experimentalworks.net> wrote:
> >
> > Olle Lundberg <olle.lundberg at gmail.com> writes:
> > >
> > > +def execute(ui, repo, ctx, cmd, opts):
> > > + hg.update(repo, ctx.node())
> > > + rc = util.system(cmd)
> >
> >
> > I think it would be nice to populate a HGREVISION and HGNODE
> > environment
> > variable at this point.
> >
> > Ok. Will add that.
> >
> > The issue with running commands from within mercurial is that
> > mercurial holds an exclusive lock over the whole repo. Which means
> > that a tool can not do any commits of their own. They can just leave
> > the wd in a dirty state and the user have to commit and --continue by
> > herself.
> >
>
> I think you want to drop locks before util.system and reaquire them
> afterwards. Reaquiring locks will also properly invalidate dirstate
> and manifest.
>
Re-sending your reply to the list.
--
Olle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20140305/f5402866/attachment.html>
More information about the Mercurial-devel
mailing list