[issue3004] Identical files added on multiple branches only show up as a single commit
Paul Nathan
bugs at mercurial.selenic.com
Mon Sep 12 19:09:33 CDT 2011
New submission from Paul Nathan <paul_nathan at selinc.com>:
Hi,
If we add an identical file to two different branches, and then later on call hg
log <filename> on it, it will not return both commits. A hg --debug manifest of
this file will give an identical internal hash.
An implication is that hg will not confess to having the file on a given branch
unless the correct incantation of hg log -v -r <exact revision> is made at it.
Since we want to be able to determine what revision the file changed at, this
induces a circular logic.
Testing was done with 1.9.1, brief test was done with version 1.9.2+17-
d23dfcbb8840 which showed the same behavior.
A log of a bug-duplication session follows:
paulnath at paulnathlinux:~/temp
$ mkdir testing-dupes
paulnath at paulnathlinux:~/temp
$ cd testing-dupes/
paulnath at paulnathlinux:~/temp/testing-dupes
$ ls
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg init
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg branch gizmo
marked working directory as branch gizmo
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg commit -m "gizmo started"
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg branch grasshopper
marked working directory as branch grasshopper
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg commit -m "grasshopper started"
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg glog
@ changeset: 1:98282c413042
| branch: grasshopper
| tag: tip
| user: paulnath
| date: Mon Sep 12 16:41:32 2011 -0700
| summary: grasshopper started
|
o changeset: 0:86123fcb8f41
branch: gizmo
user: paulnath
date: Mon Sep 12 16:41:13 2011 -0700
summary: gizmo started
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg up -r 0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
paulnath at paulnathlinux:~/temp/testing-dupes
$ echo "This is a test" > testfile
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg add testfile && hg commit -m "Adding testfile"
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg up -r 1
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
paulnath at paulnathlinux:~/temp/testing-dupes
$ echo "This is a test" > testfile
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg add testfile && hg commit -m "Adding testfile"
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg log testfile
changeset: 2:a413a3b388db
branch: gizmo
parent: 0:86123fcb8f41
user: paulnath
date: Mon Sep 12 16:42:01 2011 -0700
summary: Adding testfile
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg glog
@ changeset: 3:06fef44db557
| branch: grasshopper
| tag: tip
| parent: 1:98282c413042
| user: paulnath
| date: Mon Sep 12 16:42:15 2011 -0700
| summary: Adding testfile
|
| o changeset: 2:a413a3b388db
| | branch: gizmo
| | parent: 0:86123fcb8f41
| | user: paulnath
| | date: Mon Sep 12 16:42:01 2011 -0700
| | summary: Adding testfile
| |
o | changeset: 1:98282c413042
|/ branch: grasshopper
| user: paulnath
| date: Mon Sep 12 16:41:32 2011 -0700
| summary: grasshopper started
|
o changeset: 0:86123fcb8f41
branch: gizmo
user: paulnath
date: Mon Sep 12 16:41:13 2011 -0700
summary: gizmo started
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg log -v -r 3 --style=changelog
2011-09-12 16:42 -0700 paulnath <paulnath> (06fef44db557 <grasshopper>)
* testfile: new file.
* testfile:
Adding testfile
paulnath at paulnathlinux:~/temp/testing-dupes
$ hg log -v -r 2 --style=changelog
2011-09-12 16:42 -0700 paulnath <paulnath> (a413a3b388db <gizmo>)
* testfile: new file.
* testfile:
Adding testfile
----------
messages: 17400
nosy: paulnath
priority: urgent
status: unread
title: Identical files added on multiple branches only show up as a single commit
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3004>
____________________________________________________
More information about the Mercurial-devel
mailing list