context: safegaurd from 'lx' being passed as file flag in manifest
Follows up for
d558e53cd6b619d5f671a7580513bfc66a398eac.
Differential Revision: https://phab.mercurial-scm.org/D4259
--- a/mercurial/context.py Fri Aug 10 03:33:38 2018 -0400
+++ b/mercurial/context.py Wed Aug 01 16:28:10 2018 +0300
@@ -1926,8 +1926,13 @@
flags=flags)
def setflags(self, path, l, x):
+ flag = ''
+ if l:
+ flag = 'l'
+ elif x:
+ flag = 'x'
self._markdirty(path, exists=True, date=dateutil.makedate(),
- flags=(l and 'l' or '') + (x and 'x' or ''))
+ flags=flag)
def remove(self, path):
self._markdirty(path, exists=False)