~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/option.py

  • Committer: Lukáš Lalinský
  • Date: 2007-08-25 18:11:08 UTC
  • mto: This revision was merged to the branch mainline in revision 2753.
  • Revision ID: lalinsky@gmail.com-20070825181108-0nvdwx57n3qatub0
Accept ..\ as a path in revision specifiers

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
    [<RevisionSpec_branch branch:../../branch2>]
87
87
    >>> _parse_revision_str('branch:../../branch2..23')
88
88
    [<RevisionSpec_branch branch:../../branch2>, <RevisionSpec_revno 23>]
 
89
    >>> _parse_revision_str('branch:..\\\\branch2')
 
90
    [<RevisionSpec_branch branch:..\\branch2>]
 
91
    >>> _parse_revision_str('branch:..\\\\..\\\\branch2..23')
 
92
    [<RevisionSpec_branch branch:..\\..\\branch2>, <RevisionSpec_revno 23>]
89
93
    """
90
94
    # TODO: Maybe move this into revisionspec.py
91
95
    revs = []
92
 
    # split on the first .. that is not followed by a / ?
93
 
    sep = re.compile("\\.\\.(?!/)")
 
96
    # split on .. that is not followed by a / or \
 
97
    sep = re.compile(r'\.\.(?![\\/])')
94
98
    for x in sep.split(revstr):
95
99
        revs.append(revisionspec.RevisionSpec.from_string(x or None))
96
100
    return revs