[PATCH] Fix the path problem on Windows that prevents to run
hg from its own repository
Giuseppe Bilotta
bilotta78 at hotpop.com
Mon Jul 4 04:33:21 CDT 2005
On Sun, 03 Jul 2005 19:05:22 -0400, Kevin Smith wrote:
> Giuseppe Bilotta wrote:
>> On Sun, 03 Jul 2005 03:02:16 -0400, Andrew Thompson wrote:
>>
>>>Matt Mackall wrote:
>>>
>>>>On Sat, Jul 02, 2005 at 02:54:14PM +0200, Giuseppe Bilotta wrote:
>>>>
>>>>>This also uses the appropriate command (.append() instead of .extend()
>>>>>... sorry, I used the wrong version in the other patch ...)
>>>>
>>>>Ok, still waiting for other Windows folks need to speak up as to
>>>>whether this patch is really needed.
>>>
>>>NOTE: I don't have a 100% clean machine to test on right now.
>>>
>>>Mercurial is currently able to run properly even when looking at a
>>>repository of Mercurial on my Windows box
>>>
>>>D:\rootpull>hg version
>>>Mercurial version 38d106db75bc
>>
>> The question is: is rootpull a *clean* copy of the hg repository,
>> without compiled stuff in it?
>>
>
> I don't have a windows box to test on, so I'm trying to understand what
> the actual problem is. I would have thought that the problem would
> happen if the files in the mercurial directory within the current
> directory didn't match those in the installed mercurial directory.
>
> Is the problem when you run hg from a directory that doesn't actually
> contain hg, but which has a mercurial directory, and that mercurial
> directory doesn't match what is installed?
>
> I would like to really understand the current problem before supporting
> or opposing a solution.
Very simple. With an unpatched hg script this is what I get:
> c:\Documents and Settings\Giuseppe Bilotta\My Documents\hg-repos>hg clone http://selenic.com/hg clean-hg
> requesting all changes
> adding changesets
> adding manifests
> adding file revisions
> modified 145 files, added 609 changesets and 1256 new revisions
>
> c:\Documents and Settings\Giuseppe Bilotta\My Documents\hg-repos>cd clean-hg
>
> C:\Documents and Settings\Giuseppe Bilotta\My Documents\hg-repos\clean-hg>hg status
> Traceback (most recent call last):
> File "c:\tools\mercurial\hg", line 17, in ?
> from mercurial import commands
> File "C:\Documents and Settings\Giuseppe Bilotta\My Documents\hg-repos\clean-hg\mercurial\commands.py", line 9, in ?
> import fancyopts, ui, hg, util
> File "C:\Documents and Settings\Giuseppe Bilotta\My Documents\hg-repos\clean-hg\mercurial\hg.py", line 10, in ?
> from revlog import *
> File "C:\Documents and Settings\Giuseppe Bilotta\My Documents\hg-repos\clean-hg\mercurial\revlog.py", line 12, in ?
> from mercurial import mdiff
> File "C:\Documents and Settings\Giuseppe Bilotta\My Documents\hg-repos\clean-hg\mercurial\mdiff.py", line 8, in ?
> import difflib, struct, bdiff
> ImportError: No module named bdiff
>
> C:\Documents and Settings\Giuseppe Bilotta\My Documents\hg-repos\clean-hg>
Because the current dir is checked first, and since it has a
'mercurial' directory, Python thinks the mercurial module to be
lodaded is this one (which is obviously false because it does not
contain the required binaries ...)
--
Giuseppe "Oblomov" Bilotta
"I weep for our generation" -- Charlie Brown
More information about the Mercurial
mailing list