Rev 224: Merged UI changes. in http://bzr.daniel-watkins.co.uk/pqm/rss

Daniel Watkins daniel at daniel-watkins.co.uk
Thu Jul 31 04:42:47 BST 2008


At http://bzr.daniel-watkins.co.uk/pqm/rss

------------------------------------------------------------
revno: 224
revision-id: daniel at daniel-watkins.co.uk-20080731034112-5hj96z8g2tuon8xc
parent: daniel at daniel-watkins.co.uk-20080714142732-7wznwd7qh9nd8913
parent: daniel at daniel-watkins.co.uk-20080731033943-z640egm8x4gul1b7
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: rss
timestamp: Thu 2008-07-31 04:41:12 +0100
message:
  Merged UI changes.
added:
  pqm/ui/twistd/                 twisted-20080717123501-30ahtsgvr52z4e6f-1
renamed:
  pqm/ui/template.py => pqm/ui/twistd/template.py template.html-20080709141329-kvidah0k5gmzbskb-1
  pqm/ui/tests => pqm/ui/twistd/tests x_Robert_Collins_<robert.collins at canonical.com>_Sat_Jul__9_22:35:48_2005_7870.0
  pqm/ui/twistd.py => pqm/ui/twistd/__init__.py x_Robert_Collins_<robert.collins at canonical.com>_Sun_Jul_10_02:00:08_2005_15556.0
