lib/braid/commands/setup.rb in braid-0.6.2 vs lib/braid/commands/setup.rb in braid-0.7.0
- old
+ new
@@ -4,31 +4,32 @@
def run(path = nil)
path ? setup_one(path) : setup_all
end
protected
- def setup_all
- msg "Setting up all mirrors."
- config.mirrors.each do |path|
- setup_one(path)
- end
+
+ def setup_all
+ msg "Setting up all mirrors."
+ config.mirrors.each do |path|
+ setup_one(path)
end
+ end
- def setup_one(path)
- mirror = config.get!(path)
+ def setup_one(path)
+ mirror = config.get!(path)
- if git.remote_url(mirror.remote)
- msg "Setup: Mirror '#{mirror.path}' already has a remote. Reusing it." if verbose?
- return
- end
+ if git.remote_url(mirror.remote)
+ msg "Setup: Mirror '#{mirror.path}' already has a remote. Reusing it." if verbose?
+ return
+ end
- msg "Setup: Creating remote for '#{mirror.path}'."
- unless mirror.type == "svn"
- url = use_local_cache? ? git_cache.path(mirror.url) : mirror.url
- git.remote_add(mirror.remote, url, mirror.branch)
- else
- git_svn.init(mirror.remote, mirror.url)
- end
+ msg "Setup: Creating remote for '#{mirror.path}'."
+ unless mirror.type == "svn"
+ url = use_local_cache? ? git_cache.path(mirror.url) : mirror.url
+ git.remote_add(mirror.remote, url, mirror.branch)
+ else
+ git_svn.init(mirror.remote, mirror.url)
end
+ end
end
end
end