Eldad Assis
Eldad Assis

Reputation: 11055

Mercurial push and pull between two remote repositories

Is it possible to push from one remote repository to another remote repository?

I have a case where I push my local changes to a remote integration repos. Once approved, I want the integration repos pushed into a release repos (where I'll build my release from).

Is this technically possible?

EDIT: 1st repository is local on my disk. 2nd and 3rd are both remote repositories on my server that I DON'T have file system access to. I want to be able to push from 2nd to 3rd from my PC (using my local HG/TortoisHG client).

Upvotes: 2

Views: 2522

Answers (2)

Oben Sonne
Oben Sonne

Reputation: 9953

The simple way is to login to your server, cd to the integration repository and then push to a release repository.

If you do not have such a login, simply keep a local clone of the integration repository which you only use to locally push to a remote release repo:

$ hg clone <remote-integration-repo> integration
$ cd integration
$ hg push <remote-release-repo>

For subsequent pushes, do

$ cd integration
$ hg pull # optionally with -u option
$ hg push <remote-release-repo>

In case you have multiple integration and release repostitories, you might want to automate these steps in a script.

The basic message is that it does not really make a difference if you push to the release repo from a local or remote machine.

Upvotes: 3

Ringding
Ringding

Reputation: 2856

Depends on what you mean by "remote". If you can log into these machines and you can establish an SSH connection between them, it's easily possible.

Upvotes: 0

Related Questions