lp:mergou

Created by yacine chaouche and last modified
Get this branch:
bzr branch lp:mergou
Only yacine chaouche can upload to this branch. If you are yacine chaouche please log in for upload directions.

Related bugs

Related blueprints

Branch information

Owner:
yacine chaouche
Project:
Mergou
Status:
Development

Recent revisions

106. By yacine chaouche

modified:
  code_browser.py
  reader.py
  sourcestats.py

Added the necessary code to handle unicode in source code. This was especially broken when giving text to external process less.

105. By Yassine Chaouche <email address hidden>

Added some missing documentation files and two test files I don't remember what' the purpose of having them created :(

104. By Yassine Chaouche <email address hidden>

Fixed a bug that discounted lines of code when paren mismatch was in a string. Example :

start_code = '\033[31;1;5m' 27

and

end_code = '\033[m' 21

are both treated as leaving an open bracket, which is a bug because the reader should ignore brackets inside strings.

The solution was to compile the line if there's a parens mismatch which gives a somewhat good indicator about the location of the paren (part of the code or not).

SOLUTION:

    def _parse(self,line):
        _line = line.lstrip()
        missing = _line.count("(") + _line.count("[") - _line.count(")") - _line.count("]")
        # make sure that there's really something missing
        if missing :
            utils.debug("[DEBUG Reader._parse] paren mismatch", missing)
            try:
                compile(_line,"/tmp/tmpcode","single")
                utils.debug("[DEBUG Reader._parse] line compiles.")
            except SyntaxError,e:
                utils.debug("[DEBUG Reader._parse] line doesn't compile")
                self._open_parens += missing

 ...

103. By Yassine Chaouche <email address hidden>

Another bug in reader that discounted (but printed) single line docstrings.

102. By Yassine Chaouche <email address hidden>

Fixed a bug in the reader that was incorrectly handling one linde docstrings.

101. By Yassine Chaouche <email address hidden>

 - Jump is now context agnostic, let you jump from any location to any location.
 - Improved utils.columnize, but still a little buggy somtimes.

100. By Yassine Chaouche <email address hidden>

Complete rewrite of the Reader class without the tokenize module.
Huge performance stats : scanning /usr/lib/python-2.7/ in 1:22 minutes instead of nearly 10 minutes.

99. By Yassine Chaouche <email address hidden>

Defined a single columnize function instead of two.

98. By Yassine Chaouche <email address hidden>

 - Implemented a symbols command, it lists all the symbols defined below the current node. These are displayed in autocompletion on grep and jump commands.
 - Also defined a utils.columnize function

97. By Yassine Chaouche <email address hidden>

Fixed a little bug in do_less (s/get/get_node)

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers