Rev 3173: Merge bzr.dev to deal with reindenting in NEWS. in http://people.ubuntu.com/~robertc/baz2.0/integration
Robert Collins
robertc at robertcollins.net
Thu Jan 10 01:45:24 GMT 2008
At http://people.ubuntu.com/~robertc/baz2.0/integration
------------------------------------------------------------
revno: 3173
revision-id:robertc at robertcollins.net-20080110014517-k02chl1xfz8ftdqa
parent: robertc at robertcollins.net-20080110013010-s0eei50kbu2jg6tt
parent: pqm at pqm.ubuntu.com-20080110011547-97smthgbb8hfshs7
committer: Robert Collins <robertc at robertcollins.net>
branch nick: integration
timestamp: Thu 2008-01-10 12:45:17 +1100
message:
Merge bzr.dev to deal with reindenting in NEWS.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/debug.py debug.py-20061102062349-vdhrw9qdpck8cl35-1
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/tests/TestUtil.py TestUtil.py-20050824080200-5f70140a2d938694
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3169.1.2
revision-id:pqm at pqm.ubuntu.com-20080110011547-97smthgbb8hfshs7
parent: pqm at pqm.ubuntu.com-20080107174938-hvwo399dzshh3cod
parent: andrew.bennetts at canonical.com-20080109232145-31w2ijecmaefb9dr
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-01-10 01:15:47 +0000
message:
(andrew) Add -Dtimes debug flag.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/debug.py debug.py-20061102062349-vdhrw9qdpck8cl35-1
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3169.1.1.1.2
revision-id:andrew.bennetts at canonical.com-20080109232145-31w2ijecmaefb9dr
parent: andrew.bennetts at canonical.com-20080109070423-kfmpx0s8mcb8sy8p
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: debug-timestamps
timestamp: Thu 2008-01-10 10:21:45 +1100
message:
Update test_resource_string for new debug.py contents.
modified:
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
------------------------------------------------------------
revno: 3169.1.1.1.1
revision-id:andrew.bennetts at canonical.com-20080109070423-kfmpx0s8mcb8sy8p
parent: pqm at pqm.ubuntu.com-20080107174938-hvwo399dzshh3cod
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: debug-timestamps
timestamp: Wed 2008-01-09 18:04:23 +1100
message:
Add -Dtimes, which adds a timestamp to mutters (using the time since the first mutter).
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/debug.py debug.py-20061102062349-vdhrw9qdpck8cl35-1
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3169.1.1
revision-id:pqm at pqm.ubuntu.com-20080107174938-hvwo399dzshh3cod
parent: pqm at pqm.ubuntu.com-20080105015401-67wgbytv81394cl1
parent: v.ladeuil+lp at free.fr-20080107164746-bome6yaxlwqbc7kh
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2008-01-07 17:49:38 +0000
message:
Reduce selftest overhead to establish test names by memoization
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/TestUtil.py TestUtil.py-20050824080200-5f70140a2d938694
------------------------------------------------------------
revno: 3169.2.1
revision-id:v.ladeuil+lp at free.fr-20080107164746-bome6yaxlwqbc7kh
parent: pqm at pqm.ubuntu.com-20080105015401-67wgbytv81394cl1
parent: v.ladeuil+lp at free.fr-20080107164531-6qm2hwnnkoipth60
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: trunk
timestamp: Mon 2008-01-07 17:47:46 +0100
message:
Reduce selftest overhead to establish test names by memoization
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/TestUtil.py TestUtil.py-20050824080200-5f70140a2d938694
------------------------------------------------------------
revno: 3146.7.2
revision-id:v.ladeuil+lp at free.fr-20080107164531-6qm2hwnnkoipth60
parent: v.ladeuil+lp at free.fr-20071229120125-1vf2l1w7x8y3pw9i
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: selftest
timestamp: Mon 2008-01-07 17:45:31 +0100
message:
Review feedback. Fix variable names and scope.
modified:
bzrlib/tests/TestUtil.py TestUtil.py-20050824080200-5f70140a2d938694
------------------------------------------------------------
revno: 3146.7.1
revision-id:v.ladeuil+lp at free.fr-20071229120125-1vf2l1w7x8y3pw9i
parent: pqm at pqm.ubuntu.com-20071228175832-9kboqtkemnuzzlab
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: selftest
timestamp: Sat 2007-12-29 13:01:25 +0100
message:
Reduce selftest overhead to establish test names by memoization.
* TestUtil.py:
(TestLoader.getTestCaseNames): Memoize test names.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/TestUtil.py TestUtil.py-20050824080200-5f70140a2d938694
=== modified file 'NEWS'
--- a/NEWS 2008-01-07 01:27:38 +0000
+++ b/NEWS 2008-01-10 01:45:17 +0000
@@ -141,24 +141,30 @@
INTERNALS:
- * find_* methods available for BzrDirs, Branches and WorkingTrees.
- (Aaron Bentley)
-
- * Help topics can now be loaded from files.
- (Ian Clatworthy, Alexander Belchenko)
-
- * get_parent_map now always provides tuples as its output. (Aaron Bentley)
-
- * New method ``iter_inventories`` on Repository for access to many
- inventories. This is primarily used by the ``revision_trees`` method, as
- direct access to inventories is discouraged. (Robert Collins)
-
- * Parent Providers should now implement ``get_parent_map`` returning a
- dictionary instead of ``get_parents`` returning a list.
- ``get_parents`` is now considered deprecated. (John Arbash Meinel)
-
- * Patience Diff now supports arbitrary python objects, as long as they
- support ``hash()``. (John Arbash Meinel)
+ * Add -Dtimes debug flag, which records a timestamp against each mutter to
+ the trace file, relative to the first mutter. (Andrew Bennetts)
+
+ * find_* methods available for BzrDirs, Branches and WorkingTrees.
+ (Aaron Bentley)
+
+ * Help topics can now be loaded from files.
+ (Ian Clatworthy, Alexander Belchenko)
+
+ * get_parent_map now always provides tuples as its output. (Aaron Bentley)
+
+ * New method ``iter_inventories`` on Repository for access to many
+ inventories. This is primarily used by the ``revision_trees`` method, as
+ direct access to inventories is discouraged. (Robert Collins)
+
+ * Parent Providers should now implement ``get_parent_map`` returning a
+ dictionary instead of ``get_parents`` returning a list.
+ ``get_parents`` is now considered deprecated. (John Arbash Meinel)
+
+ * Patience Diff now supports arbitrary python objects, as long as they
+ support ``hash()``. (John Arbash Meinel)
+
+ * Reduce selftest overhead to establish test names by memoization.
+ (Vincent Ladeuil)
API BREAKS:
=== modified file 'bzrlib/debug.py'
--- a/bzrlib/debug.py 2007-12-06 17:52:30 +0000
+++ b/bzrlib/debug.py 2008-01-09 07:04:23 +0000
@@ -16,7 +16,7 @@
# NOTE: If update these, please also update the help for global-options in
-# bzrlib/help_topics.py.
+# bzrlib/help_topics/__init__.py
debug_flags = set()
"""Set of flags that enable different debug behaviour.
@@ -29,11 +29,13 @@
* error - show stack traces for all top level exceptions
* evil - capture call sites that do expensive or badly-scaling operations.
* fetch - trace history copying between repositories
+ * hashcache - log every time a working file is read to determine its hash
* hooks - trace hook execution
* hpss - trace smart protocol requests and responses
* http - trace http connections, requests and responses
* index - trace major index operations
* lock - trace when lockdir locks are taken or released
* merge - emit information for debugging merges
+ * times - record timestamps from program start in trace file
"""
=== modified file 'bzrlib/help_topics/__init__.py'
--- a/bzrlib/help_topics/__init__.py 2008-01-03 02:17:12 +0000
+++ b/bzrlib/help_topics/__init__.py 2008-01-09 07:04:23 +0000
@@ -281,13 +281,15 @@
error.
-Devil Capture call sites that do expensive or badly-scaling
operations.
+-Dfetch Trace history copying between repositories.
-Dhashcache Log every time a working file is read to determine its hash.
-Dhooks Trace hook execution.
+-Dhpss Trace smart protocol requests and responses.
-Dhttp Trace http connections, requests and responses
--Dhpss Trace smart protocol requests and responses.
-Dindex Trace major index operations.
-Dlock Trace when lockdir locks are taken or released.
-Dmerge Emit information for debugging merges.
+-Dtimes Record timestamps from program start in trace file.
"""
_standard_options = \
=== modified file 'bzrlib/tests/TestUtil.py'
--- a/bzrlib/tests/TestUtil.py 2007-12-19 09:32:56 +0000
+++ b/bzrlib/tests/TestUtil.py 2008-01-07 16:47:46 +0000
@@ -77,6 +77,8 @@
"""Custom TestLoader to extend the stock python one."""
suiteClass = TestSuite
+ # Memoize test names by test class dict
+ test_func_names = {}
def loadTestsFromModuleNames(self, names):
"""use a custom means to load tests from modules.
@@ -122,6 +124,16 @@
else:
return basic_tests
+ def getTestCaseNames(self, test_case_class):
+ test_fn_names = self.test_func_names.get(test_case_class, None)
+ if test_fn_names is not None:
+ # We already calculate that
+ return test_fn_names
+
+ test_fn_names = unittest.TestLoader.getTestCaseNames(self,
+ test_case_class)
+ self.test_func_names[test_case_class] = test_fn_names
+ return test_fn_names
def _load_module_by_name(mod_name):
parts = mod_name.split('.')
=== modified file 'bzrlib/tests/test_osutils.py'
--- a/bzrlib/tests/test_osutils.py 2007-12-27 08:25:04 +0000
+++ b/bzrlib/tests/test_osutils.py 2008-01-09 23:21:45 +0000
@@ -1096,7 +1096,7 @@
# NOTE: If update these, please also update the help for global-options in
-# bzrlib/help_topics.py.
+# bzrlib/help_topics/__init__.py
debug_flags = set()
"""Set of flags that enable different debug behaviour.
@@ -1109,12 +1109,14 @@
* error - show stack traces for all top level exceptions
* evil - capture call sites that do expensive or badly-scaling operations.
* fetch - trace history copying between repositories
+ * hashcache - log every time a working file is read to determine its hash
* hooks - trace hook execution
* hpss - trace smart protocol requests and responses
* http - trace http connections, requests and responses
* index - trace major index operations
* lock - trace when lockdir locks are taken or released
* merge - emit information for debugging merges
+ * times - record timestamps from program start in trace file
"""
'''
=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py 2007-12-27 11:46:11 +0000
+++ b/bzrlib/trace.py 2008-01-09 07:04:23 +0000
@@ -55,6 +55,7 @@
import os
import sys
import re
+import time
from bzrlib.lazy_import import lazy_import
lazy_import(globals(), """
@@ -82,6 +83,7 @@
_trace_depth = 0
_bzr_log_file = None
_bzr_log_filename = None
+_bzr_log_opened = None
# configure convenient aliases for output routines
@@ -127,6 +129,14 @@
else:
out = fmt
out += '\n'
+ if 'times' in debug.debug_flags:
+ global _bzr_log_opened
+ if _bzr_log_opened is None:
+ # This is the first mutter since the process started. Start the
+ # clock from now.
+ _bzr_log_opened = time.time()
+ timestamp = '%0.3f' % (time.time() - _bzr_log_opened,)
+ out = '%s %s' % (timestamp, out)
_trace_file.write(out)
# TODO: jam 20051227 Consider flushing the trace file to help debugging
#_trace_file.flush()
More information about the bazaar-commits
mailing list