[Bug 4220] New: hg log FILENAME does not show current/correct revision
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Wed Apr 9 11:54:50 CDT 2014
http://bz.selenic.com/show_bug.cgi?id=4220
Priority: normal
Bug ID: 4220
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: hg log FILENAME does not show current/correct revision
Severity: bug
Classification: Unclassified
OS: All
Reporter: thomas_benda at selinc.com
Hardware: PC
Status: UNCONFIRMED
Version: 2.9
Component: Mercurial
Product: Mercurial
I cannot coax hg into showing the correct ancestor changeset for a file
introduced to the current branch when the same file has also been introduced on
a sibling branch.
me at mybox:repro$ hg init
me at mybox:repro$ hg branch release
marked working directory as branch release
(branches are permanent and global, did you want a bookmark?)
me at mybox:repro$ hg com -m "base revision"
me at mybox:repro$ touch file && hg add file
me at mybox:repro$ hg branch feature1
marked working directory as branch feature1
(branches are permanent and global, did you want a bookmark?)
me at mybox:repro$ hg com -m "feature 1 branch, added file"
me at mybox:repro$ hg up -C release
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
me at mybox:repro$ hg branch feature2
marked working directory as branch feature2
(branches are permanent and global, did you want a bookmark?)
me at mybox:repro$ touch file && hg add file
me at mybox:repro$ hg com -m "feature 2 branch, added file"
me at mybox:repro$ hg log file
changeset: 1:dac9c337f9eb
branch: feature1
user: me
date: Wed Apr 09 09:24:19 2014 -0700
summary: feature 1 branch, added file
me at mybox:repro$ hg log -r null:tip file
changeset: 1:dac9c337f9eb
branch: feature1
user: me
date: Wed Apr 09 09:24:19 2014 -0700
summary: feature 1 branch, added file
me at mybox:repro$ hg sum
parent: 2:d995ec66a764 tip
feature 2 branch, added file
branch: feature2
commit: (clean)
update: (current)
me at mybox:repro$ hg glog
@ changeset: 2:d995ec66a764
| branch: feature2
| tag: tip
| parent: 0:5007d3ebd9ed
| user: me
| date: Wed Apr 09 09:24:47 2014 -0700
| summary: feature 2 branch, added file
|
| o changeset: 1:dac9c337f9eb
|/ branch: feature1
| user: me
| date: Wed Apr 09 09:24:19 2014 -0700
| summary: feature 1 branch, added file
|
o changeset: 0:5007d3ebd9ed
branch: release
user: me
date: Wed Apr 09 09:23:39 2014 -0700
summary: base revision
------------------------
Worse yet, the behavior isn't strictly consistent. In this repro case we see:
me at mybox:repro$ hg log --follow file
changeset: 1:dac9c337f9eb
branch: feature1
user: me
date: Wed Apr 09 09:24:19 2014 -0700
summary: feature 1 branch, added file
me at mybox:repro$ hg sum
parent: 2:d995ec66a764 tip
feature 2 branch, added file
branch: feature2
commit: (clean)
update: (current)
me at mybox:repro$ hg log -r "ancestors(.)"
changeset: 0:5007d3ebd9ed
branch: release
user: me
date: Wed Apr 09 09:23:39 2014 -0700
summary: base revision
changeset: 2:d995ec66a764
branch: feature2
tag: tip
parent: 0:5007d3ebd9ed
user: me
date: Wed Apr 09 09:24:47 2014 -0700
summary: feature 2 branch, added file
-----------
However, I've gotten the (arguably incorrect) response above as well as this
response below from the same repo, where we initially found this behavior:
me at mybox:actualrepo$ hg log file --follow
abort: cannot follow file not in parent revision: "file"
me at mybox:actualrepo$ hg man | grep file
file
---------------
I've reproduced this behavior on these versions:
me at mybox:~$ hg --version
Mercurial Distributed SCM (version 2.9)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2014 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\> hg --version
Mercurial Distributed SCM (version 2.2.2)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list