I have a local repository that I have now decided to push to a remote server (for example, I have a host that allows mercurial repositories and I am also trying to push to bitbucket). The repository has a lot of files and is a little more than 200mb. Locally, I am able to clone the repository without problems.
Now I have a lot of changes in this repository, and I have wasted a couple of days trying to figure out how to get the remote server to clone my repository. I cannot get hg serve
to work outside of the LAN. I have tried everything. So instead, I created a new repository at the remote servers (both at the host and bitbucket) with nothing in it. Now I am pushing the complete repository that I have locally to these remote locations. So far it has been unsuccessful, as the push operation is stuck on searching for changes
and does not give me any other useful output. I have let it go for about an hour with no change.
Now my questions is, what am I doing wrong as far as hg serve
is concerned? I can access it locally but not remotely (through DynDns - I have configured it properly and the router forwards the ports correctly) so that I can get the server to clone the repository the first time after which I will be pushing to it. My second question is, assuming the clone at server does not work (for example, if I was to push my current repository to bitbucket), is creating an empty repository at the server and then pushing a local repository to the new remote repository ok? Is that the source of the searching for changes
problem?
Any help in this regard would be greatly appreciated.
what am I doing wrong as far as hg serve is concerned?
Hard to say, but hg serve
isn't normally the way I would to create a remote clone at a 3rd party service. For me, I wouldn't poke a hole in my firewall if I don't have to.
creating an empty repository at the server and then pushing a local repository to the new remote repository ok?
Yes. This is how I create a remote clone at Kiln. Create a new empty repo at Kiln, grab the URL for the new repository, and then push to it from my computer.
Is that the source of the searching for changes problem?
Not sure, but this report suggests that a really large push can be a problem. They suggest pushing in smaller chucks (e.g. a few revs at a time). Another consideration is whether you can live without your revision history (are you okay with creating a new repo from the current version of the files and push that repository. The report also suggests that authentication was the source of some problems (but that seemed to be a different error message).
Otherwise, you'll need to do more debugging to try to isolate the problem to this specific repo, your connectivity to the remote, or the remote repo . Some thoughts:
Yes, you can push to an empty repository with no problem. When you push or pull, then Mercurial will check to see if the source and destination repositories are related to each other. That prevents me from pulling changesets related to, say, OpenOffice into my clone of Mozilla Firefox.
A new, empty repository is related to all repositories, so you can always make an empty repository and push/pull changesets into it.
In fact, when you do
hg clone http://example.net/my-repository
then that is the same as doing
hg init my-repository
cd my-repository
hg pull http://example.net/my-repository
except that there wont be a default path setup for you -- see the comment by barjak for how to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With