44
45
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
|
# File 'lib/fossgit/cli.rb', line 44
def help_text
help = "\n FossGit mirrors Fossil repositories to Git repositories. You need:\n \n 1. both Fossil SCM and Git installed\n 2. a Fossil repository with an open checkout to export\n 3. a Git repository to use as a mirror\n\n USAGE: \#{name} [-h | -v | -t]\n \#{name} [-c <CHECKOUT>] [-a | -r REMOTE | -l] [GITREPO]\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 should harmlessly fail to push if there is no upstream repository\n configured for the local Git repository. If there is no GITREPO in\n configuration (see CONFIG below), you must specify GITREPO when using\n \#{name} to mirror your Fossil repository.\n\n OPTIONS/ARGUMENTS:\n\n -h Display this help text and exit, ignoring all other\n arguments.\n\n -a Push to all configured remotes for the target Git\n repository. Default behavior is to push only to the\n configured \"origin\" remote.\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 -r Specify which of your Git mirror's configured remotes\n you want to push. This overrides the -a switch. For\n multiple remotes, use a comma-separated list with no\n spaces between them.\n\n -t Dump export to STDOUT as text rather than sending it\n to Git. This overrides the `-l` switch and GITREPO\n argument, if present.\n\n -v Show FossGit version number.\n\n GITREPO Specify the location of your local Git repository.\n This is optional if there is a configuration file\n that specifies it for you.\n\n COMMAND 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 CONFIG:\n\n A config file named \".fossgit\" can be used to set \#{name} defaults.\n\n A universal config file can be placed in the home directory of the\n user account that executes this command, in which case it will apply\n every time that account executes \#{name}. A config file can also be\n placed in the root of an open Fossil repository, in which case it\n will only apply when \#{name} is used for that particular repository.\n If both files exist, settings from both will be used, but where both\n have the same setting the more specific config (in the project\n directory) overrides the equivalent setting from the universal\n config. This means a universal configuration can be used for the\n most common case, but for specific projects that have different needs\n you can place a config file the project repository.\n\n These are the available configuration options:\n\n * The \"gitdir\" setting can be used to specify a directory in which\n Git repositories are kept. In this case, \#{name} infers the Git\n repository name from the \"project-name\" in \"fossil info\" output.\n\n * The \"gitrepo\" setting can be used to specify the full path to a Git\n repository, without letting \#{name} try to infer the repository\n name. This option overrides \"gitdir\" if both are set. It is\n probably a bad idea to set \"gitrepo\" in a universal config. It is\n intended to be set in a project-specific \".fossgit\" file because\n chaos may ensue if all Fossil repositories use the same \"gitrepo\".\n\n * The \"remotes\" setting can be used to specify which of your Git\n mirror's configured remotes you want to use when pushing from Git.\n As with the -r command line option, you can list one remote or list\n several as a comma-separated list with no spaces. The \"remotes\"\n setting in a configuration file accepts the \"all\" value, equivalent\n to the -a command line option.\n\n CONFIG EXAMPLES:\n\n gitdir: /home/username/fossrec/git\n\n gitrepo: /home/username/fossrec\n\n remotes: gitlab\n\n EOF\nend\n"
|