[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Branching to replace XSL-FO
From: |
Greg Chicares |
Subject: |
Re: [lmi] Branching to replace XSL-FO |
Date: |
Tue, 30 Jan 2018 18:43:28 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 2018-01-29 17:38, Vadim Zeitlin wrote:
> On Mon, 29 Jan 2018 17:29:47 +0000 Greg Chicares <address@hidden> wrote:
>
> GC> Now that this has apparently succeeded, what's the final command to
> GC> merge this integrated branch into 'master'?
>
> Just "git checkout master && git merge gwc-no-xslfo", but there will be
> conflicts this time around (as I've just checked), so you will need to
> resolve them. But both of them (and there are just 2) are trivial: the year
> in the copyright line of version.hpp has been changed differently in the
> two branches, for whatever reason, while skin_group_carveout3.xrc had its
> year updated in the branch but removed in master. So you need to edit
> version.hpp and leave whichever variant you prefer (I guess the one from
> the branch, but I don't really understand why was it modified as it was in
> master) and run "git rm skin_group_carveout3.xrc" to resolve the conflict
> in it by confirming that it should be removed.
Those conflicts are not unexpected. 'git status' flags them:
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
deleted by us: skin_group_carveout3.xrc
both modified: version.hpp
The first was deleted deliberately, after the branch was created:
commit c81c8b206d85a523feae526cf936b44a76ad58f7
Author: Gregory W. Chicares <address@hidden>
Date: 2017-12-07T17:15:21+00:00
Expunge disused skin
skin_group_carveout3.xrc | 2309
-----------------------------------------------------------------
1 file changed, 2309 deletions(-)
...and deleting it explicitly, thus:
/opt/lmi/src/lmi[0]$git rm skin_group_carveout3.xrc
skin_group_carveout3.xrc: needs merge
rm 'skin_group_carveout3.xrc'
gives a confusing "needs merge" comment, which seems to suggest that
I need to 'git merge' again, but apparently I don't, as 'git rm' has
removed it from the 'git status' output.
And 'version.hpp' is regenerated completely when 'make release_candidate'
is run, so it loses old copyright years rather than accumulating them.
Therefore, I edited it to choose 'master' instead of the branch:
/opt/lmi/src/lmi[0]$vim version.hpp
After saving it, 'git status' still says
both modified: version.hpp
so I added it explicitly:
/opt/lmi/src/lmi[0]$git add version.hpp
which resolved that conflict so that I was able to commit the changes.
> After this you would commit as usual and you can examine the actual
> changes to the master by doing "git show --first-parent" (the extra option
> is necessary as otherwise Git wouldn't know which diff do you want).
That's 11116 lines of changes, so I'll break them down by file:
62 new files added, of which
47 are '.mst' (mustache) templates
15 are '.?pp' source files
0 files erased
13 files modified
When I push this, there will be two effects:
- Group quotes will immediately use new code (and should therefore
be tested first). It appears that this is largely a refactoring
that serves to share code already written for group quotes with
the new XSL replacement. Testing is unlikely to find anything of
great importance, but we have to verify that.
- For now, the original XSL code will still be used by default, so
that we can re-release it if needed before testing the mustache
replacement. Specifying a secret password will cause illustration
PDFs to be created both the old and the new way for testing. It
wouldn't be too surprising if we find differences, which we'll
discuss here.
Ultimately, we'll accept the new method and purge the old. I'd guess
that testing might take one to three months. Meanwhile, we can make
other unrelated changes and enhancements as need arises.
Of the 13 files modified, eight require no further changes--these
five, which have changed only trivially:
Makefile.am
main_wx.cpp
main_wx_test.cpp
test_coding_rules.cpp
workhorse.make
and these three, which affect group quotes immediately:
group_quote_pdf_gen_wx.cpp
wx_table_generator.cpp
wx_table_generator.hpp
These two have been slightly modified, and will ultimately vanish:
ledger_xsl.cpp
ledger_xsl.hpp
After testing, these three files will be changed exactly as indicated
in inline "PDF !!" comments, which will bring them into conformity
with the branch:
emit_ledger.cpp
ledger.hpp
objects.make
Let's check the count: 8 [=5+3] + 2 + 3 = 13: confirmed. That last
step involves expunging these files (including two mentioned above):
ledger_xml_io.cpp
fo_common.xsl
illustration_reg.xsl
ledger_xsl.cpp
ledger_xsl.hpp
nasd.xsl
reg_d_group.xsl
reg_d_individual.xsl
which will remove the last remnant of the ancient XSL implementation.
Running
make $coefficiency check_concinnity
after I push these changes will result in
387 marked defects
as opposed to 380 previously. But the defect count actually goes down
once the new implementation is accepted and the following files are
expunged:
$wine test_coding_rules.exe ledger_xml_io.cpp fo_common.xsl
illustration_reg.xsl \
ledger_xsl.cpp ledger_xsl.hpp nasd.xsl reg_d_group.xsl reg_d_individual.xsl
8 source files
7183 source lines
11 marked defects