[issue931] hg log, showing copies: inside a --template

Marc Downie mercurial-bugs at selenic.com
Wed Jan 16 18:06:57 CST 2008


New submission from Marc Downie <marc at openendedgroup.com>:

Using --template that tries to show the copies associated with a changeset 
doesn't work as expected, 
while hg log -vfC filename works fine.

For example (please excuse the odd filenames):

marc$ hg log -vfC python_source_v.property
changeset:   1512:60c1189d3152
user:        marc at f1.local
date:        Wed Jan 16 14:40:52 2008 -0600
files:       saveTarget4.field/__-4354d5:117843d713e:-
7fe1/python_source_v.property 
saveTarget4.field/__-e73f109:117843b48dc:-7fbc/python_source_v.property 
saveTarget4.field/__3b6f6a98:1178444f7e2:-7fea/python_source_v.property 
saveTarget4.field/__79cac2e6:117843fcd12:-7ff1/python_source_v.property 
saveTarget4.field/__7d1c59c0:117845389de:-7fe6/python_source_v.property 
saveTarget4.field/sheet.xml
copies:      saveTarget4.field/__-4354d5:117843d713e:-
7fe1/python_source_v.property 
(saveSource.field/__-4354d5:117843d713e:-7fe1/python_source_v.property) 
saveTarget4.field/__-
e73f109:117843b48dc:-7fbc/python_source_v.property (saveSource.field/__-
e73f109:117843b48dc:-
7fbc/python_source_v.property) saveTarget4.field/__3b6f6a98:1178444f7e2:-
7fea/python_source_v.property 
(saveSource.field/__3b6f6a98:1178444f7e2:-7fea/python_source_v.property) 
saveTarget4.field/__79cac2e6:117843fcd12:-7ff1/python_source_v.property 
(saveSource.field/__79cac2e6:117843fcd12:-7ff1/python_source_v.property) 
saveTarget4.field/__7d1c59c0:117845389de:-7fe6/python_source_v.property 
(saveSource.field/__7d1c59c0:117845389de:-7fe6/python_source_v.property) 
saveTarget4.field/sheet.xml 
(saveSource.field/sheet.xml)
description:
"(no message)"


changeset:   1500:6248674bbb47
user:        marc at f1.local
date:        Wed Jan 16 14:29:40 2008 -0600
files:       saveSource.field/__3b6f6a98:1178444f7e2:-
7fea/python_source_v.property
description:
"(no message)"


changeset:   1498:ac40a6485eb2
user:        marc at f1.local
date:        Wed Jan 16 14:23:56 2008 -0600
files:       saveSource.field/__3b6f6a98:1178444f7e2:-
7fea/python_source_v.property 
saveSource.field/__79cac2e6:117843fcd12:-7ff1/python_source_v.property 
saveSource.field/sheet.xml
description:
"(no message)"


this is as expected, in particular the "copies:" for rev 1512 are correct.

However with a template that contains {file_copies} (which I'm guessing is the 
correct keyword):

marc$ hg log -v -f -C --template 
"rev<<{rev}>>\ndate<<{date|isodate}>>\ndesc<<{desc}>>files\n<<{files}>>\ncopies<
<{file_copies}>>-----
\n\n\n" python_source_v.property 

rev<<1512>>
date<<2008-01-16 14:40 -0600>>
desc<<"(no message)">>files
<<saveTarget4.field/__-4354d5:117843d713e:-7fe1/python_source_v.property 
saveTarget4.field/__-
e73f109:117843b48dc:-7fbc/python_source_v.property 
saveTarget4.field/__3b6f6a98:1178444f7e2:-
7fea/python_source_v.property saveTarget4.field/__79cac2e6:117843fcd12:-
7ff1/python_source_v.property 
saveTarget4.field/__7d1c59c0:117845389de:-7fe6/python_source_v.property 
saveTarget4.field/sheet.xml>>
copies<<filesnodetagsdatedescbranchesnameauthorrevmanifestsourceextrasfile_addsf
ile_delsparentsfile_cop
iesfilesnodetagsdatedescbranchesnameauthorrevmanifestsourceextrasfile_addsfile_d
elsparentsfile_copiesfi
lesnodetagsdatedescbranchesnameauthorrevmanifestsourceextrasfile_addsfile_delspa
rentsfile_copiesfilesno
detagsdatedescbranchesnameauthorrevmanifestsourceextrasfile_addsfile_delsparents
file_copiesfilesnodetag
sdatedescbranchesnameauthorrevmanifestsourceextrasfile_addsfile_delsparentsfile_
copiesfilesnodetagsdate
descbranchesnameauthorrevmanifestsourceextrasfile_addsfile_delsparentsfile_copie
s>>-----


rev<<1500>>
date<<2008-01-16 14:29 -0600>>
desc<<"(no message)">>files
<<saveSource.field/__3b6f6a98:1178444f7e2:-7fea/python_source_v.property>>
copies<<>>-----


rev<<1498>>
date<<2008-01-16 14:23 -0600>>
desc<<"(no message)">>files
<<saveSource.field/__3b6f6a98:1178444f7e2:-7fea/python_source_v.property 
saveSource.field/__79cac2e6:117843fcd12:-7ff1/python_source_v.property 
saveSource.field/sheet.xml>>
copies<<>>-----


In this case the copies<< ... >> contains text that's formatted badly by 
cmdutil.py/changeset_templater/showlist (the material is in the "values" passed 
into this function, as 
an array of dicts, it just doesn't make it out the other side.

marc$ hg --version
Mercurial Distributed SCM (version 0.9.5)

----------
messages: 4899
nosy: marcdownie
priority: bug
status: unread
title: hg log, showing copies: inside a --template

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue931>
____________________________________________________



More information about the Mercurial-devel mailing list