annotate .shell.d/50.vcs_functions.sh @ 217:e4842709368a

emacs: move colors to their own file and migrate to whitespace from wspace
author Augie Fackler <durin42@gmail.com>
date Sat, 14 Aug 2010 20:42:58 -0500
parents 0590f34b92a0
children da06f9fd5016
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1 ## vcs_functions
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
2 # This file contains a handful of functions that relate to using some version
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
3 # control tool or other.
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
4
133
5b0b8ad2cb2c vcs_functions: some versions of the shell don't like - in function names.
Augie Fackler <durin42@gmail.com>
parents: 129
diff changeset
5 function ezsvnsync() {
169
040ac89ffe1e ez-svn-sync: add usage help
Augie Fackler <durin42@gmail.com>
parents: 167
diff changeset
6 if [ x"$1" = "x" ] ; then
040ac89ffe1e ez-svn-sync: add usage help
Augie Fackler <durin42@gmail.com>
parents: 167
diff changeset
7 echo 'usage: ez-svn-sync repo url'
040ac89ffe1e ez-svn-sync: add usage help
Augie Fackler <durin42@gmail.com>
parents: 167
diff changeset
8 return 0
040ac89ffe1e ez-svn-sync: add usage help
Augie Fackler <durin42@gmail.com>
parents: 167
diff changeset
9 fi
63
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
10 local repo
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
11 repo=$1
169
040ac89ffe1e ez-svn-sync: add usage help
Augie Fackler <durin42@gmail.com>
parents: 167
diff changeset
12 local url
63
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
13 url=$2
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
14 svnadmin create $repo
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
15 echo '#!/bin/sh' >> $repo/hooks/pre-revprop-change
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
16 echo 'exit 0' >> $repo/hooks/pre-revprop-change
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
17 chmod +x $repo/hooks/pre-revprop-change
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
18 svnsync init file://`pwd`/$repo $url
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
19 svnsync sync file://`pwd`/$repo
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
20 }
133
5b0b8ad2cb2c vcs_functions: some versions of the shell don't like - in function names.
Augie Fackler <durin42@gmail.com>
parents: 129
diff changeset
21 alias ez-svn-sync=ezsvnsync
63
1b4067cc97ca Add a function to svnsync easier. Done this too many times because of hgsubversion.
Augie Fackler <durin42@gmail.com>
parents: 62
diff changeset
22
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
23 # Function to grab the url of an svn wc
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
24 function svnurlof() {
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
25 local url
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
26 url=`svn info $1 2> /dev/null | grep '^URL: ' | sed 's/URL: //'`
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
27 if [ x"$url" = "x" ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
28 url=`git svn info $1 2> /dev/null | grep '^URL: ' | sed 's/URL: //'`
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
29 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
30 if [ x"$url" = "x" ] ; then
46
8946e6ae2747 Stopgap hg-svn-mkbranch command to save me typing until the feature goes into hgsubversion itself.
Augie Fackler <durin42@gmail.com>
parents: 39
diff changeset
31 local dir
8946e6ae2747 Stopgap hg-svn-mkbranch command to save me typing until the feature goes into hgsubversion itself.
Augie Fackler <durin42@gmail.com>
parents: 39
diff changeset
32 dir=$1
8946e6ae2747 Stopgap hg-svn-mkbranch command to save me typing until the feature goes into hgsubversion itself.
Augie Fackler <durin42@gmail.com>
parents: 39
diff changeset
33 if [ x"$dir" = "x" ] ; then
8946e6ae2747 Stopgap hg-svn-mkbranch command to save me typing until the feature goes into hgsubversion itself.
Augie Fackler <durin42@gmail.com>
parents: 39
diff changeset
34 dir="."
8946e6ae2747 Stopgap hg-svn-mkbranch command to save me typing until the feature goes into hgsubversion itself.
Augie Fackler <durin42@gmail.com>
parents: 39
diff changeset
35 fi
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
36 url=`hg -R $dir svn info 2> /dev/null | grep '^URL: ' | sed 's/URL: //'`
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
37 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
38 if [ x"$url" = "x" ] ; then
167
f485c32913cd vcs functions: refer to hgsubversion by the real name
Augie Fackler <durin42@gmail.com>
parents: 156
diff changeset
39 echo -n 'No repo found (tried svn, git-svn, hgsubversion)'
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
40 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
41 echo $url
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
42 }
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
43
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
44 # Function to clean locks out of svn wcs
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
45 function clean_svn_source_trees() {
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
46 for aa in */ ; do
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
47 pushd $aa > /dev/null
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
48 if [ -e .svn ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
49 echo $aa 'is an svn checkout, cleaning' && svn cleanup
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
50 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
51 popd > /dev/null
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
52 done
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
53 }
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
54
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
55 # Function to update source trees of known VCS tools in the working dir.
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
56 # "known" means ones I'm forced to use on a regular basis
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
57 function update_source_trees() {
184
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
58 if ! ls -l | egrep ^d > /dev/null ; then
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
59 ls -l | egrep ^d
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
60 return
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
61 fi
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
62 local hgpath
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
63 for aa in */ ; do
31
a5691a22c92b Fix a bug in update_source_trees where it could eat any existing dirstack
Augie Fackler <durin42@gmail.com>
parents: 16
diff changeset
64 pushd $aa > /dev/null || continue
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
65 if [ -e .svn ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
66 echo $aa 'is an svn checkout, updating'
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
67 svn up
115
5f00625aa1ed Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
Augie Fackler <durin42@gmail.com>
parents: 83
diff changeset
68 elif [ -e README.txt ] \
5f00625aa1ed Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
Augie Fackler <durin42@gmail.com>
parents: 83
diff changeset
69 && [ -e format ] \
5f00625aa1ed Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
Augie Fackler <durin42@gmail.com>
parents: 83
diff changeset
70 && grep "This is a Subversion repository; use the 'svnadmin' tool to examine" README.txt > /dev/null \
5f00625aa1ed Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
Augie Fackler <durin42@gmail.com>
parents: 83
diff changeset
71 && svn pl --revprop -r 0 file://$(pwd) | fgrep svn:sync-from-url > /dev/null\
5f00625aa1ed Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
Augie Fackler <durin42@gmail.com>
parents: 83
diff changeset
72 ; then
5f00625aa1ed Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
Augie Fackler <durin42@gmail.com>
parents: 83
diff changeset
73 echo "$aa looks like an svnsync clone, syncing"
5f00625aa1ed Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
Augie Fackler <durin42@gmail.com>
parents: 83
diff changeset
74 svnsync sync file://$(pwd)
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
75 elif [ -e .git/svn ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
76 echo $aa 'is a git-svn checkout, updating'
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
77 git svn fetch
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
78 elif [ -e .git ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
79 echo $aa 'is a git checkout, updating'
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
80 git pull origin master
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
81 elif [ -e .hg ] ; then
184
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
82 echo $aa 'is an hg checkout, updating'
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
83 for hgpath in $(HGRCPATH=/dev/null hg paths | sed 's/.* = //g' | sort | uniq ) ; do
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
84 hg pull --update $hgpath
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
85 done
35
7e9269048856 Fix update_source_trees to also pull versioned mq if it exists.
Augie Fackler <durin42@gmail.com>
parents: 31
diff changeset
86 if [ -e .hg/patches/.hg ] ; then
7e9269048856 Fix update_source_trees to also pull versioned mq if it exists.
Augie Fackler <durin42@gmail.com>
parents: 31
diff changeset
87 echo $aa 'has an mq, updating that too...'
7e9269048856 Fix update_source_trees to also pull versioned mq if it exists.
Augie Fackler <durin42@gmail.com>
parents: 31
diff changeset
88 hg -R .hg/patches pull -u
7e9269048856 Fix update_source_trees to also pull versioned mq if it exists.
Augie Fackler <durin42@gmail.com>
parents: 31
diff changeset
89 fi
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
90 elif [ -e _MTN ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
91 echo $aa "is an mtn co, updating" && mtn pull && mtn up
184
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
92 else
efa2bfc73d2d update-source-trees: recurse to find all VCS working copies
Augie Fackler <durin42@gmail.com>
parents: 169
diff changeset
93 update_source_trees
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
94 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
95 popd > /dev/null
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
96 done
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
97 }
115
5f00625aa1ed Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
Augie Fackler <durin42@gmail.com>
parents: 83
diff changeset
98 alias update-source-trees=update_source_trees
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
99
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
100 function vcs_current_branch() {
10
b4bfce76123f Reorder these checks. With my home being in hg, it was winning over any other
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
101 git branch 2> /dev/null > /dev/null
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
102 if [ $? = 0 ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
103 git branch --verbose | grep '^*' | sed 's/* //;s/ /:/;s/ .*//;s/:/ /'
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
104 return 0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
105 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
106 # when wc-ng comes out, we'll probably do the following
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
107 # svn info 2> /dev/null > /dev/null
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
108 if [ -e .svn ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
109 local d=`svn info | grep URL | sed 's/.*://'`
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
110 local br=`echo $d | awk '{
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
111 if ( index($1, "trunk") ) {
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
112 print "trunk"
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
113 } else {
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
114 x = index($1, "branches") ;
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
115 if ( x != 0 ) {
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
116 sub(".*/branches/", "");
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
117 sub("/.*", "");
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
118 print $0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
119 }
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
120 }
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
121 }'`
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
122 local rev=`svn info | grep Revision | sed 's/.*: /r/'`
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
123 echo $br $rev
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
124 return 0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
125 fi
10
b4bfce76123f Reorder these checks. With my home being in hg, it was winning over any other
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
126 hg branch 2> /dev/null > /dev/null
b4bfce76123f Reorder these checks. With my home being in hg, it was winning over any other
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
127 if [ $? = 0 ] ; then
b4bfce76123f Reorder these checks. With my home being in hg, it was winning over any other
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
128 local br=`hg branch | head -c 10`
b4bfce76123f Reorder these checks. With my home being in hg, it was winning over any other
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
129 local rid=`hg parents | head -n 1 | awk '{print $2}' | head -c 7`
b4bfce76123f Reorder these checks. With my home being in hg, it was winning over any other
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
130 echo "$br $rid"
b4bfce76123f Reorder these checks. With my home being in hg, it was winning over any other
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
131 return 0
b4bfce76123f Reorder these checks. With my home being in hg, it was winning over any other
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
132 fi
0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
133 return 1
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
134 }
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
135
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
136 # change to the root dir of the current wc
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
137 function wcroot() {
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
138 local root=`hg root 2> /dev/null`
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
139 if [ x$root != 'x' ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
140 cd $root
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
141 return 0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
142 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
143 git branch 2> /dev/null > /dev/null
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
144 if [ $? = 0 ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
145 while [ ! -e .git ] ; do
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
146 cd ..
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
147 done
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
148 return 0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
149 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
150 if [ -e .svn ] ; then
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
151 while [ -e ../.svn ] ; do
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
152 cd ..
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
153 done
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
154 return 0
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
155 fi
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
156 echo No working copy found'!'
c30d68fbd368 Initial import from svn.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
157 }