Patch for bug 1202

Matt Mackall mpm at selenic.com
Wed Jun 25 16:45:06 CDT 2008


On Wed, 2008-06-25 at 21:35 +0100, Martin OConnor wrote:
> Hi,
> I have a patch for bug 1202 as follows
> 
> # HG changeset patch
> # User Martin OConnor <martinoc at gmail.com>
> # Date 1214419303 -3600
> # Node ID 092d98a51ed75aeeb8a4437f560c4c4423e33597
> # Parent  2e58f1a3604682a4fdfe40817150ccc12e76b25e
> Bug:1201 hg convert on CVS working copy produces Traceback
> 
> Fix identified by frank at kingswood-consulting.co.uk
> 
> Changed usage fron os.environ["HOME"] to expanduser("~/.cvspass") as 
> this is the
>  only usage of this construct in mercurial sources.
> 
> diff -r 2e58f1a36046 -r 092d98a51ed7 hgext/convert/cvs.py
> --- a/hgext/convert/cvs.py      Tue Jun 24 09:33:13 2008 +0200
> +++ b/hgext/convert/cvs.py      Wed Jun 25 19:41:43 2008 +0100
> @@ -161,7 +161,7 @@
> 
>                  if not passw:
>                      passw = "A"
> -                    pf = open(os.path.join(os.environ["HOME"], ".cvspass"))
> +                    pf = open(os.path.expanduser("~/.cvspass"))
>                      for line in pf.read().splitlines():
>                          part1, part2 = line.split(' ', 1)
>                          if part1 == '/1':

Queued, thanks.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list