modified:
  Makefile.am                    i_Automake_rules_for_toplevel_tla-pqm_directory
  manual.xml                     i_manual_for_the_tla_patch_queue_manager
  pqm/ui/twistd/tests/test_twisted.py x_Robert_Collins_<robert.collins at canonical.com>_Sat_Jul__9_22:36:13_2005_7873.0
  pqm/ui/twistd/template.py      template.html-20080709141329-kvidah0k5gmzbskb-1
  pqm/ui/twistd/__init__.py      x_Robert_Collins_<robert.collins at canonical.com>_Sun_Jul_10_02:00:08_2005_15556.0
    ------------------------------------------------------------
    revno: 201.1.7
    revision-id: daniel at daniel-watkins.co.uk-20080731033943-z640egm8x4gul1b7
    parent: daniel at daniel-watkins.co.uk-20080714142503-r6645pwg1s73s9i2
    parent: daniel at daniel-watkins.co.uk-20080717132959-vjm94jq27uuzcj2u
    committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
    branch nick: ui
    timestamp: Thu 2008-07-31 04:39:43 +0100
    message:
      Merged SimpleTAL changes.
    added:
      pqm/ui/twistd/                 twisted-20080717123501-30ahtsgvr52z4e6f-1
    renamed:
      pqm/ui/template.py => pqm/ui/twistd/template.py template.html-20080709141329-kvidah0k5gmzbskb-1
      pqm/ui/tests => pqm/ui/twistd/tests x_Robert_Collins_<robert.collins at canonical.com>_Sat_Jul__9_22:35:48_2005_7870.0
      pqm/ui/twistd.py => pqm/ui/twistd/__init__.py x_Robert_Collins_<robert.collins at canonical.com>_Sun_Jul_10_02:00:08_2005_15556.0
    modified:
      Makefile.am                    i_Automake_rules_for_toplevel_tla-pqm_directory
      manual.xml                     i_manual_for_the_tla_patch_queue_manager
      pqm/ui/twistd/tests/test_twisted.py x_Robert_Collins_<robert.collins at canonical.com>_Sat_Jul__9_22:36:13_2005_7873.0
      pqm/ui/twistd/template.py      template.html-20080709141329-kvidah0k5gmzbskb-1
      pqm/ui/twistd/__init__.py      x_Robert_Collins_<robert.collins at canonical.com>_Sun_Jul_10_02:00:08_2005_15556.0
    ------------------------------------------------------------
    revno: 201.2.6
    revision-id: daniel at daniel-watkins.co.uk-20080717132959-vjm94jq27uuzcj2u
    parent: daniel at daniel-watkins.co.uk-20080717132924-inp6tuono4nly2w5
    committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
    branch nick: simpletal
    timestamp: Thu 2008-07-17 14:29:59 +0100
    message:
      Updated test running via 'make check'.
    modified:
      Makefile.am                    i_Automake_rules_for_toplevel_tla-pqm_directory
    ------------------------------------------------------------
    revno: 201.2.5
    revision-id: daniel at daniel-watkins.co.uk-20080717132924-inp6tuono4nly2w5
    parent: daniel at daniel-watkins.co.uk-20080717132831-0orqrlvoutgt6jws
    committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
    branch nick: simpletal
    timestamp: Thu 2008-07-17 14:29:24 +0100
    message:
      Improved wrapping of templates.
    modified:
      pqm/ui/twistd/template.py      template.html-20080709141329-kvidah0k5gmzbskb-1
    ------------------------------------------------------------
    revno: 201.2.4
    revision-id: daniel at daniel-watkins.co.uk-20080717132831-0orqrlvoutgt6jws
    parent: daniel at daniel-watkins.co.uk-20080717124715-fk7berhukdy0g49y
    committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
    branch nick: simpletal
    timestamp: Thu 2008-07-17 14:28:31 +0100
    message:
      Converted tests to use dedent.
    modified:
      pqm/ui/twistd/tests/test_twisted.py x_Robert_Collins_<robert.collins at canonical.com>_Sat_Jul__9_22:36:13_2005_7873.0
    ------------------------------------------------------------
    revno: 201.2.3
    revision-id: daniel at daniel-watkins.co.uk-20080717124715-fk7berhukdy0g49y
    parent: daniel at daniel-watkins.co.uk-20080717124542-fhwaoacss5jbzwjt
    committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
    branch nick: simpletal
    timestamp: Thu 2008-07-17 13:47:15 +0100
    message:
      Further manual updates.
    modified:
      manual.xml                     i_manual_for_the_tla_patch_queue_manager
    ------------------------------------------------------------
    revno: 201.2.2
    revision-id: daniel at daniel-watkins.co.uk-20080717124542-fhwaoacss5jbzwjt
    parent: daniel at daniel-watkins.co.uk-20080717123427-6qq4cmlf1yj7izdk
    committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
    branch nick: simpletal
    timestamp: Thu 2008-07-17 13:45:42 +0100
    message:
      Refactored twistd UI code to it's own module, pqm.ui.twistd.
    added:
      pqm/ui/twistd/                 twisted-20080717123501-30ahtsgvr52z4e6f-1
    renamed:
      pqm/ui/template.py => pqm/ui/twistd/template.py template.html-20080709141329-kvidah0k5gmzbskb-1
      pqm/ui/tests => pqm/ui/twistd/tests x_Robert_Collins_<robert.collins at canonical.com>_Sat_Jul__9_22:35:48_2005_7870.0
      pqm/ui/twistd.py => pqm/ui/twistd/__init__.py x_Robert_Collins_<robert.collins at canonical.com>_Sun_Jul_10_02:00:08_2005_15556.0
    modified:
      Makefile.am                    i_Automake_rules_for_toplevel_tla-pqm_directory
      pqm/ui/twistd/__init__.py      x_Robert_Collins_<robert.collins at canonical.com>_Sun_Jul_10_02:00:08_2005_15556.0
    ------------------------------------------------------------
    revno: 201.2.1
    revision-id: daniel at daniel-watkins.co.uk-20080717123427-6qq4cmlf1yj7izdk
    parent: daniel at daniel-watkins.co.uk-20080710132248-spgomd25jctavk50
    committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
    branch nick: simpletal
    timestamp: Thu 2008-07-17 13:34:27 +0100
    message:
      Updated requirements in manual.xml.
    modified:
      manual.xml                     i_manual_for_the_tla_patch_queue_manager
-------------- next part --------------
=== modified file 'Makefile.am'
--- a/Makefile.am	2007-05-21 01:00:47 +0000
+++ b/Makefile.am	2008-07-17 13:29:59 +0000
@@ -32,7 +32,7 @@
 	rm -f manual.html
 
 check-local:
-	PYTHONPATH=$(PYTHONPATH) trial pqm.tests pqm.ui.tests
+	PYTHONPATH=$(PYTHONPATH) trial pqm
 
 EXTRA_DIST = autogen.sh $(regulardocs_DATA) manual.xml $(bin_SCRIPTS)
 

=== modified file 'manual.xml'
--- a/manual.xml	2007-09-20 23:03:38 +0000
+++ b/manual.xml	2008-07-17 12:47:15 +0000
@@ -149,6 +149,12 @@
           <para>config-manager (used for url mapping and nested tree support).</para>
         </listitem>
         <listitem>
