# File lib/fastcst/repo.rb, line 136
136:         def Repository.search(repo_dir=DEFAULT_FASTCST_DIR, from = ".")
137:             orig_path = Dir.getwd
138:             path = nil
139:             if File.exist? from
140:                 # go to the from location temporarily
141:                 Dir.chdir from
142:                 
143:                 begin
144:                     last = nil
145:                     cur = Dir.getwd
146:                 
147:                     while last != cur
148:                         if File.exist? repo_dir and File.directory? repo_dir
149:                             path = File.join(Dir.getwd, repo_dir)
150:                             break
151:                         end
152:                     
153:                         # record the last one
154:                         last = cur
155:                     
156:                         # move up the tree
157:                         Dir.chdir ".."
158:                         cur = Dir.getwd
159:                     end
160:                 ensure
161:                     # go back to where we started
162:                     Dir.chdir orig_path
163:                 end
164:             end
165:         
166:             return path
167:         end