I'm currently working to migrate an existing project of ours from svn to mercurial.
I need to find a solution to the following use case:
A build server currently exists that grabs an svn repository via "svn export" over http (locally on the LAN). This obviously doesn't require user/password to be supplied.
Then the project is built, packaged, and copied as binary to a designated storage, while the unversioned copy is discarded.
All I could find in Mercurial as equivalent is "hg archive" which requires me to clone the repository first and thus supply credentials.
Is there any way to get an unversioned copy of a repository without supplying credentials?
Thanks for your help.
EDIT: Forgot to mention, server unfortunately runs a windows machine.
You need to revise your method. Doing the equivalent of an export, or even cloning the repo over and over again is not necessary with mercurial, and is a waste of time.
Instead,
cloneonce, and onlypullandupdatewhen triggering a build. The whole repository remains in your workspace, and pulling ensures you get the latest revision in your repo. Once your repo is up-to-date, you can update to any revision you want. With the update, it is also possible to clean your folder, if you want to replicate the old behavior. While cleaning up your workspace is not mandatory, it might be a good practice to do so for your build server.If this solves your password issue, then you don't need to look any further. If you still need some information on how to provide credentials during pull, however, read this question/answer.
EDIT: So you still need read-only access for the build server, and in that case, you will need to resort to a different server for you mercurial repo. Rhodecode offers some option for this, read this.