Push to remote Mercurial repository
16,361
If your VPS has Mercurial installed, simply:
hg push ssh://username@host/path/relative/to/home
or add to the repo's hgrc
[paths]
default-push = ssh://username@host/path/relative/to/home
and just
hg push
Author by
richzilla
Updated on June 03, 2022Comments
-
richzilla about 2 years
I have a Mercurial repository on a remote VPS. The VPS has SSH access enabled. What are my options for pushing code changes from my development machine to the remote VPS?
-
deadbeef404 about 10 yearsFYI for anyone else that comes here, before attempting the above: When doing hg push, you need a double slash after hostname, for an absolute path. See this answer.
-
RedGlyph about 10 yearsNo, it's not needed, it just means something else. A double slash makes the path absolute on the host, a single slash is relative to home (as correctly mentioned in Lazy Badger's answer).
-
deadbeef404 about 10 years@RedGlyph, you are correct. I've updated my post to be slightly clearer about my meaning.
-
alexzander almost 3 yearsbut what if i want to push to
/run/media/$DEVICE_LABEL
, not in home dir of user ? -
Clonkex over 2 years@alexzander Then you would use the double slash after the hostname as mentioned by deadbeef404.