Hg

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m
m
Line 4: Line 4:
 
<source lang="ini">
 
<source lang="ini">
 
[ui]
 
[ui]
username=Attie Grande <attie@attie.co.uk>
+
username = Attie Grande <attie@attie.co.uk>
verbose=True
+
verbose = True
  
 
[pager]
 
[pager]
pager=less -FRSX
+
pager = less -FRSX
  
 
[color]
 
[color]
 
# configure colors for each possible hg status
 
# configure colors for each possible hg status
status.modified=blue bold
+
status.modified = blue bold
status.added=green bold
+
status.added = green bold
status.removed=red bold
+
status.removed = red bold
status.deleted=cyan bold
+
status.deleted = cyan bold
status.unknown=magenta bold
+
status.unknown = magenta bold
status.ignored=white bold
+
status.ignored = white bold
 
# and for hg diff output also
 
# and for hg diff output also
diff.diffline=bold
+
diff.diffline = bold
diff.extended=cyan bold
+
diff.extended = cyan bold
diff.file_a=white bold
+
diff.file_a = white bold
diff.file_b=white bold
+
diff.file_b = white bold
diff.hunk=cyan
+
diff.hunk = cyan
diff.deleted=red
+
diff.deleted = red
diff.inserted=green
+
diff.inserted = green
diff.changed=white
+
diff.changed = white
diff.trailingwhitespace=bold red_background
+
diff.trailingwhitespace = bold red_background
  
 
[diff]
 
[diff]
showfunc=true
+
showfunc = true
  
 
[extensions]
 
[extensions]
hgext.convert=
+
hgext.convert =
pager=
+
pager =
color=
+
color =
mq=
+
mq =
record=
+
record =
 
</source>
 
</source>
  

Revision as of 16:51, 30 July 2014

My Mercurial cheat sheet! See also: git and svn

~/.hgrc

[ui]
username = Attie Grande <attie@attie.co.uk>
verbose = True
 
[pager]
pager = less -FRSX
 
[color]
# configure colors for each possible hg status
status.modified = blue bold
status.added = green bold
status.removed = red bold
status.deleted = cyan bold
status.unknown = magenta bold
status.ignored = white bold
# and for hg diff output also
diff.diffline = bold
diff.extended = cyan bold
diff.file_a = white bold
diff.file_b = white bold
diff.hunk = cyan
diff.deleted = red
diff.inserted = green
diff.changed = white
diff.trailingwhitespace = bold red_background
 
[diff]
showfunc = true
 
[extensions]
hgext.convert =
pager =
color =
mq =
record =

Default Push

If you create a local repository, and later want to push it to a remote repo, then you'll need to setup the default-push target.
Put the following in your ./.hg/hgrc file:

[paths]
default = ${REMOTE_REPO}

Authentication

WARNING: You didn't hear this from me... You should never use it (think SSH)

If you're using HTTP to access a repository, you can add the following section to your ~/.hgrc file:

[auth]
svr.prefix = http://my.server/
svr.username = attie
svr.password = supersecret
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox