On Mercurial API
TK Soh
teekaysoh at gmail.com
Mon Aug 6 23:48:09 UTC 2007
On 8/6/07, Benoit Boissinot <bboissin at gmail.com> wrote:
> On 8/3/07, TK Soh <teekaysoh at gmail.com> wrote:
> > > contrib/hg-ssh uses:
> > >
> > > from mercurial import commands
> > > commands.dispatch(['-R', repo, 'serve', '--stdio'])
> >
> > What I noticed is that mercurial will remember the options for the
> > subsequent call to 'serve' (or any commands that were called). I had
> > to put in some sort of dirty hack in TortoiseHg to workaround this
> > problem. Is this an oversight in the design?
> >
> Works for me with current crew:
> tonfa at minoglio:~/dev/mercurial/crew$ python
> Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from mercurial import commands
> >>> commands.dispatch(['tip'])
> changeset: 5094:a2c11f49e989
> tag: tip
> parent: 5082:79373ec3f27d
> parent: 5093:84b10dc3dccc
> user: Patrick Mezard <pmezard at gmail.com>
> date: Mon Aug 06 10:57:51 2007 +0200
> summary: Merge with crew-stable
>
> >>> commands.dispatch(['-q', 'tip'])
> 5094:a2c11f49e989
Try this:
>>> from mercurial import commands
>>> commands.dispatch(['log', '-r', '0'])
changeset: 0:9117c6561b0b
user: mpm at selenic.com
date: Tue May 03 13:16:10 2005 -0800
summary: Add back links from file revisions to changeset revisions
>>> commands.dispatch(['log', '-r', 'tip'])
changeset: 0:9117c6561b0b
user: mpm at selenic.com
date: Tue May 03 13:16:10 2005 -0800
summary: Add back links from file revisions to changeset revisions
changeset: 5050:2bd996d0aaf8
tag: tip
user: Brendan Cully <brendan at kublai.com>
date: Wed Aug 01 15:16:42 2007 -0700
summary: convert: (svn) simplify _find_children
More information about the Mercurial
mailing list