Rev 740: include the time patch in http://bzr.arbash-meinel.com/plugins/bzrtools
John Arbash Meinel
john at arbash-meinel.com
Thu Dec 17 22:07:47 GMT 2009
At http://bzr.arbash-meinel.com/plugins/bzrtools
------------------------------------------------------------
revno: 740 [merge]
revision-id: john at arbash-meinel.com-20091217220727-dbt6e7dx0neytepf
parent: john at arbash-meinel.com-20091217212358-0w6ye571hc2nbb20
parent: john at arbash-meinel.com-20091217220334-951uf5olpy5pdn66
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: bzrtools
timestamp: Thu 2009-12-17 16:07:27 -0600
message:
include the time patch
modified:
shell.py shell.py-20051027040441-2911d8e8e5673742
-------------- next part --------------
=== modified file 'shell.py'
--- a/shell.py 2009-12-17 21:23:58 +0000
+++ b/shell.py 2009-12-17 22:07:27 +0000
@@ -23,6 +23,7 @@
import stat
import string
import sys
+import time
from bzrlib import osutils
from bzrlib.branch import Branch
@@ -176,6 +177,16 @@
def do_help(self, line):
self.default("help "+line)
+ def do_time(self, line):
+ if line:
+ start = time.time()
+ self.default(line)
+ end = time.time()
+ sys.stderr.write("%.3fs\n" % (end - start,))
+ else:
+ # Someone just ran 'time', output the current time
+ sys.stderr.write('%s\n' % (time.asctime(),))
+
def default(self, line):
try:
args = shlex.split(line)
More information about the bazaar-commits
mailing list