Mercurial > public > mercurial-scm > hg
comparison mercurial/revsetlang.py @ 39324:b902b177901d
revsetlang: fix position of '-' in spaceless 'a-b' expressions
I don't know if there is an observable difference, but it seems like
an obvious fix.
Differential Revision: https://phab.mercurial-scm.org/D4410
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 28 Aug 2018 13:29:47 -0700 |
parents | e7aa113b14f7 |
children | 4aa04d009167 |
comparison
equal
deleted
inserted
replaced
39323:c11e8894b9ca | 39324:b902b177901d |
---|---|
175 parts = sym.split('-') | 175 parts = sym.split('-') |
176 for p in parts[:-1]: | 176 for p in parts[:-1]: |
177 if p: # possible consecutive - | 177 if p: # possible consecutive - |
178 yield ('symbol', p, s) | 178 yield ('symbol', p, s) |
179 s += len(p) | 179 s += len(p) |
180 yield ('-', None, pos) | 180 yield ('-', None, s) |
181 s += 1 | 181 s += 1 |
182 if parts[-1]: # possible trailing - | 182 if parts[-1]: # possible trailing - |
183 yield ('symbol', parts[-1], s) | 183 yield ('symbol', parts[-1], s) |
184 else: | 184 else: |
185 yield ('symbol', sym, s) | 185 yield ('symbol', sym, s) |