Re: backpatching documentation after conversion to XML

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: backpatching documentation after conversion to XML
Date: 2017-10-22 18:00:06
Message-ID: 8bb5a579-5a9d-3aad-7b27-275b0b9bb4c2@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

22.10.2017 19:42, Tom Lane writes:
>> I think we should make a script to backport doc/-related commits.
> That's an interesting idea, but I really doubt that you'll be able
> to make a script that copes with this without having back-patched
> the changes we're discussing. As an example, any given closing tag
> might've already been spelled out in the back branches; we've never
> been consistent about that. So you couldn't just automatically
> shorten all the closing tags and expect to have a patch that applies.
I understand the major difficulties we have to deal with. I have the
following plan in mind:
1. Get a diff for a single xml.
2. Find corresponding sgml in the old target branch.
3. Convert the sgml to xml following the same procedure that we applied
for the master branch.
4. Try to apply the diff.
5. If it's applied successfully, detect the lines where changes occured
(sgml->xml conversion doesn't move the lines) and
modify corresponding lines in sgml with the content modified for sgml
(<xref .../> changed to <xref > and so on.)

I think this should work for 90% of cases.

------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message juergen 2017-10-23 08:41:32 Typo
Previous Message Tom Lane 2017-10-22 16:42:44 Re: backpatching documentation after conversion to XML