Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
2aa485ac
Commit
2aa485ac
authored
Dec 01, 2012
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1435 from Drarok/fix-svn
Fix backwards svn "dirty" state detection
parents
3657bf8e
120db35b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
svn.plugin.zsh
plugins/svn/svn.plugin.zsh
+6
-3
No files found.
plugins/svn/svn.plugin.zsh
View file @
2aa485ac
function
svn_prompt_info
{
function
svn_prompt_info
{
if
[
$(
in_svn
)
]
;
then
if
[
$(
in_svn
)
]
;
then
if
[
"x
$SVN_SHOW_BRANCH
"
=
"xtrue"
]
;
then
if
[
"x
$SVN_SHOW_BRANCH
"
=
"xtrue"
]
;
then
...
@@ -22,7 +23,7 @@ function in_svn() {
...
@@ -22,7 +23,7 @@ function in_svn() {
function
svn_get_repo_name
{
function
svn_get_repo_name
{
if
[
$(
in_svn
)
]
;
then
if
[
$(
in_svn
)
]
;
then
svn info |
sed
-n
's/Repository\ Root:\ .*\///p'
|
read
SVN_ROOT
svn info |
sed
-n
's/Repository\ Root:\ .*\///p'
|
read
SVN_ROOT
svn info |
sed
-n
"s/URL:
\
.*
$SVN_ROOT
\/
//p"
svn info |
sed
-n
"s/URL:
\
.*
$SVN_ROOT
\/
//p"
fi
fi
}
}
...
@@ -46,9 +47,11 @@ function svn_get_rev_nr {
...
@@ -46,9 +47,11 @@ function svn_get_rev_nr {
function
svn_dirty_choose
{
function
svn_dirty_choose
{
if
[
$(
in_svn
)
]
;
then
if
[
$(
in_svn
)
]
;
then
svn status 2> /dev/null |
grep
-Eq
'^\s*[ACDIM!?L]'
svn status 2> /dev/null |
grep
-Eq
'^\s*[ACDIM!?L]'
if
[
$pipestatus
[
-1
]
-ne
0
]
;
then
if
[
$pipestatus
[
-1
]
-eq
0
]
;
then
# Grep exits with 0 when "One or more lines were selected", return "dirty".
echo
$1
echo
$1
else
else
# Otherwise, no lines were found, or an error occurred. Return clean.
echo
$2
echo
$2
fi
fi
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment