bin/braid in braid-0.7.1 vs bin/braid in braid-1.0.0
- old
+ new
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
-$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
+$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
require 'braid'
require 'rubygems'
require 'main'
@@ -10,11 +10,11 @@
# mostly blantantly stolen from ara's punch script
# main kicks ass!
Main {
description <<-TXT
- braid is a simple tool to help track git or svn repositories inside a git repository.
+ braid is a simple tool to help track git repositories inside a git repository.
Run 'braid commandname help' for more details.
All operations will be executed in the braid/track branch.
You can then merge back or cherry-pick changes.
@@ -23,41 +23,30 @@
mode(:add) {
description <<-TXT
Add a new mirror to be tracked.
* adds metadata about the mirror to .braids
- * adds the git or git svn remotes to .git/config
+ * adds the git remotes to .git/config
* fetches and merges remote code into given directory
- --type defaults:
-
- * svn://path # => svn
- * git://path # => git
- * http://path/trunk # => svn
- * http://path.git # => git
-
Name defaults:
* remote/path # => path
* remote/path/trunk # => path
* remote/path.git # => path
TXT
examples <<-TXT
- . braid add svn://remote/path
- . braid add svn://remote/path local/dir
- . braid add git://remote/path local/dir
. braid add http://remote/path.git local/dir
- . braid add http://remote/path --type git local/dir
- . braid add svn://remote/path --branch notmaster
+ . braid add http://remote/path local/dir
TXT
- mixin :argument_url, :option_type, :optional_path, :option_branch, :option_rails_plugin, :option_revision, :option_full, :option_verbose
+ mixin :argument_url, :optional_path, :option_branch, :option_revision, :option_full, :option_verbose
run {
Braid.verbose = verbose
- Braid::Command.run(:add, url, {"type" => type, "path" => path, "branch" => branch, "rails_plugin" => rails_plugin, "revision" => revision, "full" => full})
+ Braid::Command.run(:add, url, {'path' => path, 'branch' => branch, 'revision' => revision, 'full' => full})
}
}
mode(:update) {
description <<-TXT
@@ -77,21 +66,21 @@
mixin :optional_path, :option_revision, :option_head, :option_verbose
run {
Braid.verbose = verbose
- Braid::Command.run(:update, path, {"revision" => revision, "head" => head})
+ Braid::Command.run(:update, path, {'revision' => revision, 'head' => head})
}
}
mode(:remove) {
description <<-TXT
Remove a mirror.
* removes metadata from .braids
* removes the local directory and commits the removal
- * removes the git remote by default, --keep can be used to supress that
+ * removes the git remote by default, --keep can be used to suppress that
TXT
examples <<-TXT
. braid remove local/dir
TXT
@@ -132,11 +121,11 @@
}
}
mode(:setup) {
description <<-TXT
- Set up git and git-svn remotes.
+ Set up git remotes.
TXT
mixin :optional_path, :option_verbose, :option_force
run {
@@ -182,31 +171,14 @@
argument(:url) {
attr
}
}
- mixin(:option_type) {
- option(:type, :t) {
- optional
- argument :required
- desc 'mirror type'
- attr
- }
- }
-
mixin(:option_branch) {
option(:branch, :b) {
optional
argument :required
desc 'remote branch name'
- attr
- }
- }
-
- mixin(:option_rails_plugin) {
- option(:rails_plugin, :p) {
- optional
- desc 'added mirror is a Rails plugin'
attr
}
}
mixin(:option_revision) {