#require serve $ hg init test $ cd test $ echo b > b $ hg ci -Am "b" adding b $ echo a > a $ hg ci -Am "first a" adding a $ hg tag -r 1 a-tag $ hg bookmark -r 1 a-bookmark $ hg rm a $ hg ci -m "del a" $ hg branch a-branch marked working directory as branch a-branch (branches are permanent and global, did you want a bookmark?) $ echo b > a $ hg ci -Am "second a" adding a $ hg rm a $ hg ci -m "del2 a" $ hg mv b c $ hg ci -m "mv b" $ echo c >> c $ hg ci -m "change c" $ hg log -p changeset: 7:46c1a66bd8fc branch: a-branch tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: change c diff -r c9637d3cc8ef -r 46c1a66bd8fc c --- a/c Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,2 @@ b +c changeset: 6:c9637d3cc8ef branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: mv b diff -r 958bd88be4eb -r c9637d3cc8ef b --- a/b Thu Jan 01 00:00:00 1970 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -b diff -r 958bd88be4eb -r c9637d3cc8ef c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ +b changeset: 5:958bd88be4eb branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: del2 a diff -r 3f41bc784e7e -r 958bd88be4eb a --- a/a Thu Jan 01 00:00:00 1970 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -b changeset: 4:3f41bc784e7e branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: second a diff -r 292258f86fdf -r 3f41bc784e7e a --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/a Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ +b changeset: 3:292258f86fdf user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: del a diff -r 94c9dd5ca9b4 -r 292258f86fdf a --- a/a Thu Jan 01 00:00:00 1970 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -a changeset: 2:94c9dd5ca9b4 user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Added tag a-tag for changeset 5ed941583260 diff -r 5ed941583260 -r 94c9dd5ca9b4 .hgtags --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ +5ed941583260248620985524192fdc382ef57c36 a-tag changeset: 1:5ed941583260 bookmark: a-bookmark tag: a-tag user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: first a diff -r 6563da9dcf87 -r 5ed941583260 a --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/a Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ +a changeset: 0:6563da9dcf87 user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: b diff -r 000000000000 -r 6563da9dcf87 b --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/b Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ +b $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log $ cat hg.pid >> $DAEMON_PIDS tip - two revisions $ (get-with-headers.py localhost:$HGPORT 'log/tip/a') 200 Script output follows test: a history

log a @ 4:3f41bc784e7e a-branch

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test second a a-branch
Thu, 01 Jan 1970 00:00:00 +0000 test first a a-tag a-bookmark
second version - two revisions $ (get-with-headers.py localhost:$HGPORT 'log/4/a') 200 Script output follows test: a history

log a @ 4:3f41bc784e7e a-branch

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test second a a-branch
Thu, 01 Jan 1970 00:00:00 +0000 test first a a-tag a-bookmark
first deleted - one revision $ (get-with-headers.py localhost:$HGPORT 'log/3/a') 200 Script output follows test: a history

log a @ 1:5ed941583260 a-tag a-bookmark

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test first a a-tag a-bookmark
first version - one revision $ (get-with-headers.py localhost:$HGPORT 'log/1/a') 200 Script output follows test: a history

log a @ 1:5ed941583260 a-tag a-bookmark

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test first a a-tag a-bookmark
before addition - error $ (get-with-headers.py localhost:$HGPORT 'log/0/a') 404 Not Found test: error

error

An error occurred while processing your request:

a@6563da9dcf87: not found in manifest

[1] $ hg log -r 'followlines(c, 1:2, startrev=tip) and follow(c)' changeset: 0:6563da9dcf87 user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: b changeset: 7:46c1a66bd8fc branch: a-branch tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: change c $ (get-with-headers.py localhost:$HGPORT 'log/tip/c?linerange=1:2') 200 Script output follows test: c history

log c @ 7:46c1a66bd8fc a-branch tip (following lines 1:2 back to filelog)

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test change c a-branch tip
Thu, 01 Jan 1970 00:00:00 +0000 test b
$ (get-with-headers.py localhost:$HGPORT 'log/tip/c?linerange=1%3A2&revcount=1') 200 Script output follows test: c history

log c @ 7:46c1a66bd8fc a-branch tip (following lines 1:2 back to filelog)

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test change c a-branch tip
$ (get-with-headers.py localhost:$HGPORT 'log/3/a?linerange=1' --headeronly) 400 invalid linerange parameter [1] $ (get-with-headers.py localhost:$HGPORT 'log/3/a?linerange=1:a' --headeronly) 400 invalid linerange parameter [1] $ (get-with-headers.py localhost:$HGPORT 'log/3/a?linerange=1:2&linerange=3:4' --headeronly) 400 redundant linerange parameter [1] $ (get-with-headers.py localhost:$HGPORT 'log/3/a?linerange=3:2' --headeronly) 400 line range must be positive [1] $ (get-with-headers.py localhost:$HGPORT 'log/3/a?linerange=0:1' --headeronly) 400 fromline must be strictly positive [1] should show base link, use spartan because it shows it $ (get-with-headers.py localhost:$HGPORT 'log/tip/c?style=spartan') 200 Script output follows test: c history
changelog shortlog graph tags branches file annotate help rss atom

Mercurial / c revision history

navigate: (0) tip

Thu, 01 Jan 1970 00:00:00 +0000: change c
revision 1: 46c1a66bd8fc (diff) (annotate)
author: test
date: Thu, 01 Jan 1970 00:00:00 +0000
Thu, 01 Jan 1970 00:00:00 +0000: mv b
revision 0: c9637d3cc8ef (diff) (annotate)
base: b@1e88685f5dde
author: test
date: Thu, 01 Jan 1970 00:00:00 +0000
filelog with patch $ (get-with-headers.py localhost:$HGPORT 'log/4/a?patch=1') 200 Script output follows test: a history

log a @ 4:3f41bc784e7e a-branch

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test second a a-branch
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  +++ b/a	Thu Jan 01 00:00:00 1970 +0000
  @@ -0,0 +1,1 @@
  +b
Thu, 01 Jan 1970 00:00:00 +0000 test first a a-tag a-bookmark
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  +++ b/a	Thu Jan 01 00:00:00 1970 +0000
  @@ -0,0 +1,1 @@
  +a
filelog with 'linerange' and 'patch' $ cat c b c $ cat < c > 0 > 0 > b > c+ > > a > a > > d > e > f > EOF $ hg ci -m 'make c bigger and touch its beginning' c $ cat < c > 0 > 0 > b > c+ > > a > a > > d > e+ > f > EOF $ hg ci -m 'just touch end of c' c $ cat < c > 0 > 0 > b > c++ > > a > a > > d > e+ > f > EOF $ hg ci -m 'touch beginning of c' c $ cat < c > 0 > 0 > b- > c++ > > a > a > > d > e+ > f+ > EOF $ hg ci -m 'touching beginning and end of c' c $ echo c > cc $ hg ci -Am 'tip does not touch c' cc $ hg log -r 'followlines(c, 3:4, startrev=tip) and follow(c)' -p changeset: 0:6563da9dcf87 user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: b diff -r 000000000000 -r 6563da9dcf87 b --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/b Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ +b changeset: 7:46c1a66bd8fc branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: change c diff -r c9637d3cc8ef -r 46c1a66bd8fc c --- a/c Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,2 @@ b +c changeset: 8:5c6574614c37 branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: make c bigger and touch its beginning diff -r 46c1a66bd8fc -r 5c6574614c37 c --- a/c Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +1,11 @@ +0 +0 b -c +c+ + +a +a + +d +e +f changeset: 10:e95928d60479 branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: touch beginning of c diff -r e1d3e9c5a23f -r e95928d60479 c --- a/c Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +1,7 @@ 0 0 b -c+ +c++ a a changeset: 11:fb9bc322513a branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: touching beginning and end of c diff -r e95928d60479 -r fb9bc322513a c --- a/c Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +1,6 @@ 0 0 -b +b- c++ a @@ -8,4 +8,4 @@ d e+ -f +f+ $ (get-with-headers.py localhost:$HGPORT 'log/tip/c?linerange=3:4&patch=') 200 Script output follows test: c history

log c @ 12:6e4182052f7b a-branch tip (following lines 3:4 back to filelog)

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test touching beginning and end of c a-branch
  --- a/c	Thu Jan 01 00:00:00 1970 +0000
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
  @@ -1,6 +1,6 @@
   0
   0
  -b
  +b-
   c++
   
   a
Thu, 01 Jan 1970 00:00:00 +0000 test touch beginning of c a-branch
  --- a/c	Thu Jan 01 00:00:00 1970 +0000
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
  @@ -1,7 +1,7 @@
   0
   0
   b
  -c+
  +c++
   
   a
   a
Thu, 01 Jan 1970 00:00:00 +0000 test make c bigger and touch its beginning a-branch
  --- a/c	Thu Jan 01 00:00:00 1970 +0000
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
  @@ -1,2 +1,11 @@
  +0
  +0
   b
  -c
  +c+
  +
  +a
  +a
  +
  +d
  +e
  +f
Thu, 01 Jan 1970 00:00:00 +0000 test change c a-branch
  --- a/c	Thu Jan 01 00:00:00 1970 +0000
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
  @@ -1,1 +1,2 @@
   b
  +c
Thu, 01 Jan 1970 00:00:00 +0000 test b
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  +++ b/b	Thu Jan 01 00:00:00 1970 +0000
$ hg log -r 'followlines(c, 3:4, startrev=8, descend=True) and follow(c)' -p changeset: 8:5c6574614c37 branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: make c bigger and touch its beginning diff -r 46c1a66bd8fc -r 5c6574614c37 c --- a/c Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +1,11 @@ +0 +0 b -c +c+ + +a +a + +d +e +f changeset: 10:e95928d60479 branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: touch beginning of c diff -r e1d3e9c5a23f -r e95928d60479 c --- a/c Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +1,7 @@ 0 0 b -c+ +c++ a a changeset: 11:fb9bc322513a branch: a-branch user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: touching beginning and end of c diff -r e95928d60479 -r fb9bc322513a c --- a/c Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +1,6 @@ 0 0 -b +b- c++ a @@ -8,4 +8,4 @@ d e+ -f +f+ $ (get-with-headers.py localhost:$HGPORT 'log/8/c?linerange=3:4&descend=') 200 Script output follows test: c history

log c @ 8:5c6574614c37 a-branch (following lines 3:4, descending back to filelog)

age author description
Thu, 01 Jan 1970 00:00:00 +0000 test make c bigger and touch its beginning a-branch
Thu, 01 Jan 1970 00:00:00 +0000 test touch beginning of c a-branch
Thu, 01 Jan 1970 00:00:00 +0000 test touching beginning and end of c a-branch
rss log $ (get-with-headers.py localhost:$HGPORT 'rss-log/tip/a') 200 Script output follows http://*:$HGPORT/ (glob) en-us test: a history a revision history second a http://*:$HGPORT/log/3f41bc784e7e/a (glob) test Thu, 01 Jan 1970 00:00:00 +0000 first a http://*:$HGPORT/log/5ed941583260/a (glob) test Thu, 01 Jan 1970 00:00:00 +0000 atom log $ (get-with-headers.py localhost:$HGPORT 'atom-log/tip/a') 200 Script output follows http://*:$HGPORT/atom-log/tip/a (glob) (glob) test: a history 1970-01-01T00:00:00+00:00 [a-branch] second a http://*:$HGPORT/#changeset-3f41bc784e7e73035c6d47112c6cc7efb673adf8 (glob) (glob) test test 1970-01-01T00:00:00+00:00 1970-01-01T00:00:00+00:00
changeset 3f41bc784e7e
branch a-branch
bookmark
tag
user test
description second a
files
first a http://*:$HGPORT/#changeset-5ed941583260248620985524192fdc382ef57c36 (glob) (glob) test test 1970-01-01T00:00:00+00:00 1970-01-01T00:00:00+00:00
changeset 5ed941583260
branch
bookmark a-bookmark
tag a-tag
user test
description first a
files
errors $ cat errors.log $ cd ..