Giter Club home page Giter Club logo

powerline-svnstatus's People

Contributors

caster avatar justinludwig avatar tkocmathla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

powerline-svnstatus's Issues

does not work when powerline-daemon is used

the svn command are run on the current folder of the daemon, not the current folder of the shell

    proc = Popen(['svn', 'info'], stdout=PIPE, stderr=PIPE)

You correctly check there is a cwd in the segment info, but don't use it. Solution: use it

    proc = Popen(['svn', 'info', cwd], stdout=PIPE, stderr=PIPE)

same apply for svn status

repository status marked as dirty if there are external references

script is assuming that if svn status returns something, the folder is dirty. However, if it returns only external references (marked X), it should not consider folder dirty:

dispatcher > workbench > war > copan/trunk > X 1 > LANG=C svn status
X       js

Performing status on external item at 'js':
dispatcher > workbench > war > copan/trunk > X 1 >

Non english language is not supported

First operation done during svn status parsing is looking for the string 'URL: '. But on french language, string is 'URL :', because french language mandate space before semicolumn and not after. On a french station, this plugin will just consider path as not an svn path. This could be widely different depending on other languages i suspect.

svn info
Chemin : .
Chemin racine de la copie de travail : /home/xxxx/Workspaces/coba/coba-root
URL : https://xxxx/svn-ptx/coba/trunk
Relative URL: ^/trunk

Solution, force SVN to run in "C" environment to fallback to classical english output:

def make_env(self, segment_info):
    myenv = segment_info["environ"].copy()
    myenv["LANG"]="C"
    myenv["LC_MESSAGES"]="C"
    return myenv


   proc = Popen(['svn', 'info'], stdout=PIPE, stderr=PIPE, env=self.make_env(segment_info))
   proc = Popen(['svn', 'status'], stdout=PIPE, stderr=PIPE, env=self.make_env(segment_info))

breaks when using svn-external

The code assume that each line of svn status will provide a file / folder status with one letter and it will try to classify it. If you are running with a svn external, the svn status looks like this

`? .project
X admin
M automatix/java/com/acunia/automatix/server/eshipco/ESEngine.java
M automatix/java/com/acunia/automatix/server/eshipco/EWAEngine.java
M automatix/library.properties
? automatix/resource/setup/server-devDavidD.properties
? automatix/resource/setup/server-localhost.properties
A automatix-eshipco
A + automatix-eshipco/build.xml
A + automatix-eshipco/library.properties

Performing status on external item at 'admin/build':
`
it's choking on last line. In build_status_segment, pair[0] is an empty string and pair[0][0] is sending an exception.

Quick fix: use --ignore-externals to get svn status
proc = Popen(['svn', 'status', '--ignore-externals', cwd], stdout=PIPE, stderr=PIPE)

and handle empty pairs as a safenet
general_group = 'svnstatus_%s' % pair[0][0] if pair[0] else 'svnstatus_'

Option to display revision instead of "branch"?

It would be great if there would be an option to display other information in the first segment than just the "branch" of the SVN repository. At the moment, the segment is hardcoded to look for a line in svn status that starts with URL and then applies a regex to that. It might be nice if there would be an option to set which line to search for, maybe?

The reason I am interested in this, is that the SVN repositories I have do not use branches at all. Therefore, the revision number is the most useful information I could have in my prompt.

Thanks in advance for considering this!

Disable for custom paths

It would be nice if I could disable this for some paths.
ex. I have mounted some external big repository and it takes few minutes to run svn status on it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.