[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: [Subclipse-dev] [PATCH] Passing on complete environment to command-line client

From: Martin Letenay <mle_at_whitestein.com>
Date: 2006-05-31 10:50:21 CEST

> An issue has been identified concering the inability of command-line
> client to resolve network addresses if executed with incomplete
> environment.
>
> If the repository base url was specified as: "svn://localhost/.." the
> following exception occurred:
> org.tigris.subversion.svnclientadapter.SVNClientException:
> org.tigris.subversion.svnclientadapter.commandline.CmdLineException:
> svn: Unknown hostname 'localhost'
>
> If the repository base url was specified as "svn://127.0.0.1/.." the
> following exception occurred:
> org.tigris.subversion.svnclientadapter.SVNClientException:
> org.tigris.subversion.svnclientadapter.commandline.CmdLineException:
> svn: Can't create socket: The requested service provider could not be
> loaded or initialized.
>
> The suggested workaround (included in patchfile
> CompleteEnvironment.patch) is to execute svn.exe with the complete set
> of environment variables.

Well, mystery solved.
It took nearly all of my yesterday's available time, but at the end, it made
sense.

I really hate the pre-Java1.5 hack for getting the list of environment
variables (via exec(cmd.xex)),
so I was not that much pleased with the proposed patch.

From reasons not completely understandable to me, when invoking
runtime.exec() with specified array of env variables,
the other variables from parent process are not copied.
Only PROMPT and PATHEXT are there, but I assume it's set by cmd.exe
explicitely.

Anyway, the whole resolving problem was caused by missing %SystemRoot%
variable.
It seems that windows' resolver stubbornly tries to check the
%SystemRoot%/system32/drivers/etc/hosts and when that variable is not set,
it fails to resolve anything. Interesting...

I'll commit a proper fix sometime this afternoon.

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: dev-help@subclipse.tigris.org
Received on Wed, 31 May 2006 10:50:21 +0200

This is an archived mail posted to the Subclipse Dev mailing list.