Search code examples
mercurialdvcsrhodecode

Rhodecode Repository Files


I have installed Rhodecode (mercurial server) on an Ubuntu machine. I specified the repository directory during the setup. I created a new repository using the Rhodecode web interface and was able to clone this empty repository from another machine. I added a few files and pushed my changes to the server. I can see that the push was successful on the web interface and I can see the files on the web interface as well. However, there are no files in the repository folder on the server. Is this normal? Shouldn't the source files appear in the server's repository folder? I am able to clone and push changes and my changes are tracked.


Solution

  • This is normal. That push puts the changes in the server's repository but doesn't do anything to the server's working directory. If you wanted to see the files in there you'd do hg update tip which says "make the working directory look like the most recent changeset in the repository".

    That, however, isn't usually considered a good idea on a server. On a server you don't want the files hanging around because people may edit them and not commit. Instead have working directories on machines where you develop and run tests, and on the server keep the working directories empty.

    If you ever hg update tip a repository into a situation where it has files in the working directory you can get back to no files but doing hg update null which says "go back to how things looked before the first changeset".

    Git has something similar to this called a "bare repository", but those also have a different in depth (the stuff that would be in the .git directory is instead at the top level).