14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
# TODO: For things like --diff-prefix, we want a way to customize the display
18
# of the option argument.
73
71
BzrError: No namespace registered for string: 'abc'
74
72
>>> _parse_revision_str('branch:../branch2')
75
73
[<RevisionSpec_branch branch:../branch2>]
76
>>> _parse_revision_str('branch:../../branch2')
77
[<RevisionSpec_branch branch:../../branch2>]
78
>>> _parse_revision_str('branch:../../branch2..23')
79
[<RevisionSpec_branch branch:../../branch2>, <RevisionSpec_int 23>]
81
75
# TODO: Maybe move this into revisionspec.py
82
76
old_format_re = re.compile('\d*:\d*')
92
86
revs.append(RevisionSpec(None))
94
sep = re.compile("\\.\\.(?!/)")
95
for x in sep.split(revstr):
96
revs.append(RevisionSpec(x or None))
89
for x in revstr.split('..'):
91
revs.append(RevisionSpec(None))
93
# looks like a namespace:.. has happened
94
next_prefix = x + '..'
96
if next_prefix is not None:
98
revs.append(RevisionSpec(x))
100
if next_prefix is not None:
101
revs.append(RevisionSpec(next_prefix))
163
168
_global_option('overwrite', help='Ignore differences between branches and '
164
169
'overwrite unconditionally')
165
170
_global_option('basis', type=str)
166
_global_option('bound')
167
171
_global_option('diff-options', type=str)
168
172
_global_option('help',
169
173
help='show help message')
173
177
_global_option('forward')
174
178
_global_option('message', type=unicode)
175
179
_global_option('no-recurse')
176
_global_option('prefix', type=str,
177
help='Set prefixes to added to old and new filenames, as '
178
'two values separated by a colon.')
179
180
_global_option('profile',
180
181
help='show performance profiling information')
181
182
_global_option('revision', type=_parse_revision_str)
183
_global_option('short')
182
184
_global_option('show-ids',
183
185
help='show internal object ids')
184
186
_global_option('timezone',
186
188
help='display timezone as local, original, or utc')
187
_global_option('unbound')
188
189
_global_option('verbose',
189
190
help='display more information')
190
191
_global_option('version')
191
192
_global_option('email')
192
193
_global_option('update')
193
_global_option('log-format', type=str, help="Use this log format")
194
_global_option('long', help='Use detailed log format. Same as --log-format long')
195
_global_option('short', help='Use moderately short log format. Same as --log-format short')
196
_global_option('line', help='Use log format with one line per revision. Same as --log-format line')
194
_global_option('long')
197
195
_global_option('root', type=str)
198
196
_global_option('no-backup')
199
_global_option('merge-type', type=_parse_merge_type,
200
help='Select a particular merge algorithm')
197
_global_option('merge-type', type=_parse_merge_type)
201
198
_global_option('pattern', type=str)
202
199
_global_option('quiet')
203
200
_global_option('remember', help='Remember the specified location as a'
205
202
_global_option('reprocess', help='Reprocess to reduce spurious conflicts')
206
203
_global_option('kind', type=str)
207
_global_option('dry-run',
208
help="show what would be done, but don't actually do anything")
211
206
def _global_short(short_name, long_name):