Permalink
Browse files

Updated --help output for sync to include repo and push args

  • Loading branch information...
1 parent f0ed837 commit 1ff34f380081df72b512bab26ac04db9010257aa @jeffWelling jeffWelling committed Feb 15, 2011
Showing with 14 additions and 2 deletions.
  1. +14 −2 lib/ticgit-ng/command/sync.rb
@@ -2,11 +2,23 @@ module TicGitNG
module Command
module Sync
def parser(opts)
- opts.banner = "Usage: ti sync"
+ opts.banner = "Usage: ti sync [options]"
+ opts.on_head(
+ "-r REPO", "--repo REPO", "Sync ticgit-ng branch with REPO"){|v|
+ options.repo = v
+ }
+ opts.on_head(
+ "-p y/n", "--push yes/no", "Push to the remote repo? (Yes or No)"){|v|
+ if v=~ /y/
+ options.push= true
+ elsif v=~ /n/
+ options.push= false
+ end
+ }
end
def execute
- tic.sync_tickets()
+ tic.sync_tickets(options.repo, options.push)
end
end
end

0 comments on commit 1ff34f3

Please sign in to comment.