3 new revisions:
Revision: b1d1f3edf8c6
Branch: default
Author: Mikko Korpela <[email protected]>
Date: Fri Nov 8 13:25:05 2013 UTC
Log: OperatingSystem#grep_file: do not read whole file in to memory
http://code.google.com/p/robotframework/source/detail?r=b1d1f3edf8c6
Revision: 70ef5adde423
Branch: default
Author: Mikko Korpela <[email protected]>
Date: Sat Nov 9 09:28:33 2013 UTC
Log: merge
http://code.google.com/p/robotframework/source/detail?r=70ef5adde423
Revision: f73b8d6f493d
Branch: default
Author: Mikko Korpela <[email protected]>
Date: Sat Nov 9 09:31:17 2013 UTC
Log: versions.txt: Update jsxcompressor.min version
http://code.google.com/p/robotframework/source/detail?r=f73b8d6f493d
==============================================================================
Revision: b1d1f3edf8c6
Branch: default
Author: Mikko Korpela <[email protected]>
Date: Fri Nov 8 13:25:05 2013 UTC
Log: OperatingSystem#grep_file: do not read whole file in to memory
http://code.google.com/p/robotframework/source/detail?r=b1d1f3edf8c6
Modified:
/src/robot/libraries/OperatingSystem.py
=======================================
--- /src/robot/libraries/OperatingSystem.py Tue Nov 5 08:46:37 2013 UTC
+++ /src/robot/libraries/OperatingSystem.py Fri Nov 8 13:25:05 2013 UTC
@@ -360,10 +360,21 @@
Lines Matching Regexp`.
"""
pattern = '*%s*' % pattern
- orig = self.get_file(path, encoding).splitlines()
- lines = [line for line in orig if fnmatch.fnmatchcase(line,
pattern)]
- self._info('%d out of %d lines matched' % (len(lines), len(orig)))
- return '\n'.join(lines)
+ path = self._absnorm(path)
+ lines = []
+ total_lines = 0
+ self._link("Reading file '%s'", path)
+ f = open(path, 'rb')
+ try:
+ for line in f:
+ total_lines += 1
+ line = unicode(line,
encoding).replace('\r\n', '\n').rstrip('\n')
+ if fnmatch.fnmatchcase(line, pattern):
+ lines.append(line)
+ self._info('%d out of %d lines matched' % (len(lines),
total_lines))
+ return '\n'.join(lines)
+ finally:
+ f.close()
def log_file(self, path, encoding='UTF-8'):
"""Wrapper for `Get File` that also logs the returned file.
==============================================================================
Revision: 70ef5adde423
Branch: default
Author: Mikko Korpela <[email protected]>
Date: Sat Nov 9 09:28:33 2013 UTC
Log: merge
http://code.google.com/p/robotframework/source/detail?r=70ef5adde423
==============================================================================
Revision: f73b8d6f493d
Branch: default
Author: Mikko Korpela <[email protected]>
Date: Sat Nov 9 09:31:17 2013 UTC
Log: versions.txt: Update jsxcompressor.min version
http://code.google.com/p/robotframework/source/detail?r=f73b8d6f493d
Modified:
/src/robot/htmldata/lib/versions.txt
=======================================
--- /src/robot/htmldata/lib/versions.txt Fri Oct 11 20:35:08 2013 UTC
+++ /src/robot/htmldata/lib/versions.txt Sat Nov 9 09:31:17 2013 UTC
@@ -15,7 +15,7 @@
jsxcompressor.min
-----------------
from http://jsxgraph.uni-bayreuth.de/distrib/jsxcompressor.zip
-downloaded 11th October 2013.
+Version 0.98.2
jquery.tablesorter.min
----------------------
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.