file log does not show merge revisions from another branch
Thomas De Schampheleire
patrickdepinguin+mercurial at gmail.com
Mon Aug 25 10:08:24 UTC 2014
Hi,
When a file was created on a named branch, and then merged into the
default branch without further changes, my expectation is that 'hg log
file' would show both the creation commit as the merge revision that
introduced the file in the default branch.
However, this is not the case. The merge revision is not shown, even
when trying with the extra options --copies, --removed, --hidden.
Here is the scenario:
$ hg init repo
$ cd repo
$ echo initial > initial
$ hg commit -Aminitial
adding initial
$ hg branch somebranch
marked working directory as branch somebranch
(branches are permanent and global, did you want a bookmark?)
$ echo foo > file
$ hg commit -Amfile
adding file
$ hg up default
Updating from rev. '6ae2e08a5035 (somebranch) tip' to rev. '228fb9b57510'
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg merge somebranch
Updating from rev. '228fb9b57510' to rev. '228fb9b57510' (merge with
rev. '6ae2e08a5035')
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg commit -mmerge
$ hg log file
changeset: 1:6ae2e08a5035
branch: somebranch
user: Thomas De Schampheleire
date: Mon Aug 25 11:36:33 2014 +0200
summary: file
$ hg log --copies --removed file
changeset: 1:6ae2e08a5035
branch: somebranch
user: Thomas De Schampheleire
date: Mon Aug 25 11:36:33 2014 +0200
summary: file
$ hg log --hidden file
changeset: 1:6ae2e08a5035
branch: somebranch
user: Thomas De Schampheleire
date: Mon Aug 25 11:36:33 2014 +0200
summary: file
$ hg log -v
changeset: 2:be9a84aea290
tag: tip
parent: 0:228fb9b57510
parent: 1:6ae2e08a5035
user: Thomas De Schampheleire
date: Mon Aug 25 11:36:48 2014 +0200
description:
merge
changeset: 1:6ae2e08a5035
branch: somebranch
user: Thomas De Schampheleire
date: Mon Aug 25 11:36:33 2014 +0200
files: file
description:
file
changeset: 0:228fb9b57510
user: Thomas De Schampheleire
date: Mon Aug 25 11:35:57 2014 +0200
files: initial
description:
initial
$ hg log -v --debug
changeset: 2:be9a84aea29005d989e7ce26d74a6981f0e2d860
tag: tip
phase: draft
parent: 0:228fb9b57510d3a5159afcc45cf8b88aee777bf4
parent: 1:6ae2e08a5035f85b61a0714c5b8070f1e9df98f3
manifest: 2:5ea20a6ff45c06871bb6b97613f57d345a99f84c
user: Thomas De Schampheleire
date: Mon Aug 25 11:36:48 2014 +0200
files+: file
extra: branch=default
description:
merge
changeset: 1:6ae2e08a5035f85b61a0714c5b8070f1e9df98f3
branch: somebranch
phase: draft
parent: 0:228fb9b57510d3a5159afcc45cf8b88aee777bf4
parent: -1:0000000000000000000000000000000000000000
manifest: 1:dbb01bf3b58053cc636923116c7ced978004c60f
user: Thomas De Schampheleire
date: Mon Aug 25 11:36:33 2014 +0200
files+: file
extra: branch=somebranch
description:
file
changeset: 0:228fb9b57510d3a5159afcc45cf8b88aee777bf4
phase: draft
parent: -1:0000000000000000000000000000000000000000
parent: -1:0000000000000000000000000000000000000000
manifest: 0:b7054db3307e52358964e1186f324546baa67dac
user: Thomas De Schampheleire
date: Mon Aug 25 11:35:57 2014 +0200
files+: initial
extra: branch=default
description:
initial
Given the --debug log output, it is clear that Mercurial is aware of
the newly created file in the merge revision, although default 'hg
log' doesn't show it, and presumably therefore 'hg log file' doesn't
either.
Is my expectation of seeing revision 2 too in 'hg log file' wrong?
If so, how can I determine in which revision of the default branch
'file' was added? In this case, the answer should be revision 2.
Thanks,
Thomas
More information about the Mercurial
mailing list