On Mercurial API
Thomas Arendsen Hein
thomas at intevation.de
Wed Aug 8 11:03:11 CDT 2007
* TK Soh <teekaysoh at gmail.com> [20070808 06:44]:
> On 8/8/07, Thomas Arendsen Hein <thomas at intevation.de> wrote:
> > * TK Soh <teekaysoh at gmail.com> [20070807 01:52]:
> > > 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
> >
> > Good catch, I can reproduce this with stable and main.
>
> Don't think I should call it a bug, but any plan on fixing this?
I call it a bug.
Quick and dirty fix (can't do more currently):
diff -r dc2e512cb89a mercurial/cmdutil.py
--- a/mercurial/cmdutil.py Tue Aug 07 15:56:26 2007 +0200
+++ b/mercurial/cmdutil.py Wed Aug 08 18:00:58 2007 +0200
@@ -7,7 +7,7 @@
from node import *
from i18n import _
-import os, sys, atexit, signal, pdb, traceback, socket, errno, shlex
+import os, sys, atexit, signal, pdb, traceback, socket, errno, shlex, copy
import mdiff, bdiff, util, templater, patch, commands, hg, lock, time
import fancyopts, revlog, version, extensions, hook
@@ -211,7 +211,7 @@ def parse(ui, args):
defaults = ui.config("defaults", cmd)
if defaults:
args = shlex.split(defaults) + args
- c = list(i[1])
+ c = list(copy.deepcopy(i[1]))
else:
cmd = None
c = []
--
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Osnabrueck - Register: Amtsgericht Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
More information about the Mercurial
mailing list