Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SVN #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Add support for SVN #1

wants to merge 11 commits into from

Conversation

craigtmoore
Copy link

I've reformatted the file (resolved tabs and spaces) and also added support for SVN.

- Copy gitpromt to svn_prompt.sh and adapt to work with SVN
  * should merge with git prompt so it can work with either svn or git
…ile)

- Copy contents of globals.sh into svn_prompt.sh
  * update formatting (replace all tabs with spaces)
- Update svn_prompt.sh:
  * make check_if_up_to_date, global (so it is available in the 2nd
    while loop
  * remove echo debug statment
- Update gitprompt.sh:
  * merged changes from svn_prompt.sh into gitprompt.sh
  * update version number 2.0.0
- Update README.md:
  * Add note about svn status to README
  * GetStatus() change CommitStatus to SvnCommitStatus
  * Delete MaybeEchoComma
  * Delete the 'gs_first' global variable (it was used by the
    MaybeEchoComma function)
  * Add MakeStatus: similar to MaybeEchoComma, but makes the new status
    value (with or without a comma)
  * Update GitCommitStatus and SvnCommitStatus:
    - now uses the new MakeStatus method
    - Also they now pass in the values using a '<<<' redirect so that
      the 'status' variable doesn't become detached from the current
      shell
    - Update SvnCommitStatus to have a fall back "UNKNOWN STATUS"
  * remove extra 'echo' and pass value to while loop
    using "<<<"
@Enfors
Copy link
Owner

Enfors commented Nov 20, 2018

Hello! I'm very happy that you decided to contribute! I've never used pull requests before, so I'm not sure how this works, but I'm definitely interested in what you've done. I'll see if maybe I can accept your pull request into the develop branch (or something) so I can check it out before I merge it into master also?

@Enfors
Copy link
Owner

Enfors commented Nov 20, 2018

Also, I'm very thankful you cleared up the tabs vs spaces issue - I didn't know I had tabs in there. Emacs is going to get a stern talking-to, because this is just embarrassing.

@Enfors
Copy link
Owner

Enfors commented Nov 20, 2018

Okay, I figured out how to test your version now, and I have some issues with it:

  • It seems you've removed the brackets around the time. I prefer to have them there, but I can make that configurable, so that you can disable them on your end. Does that sound okay?
  • Also, it seems that the actual git status part doesn't work anymore (it doesn't show up); I suspect you haven't tested that? Could you perhaps have a look at that? If you don't have a git repo to test with, just make an empty directory and type "git init" inside it, that should be enough for basic testing.

@craigtmoore
Copy link
Author

craigtmoore commented Nov 20, 2018

Yeah we can configure the format somehow. I'll try to work it out. The git was working for my on my end, but maybe I have some outstanding commits on my end. I'll look into it.

@craigtmoore
Copy link
Author

craigtmoore commented Nov 20, 2018

This is what I see on my end. The first folder is my svn repo for my scripts. And the second is the directory where I have the gitprompt code checked in.

18:41 wsi@ubuntu ~/bin [trunk]: Untracked, Modified
$ cd /home/wsi/dev/workspace-gitprompt

18:41 wsi@ubuntu ~/dev/workspace-gitprompt [master]: Untracked
$

Note: the untracked file is my IntelliJ project file.

@craigtmoore
Copy link
Author

Out of curiosity, how did you try out my changes did you merge them into your branch locally or did you switch to my branch?

  * Rename MakeStatus to UpdateStatus
  * Update GitCommitStatus and SvnCommitStatus
    - Add default values for local variables
    - Merge nested if statements into a single and status
  * Update SvnCommitStatus:
    * Add '--non-interactive --ignore-externals' to the svn status command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants