Class: FossGit
- Inherits:
-
Object
- Object
- FossGit
- Defined in:
- lib/fossgit.rb
Instance Attribute Summary collapse
-
#checkout_path ⇒ Object
readonly
Returns the value of attribute checkout_path.
-
#fossil_repository ⇒ Object
readonly
Returns the value of attribute fossil_repository.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(checkout_path = '') ⇒ FossGit
constructor
A new instance of FossGit.
Constructor Details
#initialize(checkout_path = '') ⇒ FossGit
Returns a new instance of FossGit.
5 6 7 8 9 10 |
# File 'lib/fossgit.rb', line 5 def initialize checkout_path='' @checkout_path = checkout_path @checkout_path = get_element_matching :'local-root' @fossil_repository = get_repository_path end |
Instance Attribute Details
#checkout_path ⇒ Object (readonly)
Returns the value of attribute checkout_path.
2 3 4 |
# File 'lib/fossgit.rb', line 2 def checkout_path @checkout_path end |
#fossil_repository ⇒ Object (readonly)
Returns the value of attribute fossil_repository.
3 4 5 |
# File 'lib/fossgit.rb', line 3 def fossil_repository @fossil_repository end |
Class Method Details
.help_text(name = 'fossgit') ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/fossgit.rb', line 16 def self.help_text name='fossgit' help = "\n FossGit provides a simple tool for creating Git mirrors of Fossil\n repositories. To use it, you need:\n \n 1. both Fossil SCM and Git installed\n 2. a Fossil repository to mirror with an open checkout\n 3. a Git repository to use as a mirror\n\n USAGE: \#{name} -h\n \#{name} [-c <CHECKOUT>] [-l] <GITREPO>\n \#{name} -t\n\n By default, when exporting to local Git repository GITREPO, \#{name}\n attempts to push updates to a configured upstream Git repository. It\n harmlessly fails to push if no upstream repository is configured for\n the local Git repository.\n\n OPTIONS/ARGUMENTS:\n\n -h Display this help text and exit, ignoring all other\n arguments.\n\n -c CHECKOUT Specify the location of your Fossil repository's open\n checkout, CHECKOUT. This is optional; you may simply\n use this tool from within an open checkout of your\n Fossil repository instead.\n\n -l Perform local-only mirror operations, without trying\n to push Git updates to a remote repository. By\n default, \#{name} tries to push to an upstream Git\n repository whenever it exports from Fossil to Git.\n\n -t Dump export to STDOUT rather than sending it to Git.\n This overrides the `-l` option and GITREPO argument,\n if present.\n\n GITREPO Specify the location of your local Git repository.\n\n EXAMPLES:\n\n $ fossgit -h\n\n $ fossgit -c ~/fossil_checkouts/projectname ~/git/projectname\n\n $ cd ~/fossil_checkouts/projectname && fossgit ~/git/projectname\n\n EOF\nend\n" |
.version ⇒ Object
12 13 14 |
# File 'lib/fossgit.rb', line 12 def self.version '1.0.2' end |