From patchwork Tue Jul 31 20:57:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D3985: context: safegaurd against 'lx' being passed as file flag in manifest From: phabricator X-Patchwork-Id: 32985 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Tue, 31 Jul 2018 20:57:00 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGd558e53cd6b6: context: safegaurd against '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/D3985?vs=9670&id=9677 REVISION DETAIL https://phab.mercurial-scm.org/D3985 AFFECTED FILES mercurial/context.py CHANGE DETAILS To: pulkit, #hg-reviewers, indygreg Cc: mercurial-devel diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -2327,7 +2327,12 @@ revision being committed, or None.""" super(memfilectx, self).__init__(repo, path, None, changectx) self._data = data - self._flags = (islink and 'l' or '') + (isexec and 'x' or '') + if islink: + self._flags = 'l' + elif isexec: + self._flags = 'x' + else: + self._flags = '' self._copied = None if copied: self._copied = (copied, nullid)