~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/option.py

 * bzr add now lists how many files were ignored per glob.  add --verbose
   lists the specific files.  (Aaron Bentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
    BzrError: No namespace registered for string: 'abc'
72
72
    >>> _parse_revision_str('branch:../branch2')
73
73
    [<RevisionSpec_branch branch:../branch2>]
74
 
    >>> _parse_revision_str('branch:../../branch2')
75
 
    [<RevisionSpec_branch branch:../../branch2>]
76
 
    >>> _parse_revision_str('branch:../../branch2..23')
77
 
    [<RevisionSpec_branch branch:../../branch2>, <RevisionSpec_int 23>]
78
74
    """
79
75
    # TODO: Maybe move this into revisionspec.py
80
76
    old_format_re = re.compile('\d*:\d*')
89
85
            else:
90
86
                revs.append(RevisionSpec(None))
91
87
    else:
92
 
        sep = re.compile("\\.\\.(?!/)")
93
 
        for x in sep.split(revstr):
94
 
            revs.append(RevisionSpec(x or None))
 
88
        next_prefix = None
 
89
        for x in revstr.split('..'):
 
90
            if not x:
 
91
                revs.append(RevisionSpec(None))
 
92
            elif x[-1] == ':':
 
93
                # looks like a namespace:.. has happened
 
94
                next_prefix = x + '..'
 
95
            else:
 
96
                if next_prefix is not None:
 
97
                    x = next_prefix + x
 
98
                revs.append(RevisionSpec(x))
 
99
                next_prefix = None
 
100
        if next_prefix is not None:
 
101
            revs.append(RevisionSpec(next_prefix))
95
102
    return revs
96
103
 
97
104
 
184
191
_global_option('version')
185
192
_global_option('email')
186
193
_global_option('update')
187
 
_global_option('log-format', type=str, help="Use this log format")
188
 
_global_option('long', help='Use detailed log format. Same as --log-format long')
189
 
_global_option('short', help='Use moderately short log format. Same as --log-format short')
190
 
_global_option('line', help='Use log format with one line per revision. Same as --log-format line')
 
194
_global_option('long', help='Use detailed log format')
 
195
_global_option('short', help='Use moderately short log format')
 
196
_global_option('line', help='Use log format with one line per revision')
191
197
_global_option('root', type=str)
192
198
_global_option('no-backup')
193
199
_global_option('merge-type', type=_parse_merge_type)