46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
# File 'lib/fossgit/cli.rb', line 46
def help_text
help = <<-EOF
FossGit mirrors Fossil repositories to Git repositories. You need:
1. both Fossil SCM and Git installed
2. a Fossil repository with an open checkout to export
3. a Git repository to use as a mirror
USAGE: #{name} [-h | -v | -t]
#{name} [-c <CHECKOUT>] [-a | -r REMOTE | -l] [[-n] GITREPO]
By default, when exporting to local Git repository GITREPO, #{name}
attempts to push updates to a configured upstream Git repository. It
should harmlessly fail to push if there is no upstream repository
configured for the local Git repository. If there is no GITREPO in
configuration (see CONFIG below), you must specify GITREPO when using
#{name} to mirror your Fossil repository.
OPTIONS/ARGUMENTS:
-h | --help
Display this help text and exit, ignoring all other arguments.
-a | --all
Push to all configured remotes for the target Git repository.
Default is to push only to the configured "origin" remote.
-c <CHECKOUT> | --checkout <CHECKOUT>
Specify CHECKOUT, your Fossil repository's checkout location.
This is optional; you may simply use this tool from within an
open checkout of your Fossil repository instead.
-l | --local
Perform local-only mirror operations without pushing to a remote
Git repository. By default, #{name} pushes to an upstream Git
repository whenever it exports from Fossil to Git.
-n | --newgit
Create a local Git repository mirror when it does not already
exist. Use this option from the Fossil repository's directory
hierarchy root and specify the Git repository's location as for
updating a mirror via config file, GITREPO argument, or Fossil
project-name setting in `fossil info` output.
-r | --remotes <COMMA,SEPARATED,REMOTES>
Specify which of the Git mirror's configured remotes to push in a
comma separated list with no spaces. This overrides `--all`.
-t | --text-export
Dump export to STDOUT as text rather than sending it to Git.
This overrides the `-l` switch and GITREPO argument, if present.
-v | --version
Show FossGit version number.
GITREPO
Specify the location of the local Git mirror, if there is no
configuration file specification or to override configuration.
COMMAND EXAMPLES:
$ fossgit -h
$ fossgit -c ~/fossil_checkouts/projectname ~/git/projectname
$ cd ~/fossil_checkouts/projectname && fossgit ~/git/projectname
CONFIG:
A config file named ".fossgit" can be used to set #{name} defaults.
A universal config file can be placed in the home directory of the
user account that executes this command, in which case it will apply
every time that account executes #{name}. A config file can also be
placed in the root of an open Fossil repository, in which case it
will only apply when #{name} is used for that particular repository.
If both files exist, settings from both will be used, but where both
have the same setting the more specific config (in the project
directory) overrides the equivalent setting from the universal
config. This means a universal configuration can be used for the
most common case, but for specific projects that have different needs
you can place a config file the project repository.
These are the available configuration options:
* The "gitdir" setting can be used to specify a directory in which
Git repositories are kept. In this case, #{name} infers the Git
repository name from the "project-name" in "fossil info" output.
* The "gitrepo" setting can be used to specify the full path to a Git
repository, without letting #{name} try to infer the repository
name. This option overrides "gitdir" if both are set. It is
probably a bad idea to set "gitrepo" in a universal config. It is
intended to be set in a project-specific ".fossgit" file because
chaos may ensue if all Fossil repositories use the same "gitrepo".
* The "remotes" setting can be used to specify which of your Git
mirror's configured remotes you want to use when pushing from Git.
As with the -r command line option, you can list one remote or list
several as a comma-separated list with no spaces. The "remotes"
setting in a configuration file accepts the "all" value, equivalent
to the -a command line option.
CONFIG EXAMPLES:
gitdir: /home/username/fossrec/git
gitrepo: /home/username/fossrec
remotes: gitlab
EOF
end
|