[MERGE 1/3] Towards XML log output: Remove code duplication

James Westby jw+debian at jameswestby.net
Sat Nov 4 17:42:30 GMT 2006


Hi,

When writing the tests for the xml log output I discovered that
test_cur_revno was defined twice in test_log.py, with exactly the same
body. The attached bundle simply removes one of the implementations. I
couldn't think of a reason why the two might be there, but if there is I
would be interested to learn what it is.

Thanks,

James

-- 
  James Westby   --    GPG Key ID: B577FE13    --     http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256
-------------- next part --------------
# Bazaar revision bundle v0.8
#
# message:
#   Delete duplicate test_cur_revno test.
#   
# committer: James Westby <jw+debian at jameswestby.net>
# date: Fri 2006-11-03 18:35:29.059000015 +0000

=== modified file bzrlib/tests/test_log.py
--- bzrlib/tests/test_log.py
+++ bzrlib/tests/test_log.py
@@ -91,26 +91,6 @@
         self.assertRaises(InvalidRevisionNumber, show_log, b, lf,
                           start_revision=1, end_revision=-1) 
 
-    def test_cur_revno(self):
-        wt = self.make_branch_and_tree('.')
-        b = wt.branch
-
-        lf = LogCatcher()
-        wt.commit('empty commit')
-        show_log(b, lf, verbose=True, start_revision=1, end_revision=1)
-        self.assertRaises(InvalidRevisionNumber, show_log, b, lf,
-                          start_revision=2, end_revision=1) 
-        self.assertRaises(InvalidRevisionNumber, show_log, b, lf,
-                          start_revision=1, end_revision=2) 
-        self.assertRaises(InvalidRevisionNumber, show_log, b, lf,
-                          start_revision=0, end_revision=2) 
-        self.assertRaises(InvalidRevisionNumber, show_log, b, lf,
-                          start_revision=1, end_revision=0) 
-        self.assertRaises(InvalidRevisionNumber, show_log, b, lf,
-                          start_revision=-1, end_revision=1) 
-        self.assertRaises(InvalidRevisionNumber, show_log, b, lf,
-                          start_revision=1, end_revision=-1) 
-
     def test_simple_log(self):
         eq = self.assertEquals
         

=== modified directory  // last-changed:jw+debian at jameswestby.net-2006110318352
... 9-be47e5c89dac325b
# revision id: jw+debian at jameswestby.net-20061103183529-be47e5c89dac325b
# sha1: 6b732a28cd36750e5adf53c56432cd7854551d73
# inventory sha1: 616c91fb498a34a87709f38242712ae11e9664e3
# parent ids:
#   pqm at pqm.ubuntu.com-20061103025929-903e67f4ce75803d
# base id: pqm at pqm.ubuntu.com-20061103025929-903e67f4ce75803d
# properties:
#   branch-nick: bzr.dev.duplication

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061104/9442976f/attachment.pgp 


More information about the bazaar mailing list