mercurial/context.py
changeset 39066 2488dcfa71f8
parent 38818 e411774a2e0f
child 39078 48157f198a04
--- 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)