D4259: context: safegaurd from 'lx' being passed as file flag in manifest

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Aug 10 12:32:36 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2488dcfa71f8: context: safegaurd from 'lx' being passed as file flag in manifest (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4259?vs=10319&id=10320

REVISION DETAIL
  https://phab.mercurial-scm.org/D4259

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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)



To: pulkit, #hg-reviewers, durin42
Cc: mercurial-devel


More information about the Mercurial-devel mailing list