+          <para>Twisted (optional, but required for the Web UI)</para>
+        </listitem>
+        <listitem>
+          <para>SimpleTAL (optional, but required for the Twisted UI)</para>
+        </listitem>
+        <listitem>
           <para>Pybaz (optional, for baz support).</para>
         </listitem>
         <listitem>
@@ -157,6 +163,9 @@
         <listitem>
           <para>GNUPG (optional, but <emphasis>highly</emphasis> recommended)</para>
         </listitem>
+        <listitem>
+          <para>BeautifulSoup (optional, but required for Twisted UI tests)</para>
+        </listitem>
       </orderedlist>
     </section>
     <section>

=== added directory 'pqm/ui/twistd'
=== renamed file 'pqm/ui/twistd.py' => 'pqm/ui/twistd/__init__.py'
--- a/pqm/ui/twistd.py	2008-07-14 14:27:32 +0000
+++ b/pqm/ui/twistd/__init__.py	2008-07-31 03:41:12 +0000
@@ -29,7 +29,7 @@
 from twisted.web import resource, server, static
 
 import pqm
-from pqm.ui.template import html_template, rss_template
+from pqm.ui.twistd.template import html_template, rss_template
 
 
 class QueueResource(resource.Resource):

=== renamed file 'pqm/ui/template.py' => 'pqm/ui/twistd/template.py'
--- a/pqm/ui/template.py	2008-07-14 14:10:20 +0000
+++ b/pqm/ui/twistd/template.py	2008-07-31 03:41:12 +0000
@@ -1,4 +1,5 @@
-html_template = """<html>
+html_template = """\
+<html>
 <head>
     <title>Patch Queue Manager</title>
 </head>

=== renamed directory 'pqm/ui/tests' => 'pqm/ui/twistd/tests'
=== modified file 'pqm/ui/twistd/tests/test_twisted.py'
--- a/pqm/ui/tests/test_twisted.py	2008-07-14 14:10:20 +0000
+++ b/pqm/ui/twistd/tests/test_twisted.py	2008-07-31 03:41:12 +0000
@@ -1,3 +1,4 @@
+from textwrap import dedent
 from twisted.trial import unittest
 from twisted.web.resource import getChildForRequest
 from twisted.web.test.test_web import DummyRequest
@@ -69,53 +70,52 @@
         request = DummyRequest([''])
         result_resource = getChildForRequest(queue, request)
         html = BeautifulSoup(result_resource.render(request)).prettify()
-        expected = ("<html>\n"
-                    " <head>\n"
-                    "  <title>\n"
-                    "   Patch Queue Manager\n"
-                    "  </title>\n"
-                    " </head>\n"
-                    " <body>\n"
-                    "  <h1>\n"
-                    "   PQM Queue: 3 scripts\n"
-                    "  </h1>\n"
-                    "  <p>\n"
-                    "   Current time: ...\n"
-                    "  </p>\n"
-                    "  <h2>\n"
-                    "   Now playing...\n"
-                    "  </h2>\n"
-                    "  <ul>\n"
-                    "   <li>\n"
-                    "    <p>\n"
-                    "     A request for another project.\n"
-                    "    </p>\n"
-                    "   </li>\n"
-                    "  </ul>\n"
-                    "  <h2>\n"
-                    "   Coming up\n"
-                    "  </h2>\n"
-                    "  <ol>\n"
-                    "   <li>\n"
-                    "    <p>\n"
-                    "     ...: John.Citizen at example.com, Request for"
-                                         " non-PQM managed branch.\n"
-                    "    </p>\n"
-                    "   </li>\n"
-                    "   <li>\n"
-                    "    <p>\n"
-                    "     ...: John.Citizen at example.com, 'A new action'\n"
-                    "     <ol>\n"
-                    "      <li>\n"
-                    "       Merge archive at example.com/foo--bar--0"
-                             " archive2 at example.com/bar--foo--2\n"
-                    "      </li>\n"
-                    "     </ol>\n"
-                    "    </p>\n"
-                    "   </li>\n"
-                    "  </ol>\n"
-                    " </body>\n"
-                    "</html>")
+        expected = dedent("""\
+            <html>
+             <head>
+              <title>
+               Patch Queue Manager
+              </title>
+             </head>
+             <body>
+              <h1>
+               PQM Queue: 3 scripts
+              </h1>
+              <p>
+               Current time: ...
+              </p>
+              <h2>
+               Now playing...
+              </h2>
+              <ul>
+               <li>
+                <p>
+                 A request for another project.
+                </p>
+               </li>
+              </ul>
+              <h2>
+               Coming up
+              </h2>
+              <ol>
+               <li>
+                <p>
+                 ...: John.Citizen at example.com, Request for non-PQM managed branch.
+                </p>
+               </li>
+               <li>
+                <p>
+                 ...: John.Citizen at example.com, 'A new action'
+                 <ol>
+                  <li>
+                   Merge archive at example.com/foo--bar--0 archive2 at example.com/bar--foo--2
+                  </li>
+                 </ol>
+                </p>
+               </li>
+              </ol>
+             </body>
+            </html>""")
         self.assertDocTest(expected, html)
 
     def testProjectSpecificPage(self):
