Commit Graph

30 Commits

Author SHA1 Message Date
ZyX cb99c06027 Move watcher tests into a separate file 2014-08-16 15:06:57 +04:00
ZyX 2faa2a254f Move tree_watcher to powerline/lib/watcher and split it 2014-08-16 15:06:57 +04:00
ZyX 61074fcd6c Refactor file_watcher.py into four files 2014-08-16 14:47:51 +04:00
ZyX 871ce5727b Set use_mercurial and use_bzr to False in PyPy 2014-07-10 19:49:37 +04:00
ZyX 623395a013 Remove outdated comment 2014-06-28 22:18:45 +04:00
ZyX d7d8108230 Fix error in python-3* that happens while checking branch name 2014-06-28 22:12:41 +04:00
ZyX 4d4da56838 Check whether it runs fine in travis 2014-06-28 21:46:12 +04:00
ZyX 317f4be43f Add tests for git symlinks 2014-06-28 21:45:24 +04:00
ZyX c570a98065 Add watcher option
Ref #818
2014-06-28 21:10:15 +04:00
ZyX be2fe98a21 Add support for omitting VALUE
This will remove error reported in #853, but not its cause
2014-05-04 13:01:29 +04:00
ZyX acff89a8e9 Remove useless lock 2014-02-26 08:15:26 +04:00
ZyX ba41cecb72 Add powerline.lib.threaded tests 2014-02-23 15:18:20 +04:00
ZyX 68a6fd056c Use monotonic() in place of time.time() 2014-02-23 14:44:36 +04:00
Kovid Goyal 7423b55cc4 Fix git branch name sometimes getting stuck with inotify
If you try to checkout the already current branch in git, git creates
HEAD.lock and renames it to HEAD. This causes the inode of HEAD to
change and so the inotify file watcher stops tracking HEAD.

The fix is to re-create the inotify watch when the file attributes
change. This is a bit of a performance penalty as most of the time the
attribute changes are simple last modified time/size changes, but since
inotify provides no way to know specifically when the inode has changed,
this is the best we can do.
2013-09-25 10:27:48 +05:30
Jack Zhou 72b082a510 Change [DETACHED HEAD] message to a short hash of the detached head. 2013-06-28 13:49:45 +02:00
Kovid Goyal ad55daf9c3 Make vcs segments *much* faster
Do not call vcs status unless the relevant files have changed.
Uses inotify, if available, otherwise falls back to stat() based
monitoring. Fixes #396
2013-05-02 11:13:54 +05:30
ZyX 5b8b3599be Fix tests on python-2.6 2013-04-06 19:01:59 +04:00
ZyX e68bae6409 Add fixes for flake8 to that stuff 2013-04-06 18:53:16 +04:00
ZyX 42ee82c1de Update *watcher stuff from @kovidgoyal develop branch 2013-04-06 18:48:04 +04:00
ZyX 63e2942929 Also take tests from @kovidgoyal develop branch 2013-04-06 17:16:55 +04:00
ZyX a4adc92215 Do not import memoize, humanize_bytes and urllib_* in powerline.lib 2013-03-17 21:21:03 +04:00
Kim Silkebækken 8cdd12a800 Merge remote-tracking branch 'zyx-i/326-fix-None-handling' into develop 2013-03-15 14:18:03 +01:00
ZyX 48470221f0 Make git.Repository.status() also return None
Fixes #326
2013-03-14 20:03:26 +04:00
ZyX b2b05cb81c Removed underscore_to_camelcase
No need to bother both developers (that need to create class names compatible 
with file name, which is not obvious if not looking into main Powerline class) 
and computer (that needs to recompute class name each time) if it is possible to 
bother only developers (or only computer, but this contributes to higher startup 
times).

About not obvious: when you look into zsh_prompt.py and see only 
ZshPromptRenderer name you only think that powerline upstream is following 
strict code style. You don’t think there is a technical reason for such naming, 
like you don’t think there is technical reason for having blank lines. When you 
look into zsh_prompt.py and see `renderer = ZshPromptRenderer` it is obvious 
that there is technical reason for writing code this way because new variable is 
never used in the module itself.
2013-03-11 22:22:18 +04:00
ZyX 4374e1f71c Fix git/hg repo tests 2013-03-11 15:53:34 +01:00
Kim Silkebækken 111eaa27e8 Combine vim modelines and Python encoding declarations
Ref #314
2013-03-11 10:40:09 +01:00
Kim Silkebækken 6748701fcb Add vim modelines to all Python files
Added with `sed -i '2i# vim:fenc=utf-8:noet' `find -name '*.py'`` and
fixed in a couple of files without the UTF-8 encoding on top.

Ref #314
2013-03-11 08:11:25 +01:00
Kovid Goyal c70d3b38b6 Add bzr support 2013-03-11 07:09:42 +01:00
ZyX aa0a8bf76d Make tests support python2.6
Old unittest is not working for unknown reason, using unittest2 instead
2013-03-03 21:03:40 +01:00
ZyX 584755765b Start adding tests
Tests are temporary disabled on all branches except tests (does not really work
though, needs travis.yml in all branches).
2013-03-03 21:03:19 +01:00