Output from command "hg log -f file

Dr Rainer Woitok rainer.woitok at gmail.com
Mon Jul 29 14:25:30 UTC 2019


Greetings,

the output  from the  "hg log -v -f file"  command below  surprised me a
bit.  Here's what I did:

# Setting stage:

$ hg version | head -1
Mercurial Distributed SCM (version 5.0.1+14-b06687a14067)
$ hg init Test
$ cd Test
$ touch file
$ hg commit -Am +File.
adding file
$ echo 1 >| file
$ hg commit -m +1.
$ rm file
$ hg commit -Am -File.
removing file
$ touch file
$ hg commit -Am '+File again.'
adding file
$

# Logging the complete repository:

$ hg log -v
changeset:   3:d5aaa1ae7a9c
tag:         tip
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:03 2019 +0200
files:       file
description:
+File again.


changeset:   2:43ff8c3e02d8
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:03 2019 +0200
files:       file
description:
-File.


changeset:   1:9024cc756fc9
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:02 2019 +0200
files:       file
description:
+1.


changeset:   0:80f36f4d9693
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:02 2019 +0200
files:       file
description:
+File.

# Logging just file "file" but without the "--removed" option:


$ hg log -v -f file
changeset:   0:80f36f4d9693
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:02 2019 +0200
files:       file
description:
+File.

# Logging file "file" with the "--removed" option:

$ hg log --removed -v -f file
changeset:   3:d5aaa1ae7a9c
tag:         tip
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:03 2019 +0200
files:       file
description:
+File again.


changeset:   2:43ff8c3e02d8
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:03 2019 +0200
files:       file
description:
-File.


changeset:   1:9024cc756fc9
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:02 2019 +0200
files:       file
description:
+1.


changeset:   0:80f36f4d9693
user:        Rainer Woitok <rainer at tux>
date:        Mon Jul 29 15:55:02 2019 +0200
files:       file
description:
+File.


$

I would have expected only changeset 2 to be missing from the second log
because all other changesets contain non-deleting changes to "file".

What am I missing?

Sincerely,
  Rainer


More information about the Mercurial mailing list