Can't commit any changes?

Haszlakiewicz, Eric EHASZLA at transunion.com
Tue Jan 11 17:39:02 CST 2011


>-----Original Message-----
>From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com]
>
>Gosh, Mike, thanks for taking the time to write.  I had already found
>that page but clearly my definition of "simple" isn't at all matching
>the Mercurial concept.  In the "quick start" I saw that you clone via
>http...didn't realize that didn't allow for the full circle to happen.
>
>Really, I need a simple step by step walk-through (if there is such a
>thing) for setting up a repository that people can write and read to.
>I'm not sure why it matters whether it's /usr/var/www/html or
>/some/other/directory.  Users are hoping to use a Mac client called Hg
>(a gui) to do most of the work.
>
>How exactly does one return a cloned repo back to the pool so others
>can find it, access it, and make new changes?

pool?  There is no "pool".  A cloned repo is just a directory sitting on your local machine.

>In our case, our developers want to be able to quickly and immediately
>see how the changes look on the web, hence the need to publish to the
>/var/www/html directory.
>
>Is there a syntax so that instead of "publishing by http" they can
>publish some other fashion?  Does Mercurial usually require people be
>on the same local machine?  If so, it seems kind of impractical.
>
>Again, thank you for the help.  I guess coming from a mindset of FTP
>or so on, I feel like it should be a relatively easy thing to use
>Mercurial over a intranet or the internet.  I need people to be able
>to be home and still able to clone, make changes, and return their
>files back to the pool.
>
>Am I just barking up the wrong tree entirely?  Is this what Mercurial
>does?  Or should I investigate other version control options?  Or just
>tell people they need the command line and they have to ssh directly
>into the /var/www/html directory to do any work?

It sounds to me like you're confusing a version control tool with a 
deployment tool.  Mercurial isn't meant to be used to deploy your changes to 
a web server.  For that you probably want to keep using FTP, or whatever 
you're already using.

When you push changes to a central mercurial repository, you're actually 
synchronizing the internal state of the repository that describes the entire 
history of changes.  A push does not actually update the files that you work 
with directly.  On the server, the only thing you'll see in the repository 
is a .hg directory.

Perhaps you're getting confused because Mercurial happens to perform this 
synchronization over http, but that is not related to whether the files you 
are editing with happen to be a web page.

If you want to have pushed changes automatically show up as a website in the
same server you might be able to do that with a hook on the server.  For 
that, you'll need a location for the repository, which is treated by the web 
server as a mercurial repository (due to a line like 
ScriptAliasMatch ^/hg(.*) /httpd/cgi/hgwebdir.cgi$1
in your apache config), and a *separate* location with clone of the main 
repository that you run "hg update" on (through the hook) to cause all the 
files to show up.

eric


More information about the Mercurial mailing list