[PATCH] hook: fix full path imports on Windows (issue1779)

Dirkjan Ochtman dirkjan at ochtman.nl
Fri Aug 7 06:20:13 CDT 2009


On Fri, Aug 7, 2009 at 06:19, Steve Borho<steve at borho.org> wrote:
> # HG changeset patch
> # User Steve Borho <steve at borho.org>
> # Date 1249526754 18000
> # Node ID 655912763155035408371e67eea4aa3157fd7f03
> # Parent  fb66a7d3f28f69e96369b8d69fc6d775837b40e4
> hook: fix full path imports on Windows (issue1779)
>
> Bottom portion fixes full path imports on source installs on Windows.
> The top portion further fixes full path imports on binary installs.
>
> Initial patch by Roman V. Kiseliov
>
> diff -r fb66a7d3f28f -r 655912763155 mercurial/hook.py
> --- a/mercurial/hook.py Wed Aug 05 17:19:37 2009 +0200
> +++ b/mercurial/hook.py Wed Aug 05 21:45:54 2009 -0500
> @@ -27,6 +27,13 @@
>             raise util.Abort(_('%s hook is invalid ("%s" not in '
>                                'a module)') % (hname, funcname))
>         modname = funcname[:d]
> +        oldsyspath = sys.path[:]

I think oldsyspath is a little wordy (oldpaths?). Otherwise looks alright.

Cheers,

Dirkjan



More information about the Mercurial-devel mailing list