@@ -133,60 +133,59 @@
         request = DummyRequest(['project', ''])
         result_resource = getChildForRequest(queue, request)
         html = BeautifulSoup(result_resource.render(request)).prettify()
-        expected = ("<html>\n"
-                    " <head>\n"
-                    "  <title>\n"
-                    "   Patch Queue Manager\n"
-                    "  </title>\n"
-                    " </head>\n"
-                    " <body>\n"
-                    "  <h1>\n"
-                    "   PQM Queue: 3 scripts\n"
-                    "  </h1>\n"
-                    "  <p>\n"
-                    "   Current time: ...\n"
-                    "  </p>\n"
-                    "  <h2>\n"
-                    "   Now playing...\n"
-                    "  </h2>\n"
-                    "  <pre>\n"
-                    "   &lt;foo\n"
-                    "bar\n"
-                    "baz\n"
-                    "quux\n"
-                    "theta\n"
-                    "  </pre>\n"
-                    "  <ul>\n"
-                    "   <li>\n"
-                    "    <p>\n"
-                    "     ...: John.Citizen at example.com, 'A new action'\n"
-                    "     <ol>\n"
-                    "      <li>\n"
-                    "       Merge archive at example.com/foo--bar--0"
-                             " archive2 at example.com/bar--foo--1\n"
-                    "      </li>\n"
-                    "     </ol>\n"
-                    "    </p>\n"
-                    "   </li>\n"
-                    "  </ul>\n"
-                    "  <h2>\n"
-                    "   Coming up\n"
-                    "  </h2>\n"
-                    "  <ol>\n"
-                    "   <li>\n"
-                    "    <p>\n"
-                    "     ...: John.Citizen at example.com, Request for non-PQM"
-                                                         " managed branch.\n"
-                    "    </p>\n"
-                    "   </li>\n"
-                    "   <li>\n"
-                    "    <p>\n"
-                    "     A request for another project.\n"
-                    "    </p>\n"
-                    "   </li>\n"
-                    "  </ol>\n"
-                    " </body>\n"
-                    "</html>")
+        expected = dedent("""\
+            <html>
+             <head>
+              <title>
+               Patch Queue Manager
+              </title>
+             </head>
+             <body>
+              <h1>
+               PQM Queue: 3 scripts
+              </h1>
+              <p>
+               Current time: ...
+              </p>
+              <h2>
+               Now playing...
+              </h2>
+              <pre>
+               &lt;foo
+            bar
+            baz
+            quux
+            theta
+              </pre>
+              <ul>
+               <li>
+                <p>
+                 ...: John.Citizen at example.com, 'A new action'
+                 <ol>
+                  <li>
+                   Merge archive at example.com/foo--bar--0 archive2 at example.com/bar--foo--1
+                  </li>
+                 </ol>
+                </p>
+               </li>
+              </ul>
+              <h2>
+               Coming up
+              </h2>
+              <ol>
+               <li>
+                <p>
+                 ...: John.Citizen at example.com, Request for non-PQM managed branch.
+                </p>
+               </li>
+               <li>
+                <p>
+                 A request for another project.
+                </p>
+               </li>
+              </ol>
+             </body>
+            </html>""")
         self.assertDocTest(expected, html)
     
     def testEmptyQueue(self):



More information about the bazaar-commits mailing list