Mercurial: Difference between revisions
(→hg) |
(→hg) |
||
Line 25: | Line 25: | ||
[alias] |
[alias] |
||
logline = log --template '{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n' |
logline = log --template '{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n' |
||
=== ssh === |
|||
Normally you will want to use the default OS ssh. So add the following to the config file: |
|||
[ui] |
|||
ssh = ssh -C |
|||
The "-C" seems to enable compression. Not sure yet, but I keep it for now. |
|||
IF you can normally ssh to the other machine with |
|||
ssh v-rooster |
|||
then now you should be able to do a |
|||
hg -v push ssh://v-rooster/work/repo1/ |
|||
You can give a name and/or port like this: |
|||
hg -v push ssh://user@v-rooster:port/work/repo1/ |
|||
but it would make more sense to configure your port to connect correctly. |
|||
Example under Windows 10, modify your C:\Users\<user>\.ssh\config |
|||
Host v-rooster |
|||
HostName 1.2.3.4 |
|||
User meaMario |
|||
Port 22 |
|||
IdentityFile C:\Users\<user>\.ssh\id_rsa-no-pw |
|||
== TortoiseHG == |
== TortoiseHG == |
Revision as of 17:11, 15 August 2020
Misc
hg
config file
- Windows: C:\Users\<User>\mercurial.ini
- Linux: ~/.hgrc
Username/Mail
If you are using the commandline, make sure to add to your config file:
[ui] username = John Doe <john@example.com>
aliases
mercurial command line log as one line per commit
Windows: add:
[alias] logline = log --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n"
Linux: add: (the only difference to Windows is " vs '
[alias] logline = log --template '{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n'
ssh
Normally you will want to use the default OS ssh. So add the following to the config file:
[ui] ssh = ssh -C
The "-C" seems to enable compression. Not sure yet, but I keep it for now.
IF you can normally ssh to the other machine with
ssh v-rooster
then now you should be able to do a
hg -v push ssh://v-rooster/work/repo1/
You can give a name and/or port like this:
hg -v push ssh://user@v-rooster:port/work/repo1/
but it would make more sense to configure your port to connect correctly. Example under Windows 10, modify your C:\Users\<user>\.ssh\config
Host v-rooster HostName 1.2.3.4 User meaMario Port 22 IdentityFile C:\Users\<user>\.ssh\id_rsa-no-pw
TortoiseHG
Why does hg not work?
After you installed TortoiseHG, add the path to the install directory of TortoiseHG to the PATH variable. (Start/Settings/System/About/System Info/Advanced system settings/Environment Variables...)