[Bug 4292] New: hg log and {files} {file_adds} {file_mods} {file_dels} in template show wrong files on merged revision

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Jun 27 05:09:12 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4292

          Priority: normal
            Bug ID: 4292
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: hg log and {files} {file_adds} {file_mods} {file_dels}
                    in template show wrong files on merged revision
          Severity: bug
    Classification: Unclassified
                OS: Windows
          Reporter: vlad_n at ua.fm
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.0.1
         Component: Mercurial
           Product: Mercurial

Steps to see the bug:

1. hg init
2. Create 0.txt file that contains text '0.txt'. And create r.txt file that
contains text 'r.txt'.
3. hg add
4. hg commit -m "add 0.txt and r.txt"

5. Create 1.txt file that contains text '1.txt'.
6. hg add 1.txt
7. Add to file 0.txt new line '1' after text '0.txt'.
8. hg remove r.txt
9. hg commit -m "add 1.txt change 0.txt remove r.txt"

10. hg update -c -r0
11. Create 2.txt file that contains text '2.txt'.
12. hg add 1.txt
13. hg commit -m "add 2.txt"

14. hg merge
15. hg commit -m "merge with rev 1"

Now try to see what files changed in revision 3:
hg log -r3 --template="  {files}\nM {file_mods}\nA {file_adds}\nR {file_dels}"
  r.txt
M 0.txt
A 1.txt
R r.txt

{file_mods}, {file_adds} and {file_dels} lists contains files changes from 1st
parent don't by this changeset: 

Now try to see what files changed in revision 3 from revision 2 (1st parent):
hg status --rev 2 --rev 3
M 0.txt
A 1.txt
R r.txt

Now try to see what files changed in revision 3 from revision 1 (2nd parent):
hg status --rev 1 --rev 3
A 2.txt

Why {file_mods} list contains file 0.txt and {file_adds} list contains file
0.txt. But {files} list don't contains this files?

Repository in attachment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list