[PATCH] rawcommit fix again

Radoslaw Szkodzinski astralstorm at gorzow.mm.pl
Sun Jun 19 07:51:52 UTC 2005


On Sun, 19 Jun 2005 00:24:12 -0400
Christopher Li <hg at chrisli.org> wrote:

> Rawcommit need to allow no argument when using file list options.
> 
> Chris
> 
> 
> Index: hg/mercurial/commands.py
> ===================================================================
> --- hg.orig/mercurial/commands.py	2005-06-19 00:18:45.000000000 -0400
> +++ hg/mercurial/commands.py	2005-06-19 00:22:08.000000000 -0400
> @@ -520,7 +520,7 @@
>          os.kill(child, signal.SIGTERM)
>          return r
>  
> -def rawcommit(ui, repo, flist, **rc):
> +def rawcommit(ui, repo, *flist, **rc):
>      "raw commit interface"
>  
>      text = rc['text']
> @@ -531,7 +531,7 @@
>          print "missing commit text"
>          return 1
>  
> -    files = relpath(repo, flist)
> +    files = relpath(repo, list(flist))

This is wrong, flist is already a list because of the star.
You don't need to wrap it inside another.

>      if rc['files']:
>          files += open(rc['files']).read().splitlines()
>          
> Index: hg/mercurial/revlog.py
> ===================================================================

AstralStorm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20050619/5f44a4a2/attachment-0001.asc>


More information about the Mercurial mailing list