[PATCH V2] url: use open and not url.open for local files (issue3624)
Matt Mackall
mpm at selenic.com
Wed Oct 31 15:21:27 CDT 2012
On Tue, 2012-10-30 at 18:25 -0700, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1350534608 25200
> # Node ID 7e319668f2a9a032b0211652fd86e4b480396a33
> # Parent 917a37b76845811aaea1dc9b1ad0a8110e8b7439
> url: use open and not url.open for local files (issue3624)
I've queued a slightly modified version of this:
> +def openpath(ui, path, *args, **kwargs):
> + '''open path with open if local, url.open if remote'''
> + if islocal(path):
> + return open(util.urllocalpath(path))
> + else:
> + return url.open(ui, path, *args, **kwargs)
These extra args don't really make sense for this interface, which is
used to turn URL/file command-line arguments into file descriptors in
"the usual way", so they've been dropped.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list