Windows to Linux and vice-versa
Matt Mackall
mpm at selenic.com
Wed Sep 28 20:09:00 UTC 2011
On Wed, 2011-09-28 at 20:55 +0100, cwr at netcom.co.uk wrote:
> Quoting Martin Geisler <mg at lazybytes.net>:
>
> > cwr at netcom.co.uk writes:
> >
> >> I've been trying to access Mercurial archives on Linux from Windows,
> >> and on Windows from Linux, and some of it works and some of it
> >> doesn't.
> >>
> >> The Windows box is Windows 7 64-bit, running the standard binary
> >> package of 32-bit Mercurial. The Linux box is a recent 32-bit linux.
> >> Both machines are running Mercurial 1.9.2, both are on the same
> >> network, and neither have firewalls enabled. Each machine can ping the
> >> other and mount the other's exported Samba directories.
> >
> > Okay, then you have network connectivity. Just for completeness: it's
> > fine that you mention it, but Mercurial can push/pull between any
> > combination of CPU architectures.
> >
> Yes, I mentioned it because it may be Mercurial's problem, or it may
> be a problem with the underlying Python.
I can say with confidence that it's neither. Mercurial and Python's
underlying interaction with TCP sockets and resolver libraries is both
extremely generic and time-tested. If the issue isn't at the HTTP or SSL
certificate levels, it's definitely not our problem.
> >> With "hg serve" running on the Windows box, viewing
> >> http://windows_ip:8000 on the Linux box shows the Mercurial project,
> >> ie. acts correctly, and so does "hg clone http://windows_mac". (I used
> >> IPv4 addresses to rule out name lookup problems).
> >>
> >> With "hg serve" running on the Linux box viewing the Mercurial project
> >> still works, but "hg clone" fails with (among other errors)
> >> getaddrinfo failed.
> >
> > Okay -- it's always a good idea to show us the errors in such a
> > sitation. Otherwise we'll have to guess what exact command you typed and
> > what errors you got.
> >
> > So let me guess... :-) You say you can see the "Mercurial project" from
> > both machines. By that I assume you see a page like this
> >
> > http://selenic.com/hg/
> >
> > that shows the recent commits? What you see it "hgweb", the built-in
> > webserver started with "hg serve".
> >
> Yes, I couldn't recall the name of the page - actually it's formally
> known as the log page, it seems.
>
> > If you can see that, then you can also clone the repositories. Use the
> > exact same URL as you use in your browser. Above, you wrote that you can
> > see the project at
> >
> > http://windows_ip:8000
> >
> > Listening on port 8000 is the default behavior of "hg serve", so this
> > sounds good. But then you write that you can clone
> >
> > http://windows_mac
> >
> > That sounds weird -- you should be able to clone http://windows_ip:8000,
> > but I don't know what windows_mac is? The MAC address of the machine?
> >
> windows_mac is a misprint for windows_ip - sorry.
>
> > In any case -- if you can see hgweb in your browser, then you can also
> > clone that same URL with the command line client.
> >
> Well, no, I can't, and the Wireshark traces show why. What I don't know
> is what's causing the SYN/ACK failure in one case, and not in the other,
> given that view the log page works in both cases.
My suspicion is you have something like a personal firewall on your
Windows box that's quietly refusing outgoing connections by 'weird
programs' like Mercurial.
Both your browser and the hg client speak HTTP to the same port on
server. For that to break, something on the client must be
distinguishing between the two before a packet even leaves your box.
(Crucially, you didn't tell us which host was running Wireshark. I
assume it's on the Windows side. My theory is that if you run it on the
Linux side, you'll never see the packets arrive.)
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list