Mercurial > hg
comparison .hgtags @ 30554:1775975dd439
shelve: move patch extension to a string constant
We are using 'name + ".patch"' pattern throughout the shelve code to
identify the existence of a shelve with a particular name. In two
cases however we use 'name + ".hg"' instead. This commit makes
'patch' be used in all places and "emphasizes" it by moving
'patch' to live in a constant. Also, this allows to extract file
name without extension like this:
f[:-(1 + len(patchextension))]
instead of:
f[:-6]
which is good IMO.
This is a first patch from this initial "obsshelve" series. This
series does not include tests, although locally I have all of
test-shelve.t ported to test obs-shelve as well. I will send tests
later as a separate series.
author | Kostia Balytskyi <ikostia@fb.com> |
---|---|
date | Tue, 29 Nov 2016 07:20:03 -0800 |
parents | 80b646ad0f86 |
children | 72f0b1ea907d |
comparison
equal
deleted
inserted
replaced
30553:98033f9c0109 | 30554:1775975dd439 |
---|