On Mercurial API

TK Soh teekaysoh at gmail.com
Wed Aug 8 18:41:56 CDT 2007


On 8/9/07, Thomas Arendsen Hein <thomas at intevation.de> wrote:
> 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 = []

Strange. IIRC, deepcopy wouldn't work due to the func data in the structure.


More information about the Mercurial mailing list