| 1 |
$ cat >> $HGRCPATH <<EOF |
| 2 |
> [alias] |
| 3 |
> tlog = log --template "{rev}:{node|short}: '{desc}' {branches}\n" |
| 4 |
> tglog = tlog -G |
| 5 |
> tout = out --template "{rev}:{node|short}: '{desc}' {branches}\n" |
| 6 |
> EOF |
| 7 |
|
| 8 |
$ hg init a |
| 9 |
$ cd a |
| 10 |
|
| 11 |
$ echo a > a |
| 12 |
$ hg ci -Aqm0 |
| 13 |
|
| 14 |
$ echo foo >> a |
| 15 |
$ hg ci -Aqm1 |
| 16 |
|
| 17 |
$ hg up -q 0 |
| 18 |
|
| 19 |
$ hg branch stable |
| 20 |
marked working directory as branch stable |
| 21 |
(branches are permanent and global, did you want a bookmark?) |
| 22 |
$ echo bar >> a |
| 23 |
$ hg ci -qm2 |
| 24 |
|
| 25 |
$ hg tglog |
| 26 |
@ 2:7bee6c3bea3a: '2' stable |
| 27 |
| |
| 28 |
| o 1:3560197d8331: '1' |
| 29 |
|/ |
| 30 |
o 0:f7b1eb17ad24: '0' |
| 31 |
|
| 32 |
|
| 33 |
$ cd .. |
| 34 |
|
| 35 |
$ hg clone -q a#stable b |
| 36 |
|
| 37 |
$ cd b |
| 38 |
$ cat .hg/hgrc |
| 39 |
# example repository config (see 'hg help config' for more info) |
| 40 |
[paths] |
| 41 |
default = $TESTTMP/a#stable |
| 42 |
|
| 43 |
# path aliases to other clones of this repo in URLs or filesystem paths |
| 44 |
# (see 'hg help config.paths' for more info) |
| 45 |
# |
| 46 |
# default:pushurl = ssh://[email protected]/hg/jdoes-fork |
| 47 |
# my-fork = ssh://[email protected]/hg/jdoes-fork |
| 48 |
# my-clone = /home/jdoe/jdoes-clone |
| 49 |
|
| 50 |
[ui] |
| 51 |
# name and email (local to this repository, optional), e.g. |
| 52 |
# username = Jane Doe <[email protected]> |
| 53 |
|
| 54 |
$ echo red >> a |
| 55 |
$ hg ci -qm3 |
| 56 |
|
| 57 |
$ hg up -q default |
| 58 |
|
| 59 |
$ echo blue >> a |
| 60 |
$ hg ci -qm4 |
| 61 |
|
| 62 |
$ hg tglog |
| 63 |
@ 3:f0461977a3db: '4' |
| 64 |
| |
| 65 |
| o 2:1d4099801a4e: '3' stable |
| 66 |
| | |
| 67 |
| o 1:7bee6c3bea3a: '2' stable |
| 68 |
|/ |
| 69 |
o 0:f7b1eb17ad24: '0' |
| 70 |
|
| 71 |
|
| 72 |
$ hg tout |
| 73 |
comparing with $TESTTMP/a |
| 74 |
searching for changes |
| 75 |
2:1d4099801a4e: '3' stable |
| 76 |
|
| 77 |
$ hg tlog -r 'outgoing()' |
| 78 |
2:1d4099801a4e: '3' stable |
| 79 |
|
| 80 |
$ hg tout ../a#default |
| 81 |
comparing with ../a |
| 82 |
searching for changes |
| 83 |
3:f0461977a3db: '4' |
| 84 |
|
| 85 |
$ hg tlog -r 'outgoing("../a#default")' |
| 86 |
3:f0461977a3db: '4' |
| 87 |
|
| 88 |
$ echo "green = ../a#default" >> .hg/hgrc |
| 89 |
|
| 90 |
$ cat .hg/hgrc |
| 91 |
# example repository config (see 'hg help config' for more info) |
| 92 |
[paths] |
| 93 |
default = $TESTTMP/a#stable |
| 94 |
|
| 95 |
# path aliases to other clones of this repo in URLs or filesystem paths |
| 96 |
# (see 'hg help config.paths' for more info) |
| 97 |
# |
| 98 |
# default:pushurl = ssh://[email protected]/hg/jdoes-fork |
| 99 |
# my-fork = ssh://[email protected]/hg/jdoes-fork |
| 100 |
# my-clone = /home/jdoe/jdoes-clone |
| 101 |
|
| 102 |
[ui] |
| 103 |
# name and email (local to this repository, optional), e.g. |
| 104 |
# username = Jane Doe <[email protected]> |
| 105 |
green = ../a#default |
| 106 |
|
| 107 |
$ hg tout green |
| 108 |
abort: repository green does not exist |
| 109 |
[255] |
| 110 |
|
| 111 |
$ hg tlog -r 'outgoing("green")' |
| 112 |
abort: repository green does not exist |
| 113 |
[255] |
| 114 |
|
| 115 |
$ cd .. |