lib/braid/mirror.rb in braid-0.7.0 vs lib/braid/mirror.rb in braid-0.7.1
- old
+ new
@@ -45,11 +45,11 @@
if options["rails_plugin"]
path = "vendor/plugins/#{path}"
end
- remote = "braid/#{path}".gsub("_", '-') # stupid git svn changes all _ to ., weird
+ remote = "#{branch}/braid/#{path}".gsub("_", '-') # stupid git svn changes all _ to ., weird
squashed = !options["full"]
branch = nil if type == "svn"
attributes = {"url" => url, "remote" => remote, "type" => type, "branch" => branch, "squashed" => squashed}
self.new(path, attributes)
@@ -114,9 +114,17 @@
end
end
def cached_url
git_cache.path(url)
+ end
+
+ def remote
+ if (attributes["remote"] && attributes["remote"] =~ /^braid\//)
+ attributes["remote"] = "#{branch}/#{attributes["remote"]}"
+ else
+ attributes["remote"]
+ end
end
private
def method_missing(name, *args)