Quickies

[categories] [index] [all (527)] [latest]

Mercurial
  1. [hostfingerprints]
    my.server.com = 07:a0:bd:32:6e:2f:81:58:92:e9:60:d4:e4:83:7a:48:43:d3:5a:c4
    
  2. [auth]
    repo.prefix = https://my.repository.com:444/hg/xxx/
    repo.username = nseriot
    repo.password = password
    
  3. [ui]
    username = Nicolas Seriot <nicolas.seriot@xxx.com>
    
  4. like git commit --amend

    $ hg rollback
    $ hg commit -m "new message"
    
  5. $ hg log --limit 3 --template '{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n'
    
    683a489bf341 | 2012-08-03 13:20:31 +0200 | nicolas: misc
    99de916e21d9 | 2012-08-02 11:10:28 +0200 | nicolas: misc
    a6a45f2e7ff6 | 2012-07-31 16:58:53 +0200 | nicolas: misc
    

    Even better with an alias in .hgrc

    [alias]
    shortlog = log --template '{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n'
    

    Now callable with:

    $ hg shortlog
    
  6. $ hg diff -r tag1:tag2
    
  7. $ hg pull --insecure https://server/repository
    
  8. hg tag -r 1220 new_tag
    hg tag --remove old_tag
    
  9. Create opendiff-w, an executable script in your path, with the following contents:

    # opendiff returns immediately, without waiting for FileMerge to exit.
    # Piping the output makes opendiff wait for FileMerge.
    opendiff "$@" | cat
    

    Set the following in your .hgrc file

    [extensions]
    hgext.extdiff = 
    
    [extdiff]
    cmd.opendiff = opendiff-w
    

    Now you can see the diff in FileMerge by calling:

    $ hg opendiff
    

    http://mercurial.selenic.com/wiki/ExtdiffExtension