> class PreviewDiffFormatterAPI(ObjectFormatterAPI):
> """Formatter for preview diffs."""
>
> === modified file 'lib/lp/code/stories/branches/xx-branchmergeproposals.txt'
> --- lib/lp/code/stories/branches/xx-branchmergeproposals.txt 2010-01-12 17:34:12 +0000
> +++ lib/lp/code/stories/branches/xx-branchmergeproposals.txt 2010-02-18 16:06:41 +0000
> @@ -614,10 +614,25 @@
> ... return find_tag_by_id(nopriv_browser.contents, 'review-diff')
>
> The text of the review diff is in the page.
> +
> >>> print repr(extract_text(get_review_diff()))
> u'Preview Diff\nDownload diff\n1\n...Fake Diff\u1010'
>
> +There is also a link to the diff URL, which is the preview diff URL plus
> +"+files/preview.diff"
> +
> + >>> link = get_review_diff().find('a')
> + >>> print link['href']
> + http://code.launchpad.dev/~person-name.../product-name.../branch.../+merge/.../+preview-diff/+files/preview.diff
17:20 < noodles775> abentley: your branch looks great. The only question I
have is whether there's really a need to include each segment of the url in
the doctest: http://code.launchpad.dev/~person-name.../product-name.../branch.../+merge/.../+preview-diff/+files/preview.diff
17:21 < abentley> noodles775, I would be fine with just showing "/+preview-diff/+files/preview.diff". Would you prefer that?
17:22 < noodles775> abentley: yeah (not that I care much either way, it'd just mean it was within 78chars :))
Approve, just one missing blank line below, in addition to our IRC exchange.
> === modified file 'lib/lp/ code/browser/ diff.py' code/browser/ diff.py 2010-02-02 17:32:23 +0000 code/browser/ diff.py 2010-02-18 16:06:41 +0000 launchpad. browser. librarian import FileNavigationMixin launchpad. webapp import Navigation launchpad. webapp. publisher import canonical_url launchpad. webapp. tales import ObjectFormatterAPI interfaces. diff import IPreviewDiff browser_ helpers import get_plural_text gation( Navigation, FileNavigationM ixin):
> --- lib/lp/
> +++ lib/lp/
> @@ -10,10 +10,18 @@
>
>
> from canonical.launchpad import _
> +from canonical.
> +from canonical.
> +from canonical.
> from canonical.
> +from lp.code.
> from lp.services.
>
>
> +class PreviewDiffNavi
> +
> + usedfor = IPreviewDiff
> +
Just need an extra line here.
> class PreviewDiffForm atterAPI( ObjectFormatter API):
> """Formatter for preview diffs."""
>
> === modified file 'lib/lp/ code/stories/ branches/ xx-branchmergep roposals. txt' code/stories/ branches/ xx-branchmergep roposals. txt 2010-01-12 17:34:12 +0000 code/stories/ branches/ xx-branchmergep roposals. txt 2010-02-18 16:06:41 +0000 by_id(nopriv_ browser. contents, 'review-diff') text(get_ review_ diff()) ) preview. diff" diff(). find('a' ) code.launchpad. dev/~person- name... /product- name... /branch. ../+merge/ .../+preview- diff/+files/ preview. diff
> --- lib/lp/
> +++ lib/lp/
> @@ -614,10 +614,25 @@
> ... return find_tag_
>
> The text of the review diff is in the page.
> +
> >>> print repr(extract_
> u'Preview Diff\nDownload diff\n1\n...Fake Diff\u1010'
>
> +There is also a link to the diff URL, which is the preview diff URL plus
> +"+files/
> +
> + >>> link = get_review_
> + >>> print link['href']
> + http://
17:20 < noodles775> abentley: your branch looks great. The only question I code.launchpad. dev/~person- name... /product- name... /branch. ../+merge/ .../+preview- diff/+files/ preview. diff diff/+files/ preview. diff". Would you prefer that?
have is whether there's really a need to include each segment of the url in
the doctest:
http://
17:21 < abentley> noodles775, I would be fine with just showing "/+preview-
17:22 < noodles775> abentley: yeah (not that I care much either way, it'd just mean it was within 78chars :))
Thanks Aaron.