Merge lp://staging/~dholbach/developer-ubuntu-com/importer-post-deployment-fixes into lp://staging/developer-ubuntu-com

Proposed by Daniel Holbach
Status: Merged
Approved by: David Callé
Approved revision: 212
Merged at revision: 194
Proposed branch: lp://staging/~dholbach/developer-ubuntu-com/importer-post-deployment-fixes
Merge into: lp://staging/developer-ubuntu-com
Diff against target: 480 lines (+189/-72)
7 files modified
md_importer/importer/__init__.py (+12/-0)
md_importer/importer/article.py (+37/-22)
md_importer/importer/publish.py (+54/-22)
md_importer/importer/repo.py (+0/-1)
md_importer/tests/test_branch_import.py (+40/-6)
md_importer/tests/test_link_rewrite.py (+43/-20)
md_importer/tests/utils.py (+3/-1)
To merge this branch: bzr merge lp://staging/~dholbach/developer-ubuntu-com/importer-post-deployment-fixes
Reviewer Review Type Date Requested Status
Ubuntu App Developer site developers Pending
Review via email: mp+284309@code.staging.launchpad.net

Description of the change

This is ready to land now.

List of fixes:
 - only use a shortlist of markdown extensions
 - fix the rewriting of links in articles (links between articles in the
   same branch), fix and extend tests
 - simplify code somewhat, remove useless bits
 - fix stripping of tags like <body>, add tests

To post a comment you must log in.
192. By Daniel Holbach

only set page to public_object if it exists

193. By Daniel Holbach

remove unnecessary reset of repo.pages

194. By Daniel Holbach

merge from trunk

195. By Daniel Holbach

- make TestLinkRewrite link check explicit
- fix condition in TestLinkBrokenRewrite to not leave for loop early

196. By Daniel Holbach

bring TestSnapcraftLinkRewrite test closer to reality and just import what's important to us, fix condition to not leave for loop early

197. By Daniel Holbach

remove unnecessary line

198. By Daniel Holbach

avoid 'break' in the for loop

199. By Daniel Holbach

break out update_page functionality into separate function

200. By Daniel Holbach

store list of local images and if links were rewritten in the article object, use the new update_page function

201. By Daniel Holbach

add TODO item, make pyflakes and pep8 happy

202. By Daniel Holbach

remove body/html tags after soup.prettify

203. By Daniel Holbach

add test to ensure we strip all <body> tags from the imported articles

204. By Daniel Holbach

make sure internal links start with '/'

205. By Daniel Holbach

fix tests wrt fixed links

206. By Daniel Holbach

remove stray print

207. By Daniel Holbach

make regexes for stripping body/html/head tags clearer

208. By Daniel Holbach

drop pymdownx.headeranchor - it creates problems (order of link attributes gets mixed up depending on which html output we use), and we don't need it on the page

209. By Daniel Holbach

- when comparing HTML, always use clean_html from djangocms_text_ckeditor
  and soup.prettify, so we're looking at the same output style
- add convenience function find_text_plugin
- check not only if the draft's html has changed, but also if the published
  version changed
- update test as well, check only published pages

210. By Daniel Holbach

make sure we don't have 'None' as slug for the root node, add tests (one for the URL, one for links in the HTML)

211. By Daniel Holbach

cater to the use-case where we just import snappy docs, but have no release_alias (ie current) set

212. By Daniel Holbach

fix typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches