HgWebDir on Windows problem, more of

Ezra.Smith at bentley.com Ezra.Smith at bentley.com
Mon Dec 17 21:16:07 UTC 2007


It's definitely possible to do on Windows, yes. I'm using IIS instead of
Apache, though.

> Entering http://localhost/test/repos/hgwebdir.cgi via the browser I
can get the list of repositories.

Can you get any further than that in the web interface? Can you look at
a repo's contents, changesets, etc? One of the first issues we ran into
when setting up IIS was that we could see the repository list, but we
couldn't go any deeper than that.

In our case, we needed to let the server know that any path with
hgwebdir.cgi in it should really be running hgwebdir.cgi as a script
still, instead of considering it a subdirectory that other files may be
in.

Hgwebdir.cgi is just accepting paths that don't actually exist (like
http://localhost/test/repos/hgwebdir.cgi/myrepo/rev/53d0d4a2f264) and
mapping them to nicely templated data from your repository. If the
mapping isn't actually working, you're not going to be able to pull
anything. You would, of course, be able to make local clones normally,
since that doesn't involve hgwebdir at all.

-Ezra


-----Original Message-----
From: mercurial-bounces at selenic.com
[mailto:mercurial-bounces at selenic.com] On Behalf Of Terry
Sent: Sunday, December 16, 2007 5:46 AM
To: mercurial at selenic.com
Subject: HgWebDir on Windows problem, more of

We have a Windows2000 box with the following installed at the machine
level-
    Apache 2.2.6
    Mercurial 0.9.5 (Packaged by Lee Cantey)
    Python 2.4.4

I have followed the HgWebDirStepByStep Web page instructions.

Entering http://localhost/test/repos/hgwebdir.cgi via the browser I can
get the list of repositories.
But, testing cloning over http I get the following results-

C:\Data\wc2>hg clone http://localhost/test/repos/hgwebdir.cgi/Demo1
destination directory: Demo1
abort: 'http://localhost/test/repos/hgwebdir.cgi/Demo1' does not appear
to be an hg repository!

I have no problems cloning within the filesystem-

C:\Data\wc1>hg clone "C:/Program Files/Mercurial/WWW/server/Repos/Demo1"
destination directory: Demo1
5 files updated, 0 files merged, 0 files removed, 0 files unresolved

Apache configuration is as follows-

  Alias /test/repos/ "C:/Program Files/Mercurial/WWW/server/cgi/"
  <Directory "C:/Program Files/Mercurial/WWW/server/cgi">
    Order allow,deny
    Allow from all
    AllowOverride None
    Options ExecCGI
    AddHandler cgi-script .cgi
  </Directory>

With the following folder structure-

C:
  Program Files
    Mercurial
      Contrib
      Docs
      Lib
      WWW
        server
          cgi
            hgweb.config
            hgwebdir.cgi (will only work under Mercurial!)
          Repos
            Demo1
            Demo2

I have used the following hgweb.config entries, all producing the same
result-

#Version 1
[paths]
Demo1 = C:/Program Files/Mercurial/WWW/server/Repos/Demo1
Demo2 = C:/Progra~1/Mercurial/WWW/server/Repos/Demo2

#Version 2
[paths]
Demo1 = /Program Files/Mercurial/WWW/server/Repos/Demo1
Demo2 = /Progra~1/Mercurial/WWW/server/Repos/Demo2

#Version 3
[collections]
\Program Files\Mercurial\WWW\server\Repos = /Program
Files/Mercurial/WWW/server/Repos

#Version 4
\Progra~1\Mercurial\WWW\server\Repos =
/Progra~1/Mercurial/WWW/server/Repos

Is it possible to serve repositories from a Windows machine using
hgwebdir.cgi?
If so what am I doing wrong.  Thank you.

Terry


_______________________________________________
Mercurial mailing list
Mercurial at selenic.com
http://selenic.com/mailman/listinfo/mercurial




More information about the Mercurial mailing list