2010-10-05 13:34:13 +04:00
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
|
|
> [alias]
|
2019-02-09 00:27:50 +03:00
|
|
|
> tlog = log --template "{rev}:{node|short}: '{desc}'\n"
|
|
|
|
> tout = out --template "{rev}:{node|short}: '{desc}'\n"
|
2010-10-05 13:34:13 +04:00
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ hg init a
|
|
|
|
$ cd a
|
|
|
|
|
|
|
|
$ echo a > a
|
|
|
|
$ hg ci -Aqm0
|
|
|
|
|
|
|
|
$ echo foo >> a
|
|
|
|
$ hg ci -Aqm1
|
|
|
|
|
|
|
|
$ hg up -q 0
|
|
|
|
|
|
|
|
$ echo bar >> a
|
|
|
|
$ hg ci -qm2
|
|
|
|
|
2018-08-16 20:37:29 +03:00
|
|
|
$ tglog
|
2019-02-09 00:27:50 +03:00
|
|
|
@ 2: a578af2cfd0c '2'
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
2018-08-16 20:37:29 +03:00
|
|
|
| o 1: 3560197d8331 '1'
|
2010-10-05 13:34:13 +04:00
|
|
|
|/
|
2018-08-16 20:37:29 +03:00
|
|
|
o 0: f7b1eb17ad24 '0'
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
|
2019-02-09 00:27:50 +03:00
|
|
|
$ hg clone -q a b
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
|
|
$ cd b
|
|
|
|
$ cat .hg/hgrc
|
2016-09-21 02:49:00 +03:00
|
|
|
# example repository config (see 'hg help config' for more info)
|
2010-10-05 13:34:13 +04:00
|
|
|
[paths]
|
2019-02-09 00:27:50 +03:00
|
|
|
default = $TESTTMP/a
|
2014-10-07 00:35:02 +04:00
|
|
|
|
|
|
|
# path aliases to other clones of this repo in URLs or filesystem paths
|
2016-09-21 02:49:00 +03:00
|
|
|
# (see 'hg help config.paths' for more info)
|
2014-10-07 00:35:02 +04:00
|
|
|
#
|
2017-02-25 14:27:21 +03:00
|
|
|
# default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
|
|
|
|
# my-fork = ssh://jdoe@example.net/hg/jdoes-fork
|
|
|
|
# my-clone = /home/jdoe/jdoes-clone
|
2014-10-07 00:35:02 +04:00
|
|
|
|
|
|
|
[ui]
|
|
|
|
# name and email (local to this repository, optional), e.g.
|
|
|
|
# username = Jane Doe <jdoe@example.com>
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
|
|
$ echo red >> a
|
|
|
|
$ hg ci -qm3
|
|
|
|
|
|
|
|
$ hg up -q default
|
|
|
|
|
|
|
|
$ echo blue >> a
|
|
|
|
$ hg ci -qm4
|
|
|
|
|
2018-08-16 20:37:29 +03:00
|
|
|
$ tglog
|
2019-02-09 00:27:50 +03:00
|
|
|
@ 4: acadbdc73b28 '4'
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
2019-02-09 00:27:50 +03:00
|
|
|
o 3: 5de9cb7d8f67 '3'
|
|
|
|
|
|
|
|
|
o 2: a578af2cfd0c '2'
|
|
|
|
|
|
|
|
|
| o 1: 3560197d8331 '1'
|
2010-10-05 13:34:13 +04:00
|
|
|
|/
|
2018-08-16 20:37:29 +03:00
|
|
|
o 0: f7b1eb17ad24 '0'
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
|
|
|
|
|
|
$ hg tout
|
2017-12-11 06:50:57 +03:00
|
|
|
comparing with $TESTTMP/a
|
2010-10-05 13:34:13 +04:00
|
|
|
searching for changes
|
2019-02-09 00:27:50 +03:00
|
|
|
3:5de9cb7d8f67: '3'
|
|
|
|
4:acadbdc73b28: '4'
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
|
|
$ hg tlog -r 'outgoing()'
|
2019-02-09 00:27:50 +03:00
|
|
|
3:5de9cb7d8f67: '3'
|
|
|
|
4:acadbdc73b28: '4'
|
2010-10-05 13:34:13 +04:00
|
|
|
|
2019-02-13 06:48:29 +03:00
|
|
|
$ hg tout ../a
|
2010-10-05 13:34:13 +04:00
|
|
|
comparing with ../a
|
|
|
|
searching for changes
|
2019-02-09 00:27:50 +03:00
|
|
|
3:5de9cb7d8f67: '3'
|
|
|
|
4:acadbdc73b28: '4'
|
2010-10-05 13:34:13 +04:00
|
|
|
|
2019-02-13 06:48:29 +03:00
|
|
|
$ hg tlog -r 'outgoing("../a")'
|
2019-02-09 00:27:50 +03:00
|
|
|
3:5de9cb7d8f67: '3'
|
|
|
|
4:acadbdc73b28: '4'
|
2010-10-05 13:34:13 +04:00
|
|
|
|
2019-02-13 06:48:29 +03:00
|
|
|
$ echo "green = ../a" >> .hg/hgrc
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
|
|
$ cat .hg/hgrc
|
2016-09-21 02:49:00 +03:00
|
|
|
# example repository config (see 'hg help config' for more info)
|
2010-10-05 13:34:13 +04:00
|
|
|
[paths]
|
2019-02-09 00:27:50 +03:00
|
|
|
default = $TESTTMP/a
|
2014-10-07 00:35:02 +04:00
|
|
|
|
|
|
|
# path aliases to other clones of this repo in URLs or filesystem paths
|
2016-09-21 02:49:00 +03:00
|
|
|
# (see 'hg help config.paths' for more info)
|
2014-10-07 00:35:02 +04:00
|
|
|
#
|
2017-02-25 14:27:21 +03:00
|
|
|
# default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
|
|
|
|
# my-fork = ssh://jdoe@example.net/hg/jdoes-fork
|
|
|
|
# my-clone = /home/jdoe/jdoes-clone
|
2014-10-07 00:35:02 +04:00
|
|
|
|
|
|
|
[ui]
|
|
|
|
# name and email (local to this repository, optional), e.g.
|
|
|
|
# username = Jane Doe <jdoe@example.com>
|
2019-02-13 06:48:29 +03:00
|
|
|
green = ../a
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
|
|
$ hg tout green
|
2017-12-15 02:03:55 +03:00
|
|
|
abort: repository green does not exist!
|
2014-10-07 00:35:02 +04:00
|
|
|
[255]
|
2010-10-05 13:34:13 +04:00
|
|
|
|
|
|
|
$ hg tlog -r 'outgoing("green")'
|
2017-12-15 02:03:55 +03:00
|
|
|
abort: repository green does not exist!
|
2014-10-07 00:35:02 +04:00
|
|
|
[255]
|
2010-10-05 13:34:13 +04:00
|
|
|
|
2012-06-11 03:40:51 +04:00
|
|
|
$ cd ..
|