Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 41972:21cc92fea2aa
context: use wdirhex constant instead of calculating it
Differential Revision: https://phab.mercurial-scm.org/D6143
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 15 Mar 2019 22:18:35 -0700 |
parents | e1ceefab9bca |
children | 550a172a603b |
comparison
equal
deleted
inserted
replaced
41971:42e2c7c52e1b | 41972:21cc92fea2aa |
---|---|
19 modifiednodeid, | 19 modifiednodeid, |
20 nullid, | 20 nullid, |
21 nullrev, | 21 nullrev, |
22 short, | 22 short, |
23 wdirfilenodeids, | 23 wdirfilenodeids, |
24 wdirid, | 24 wdirhex, |
25 ) | 25 ) |
26 from . import ( | 26 from . import ( |
27 dagop, | 27 dagop, |
28 encoding, | 28 encoding, |
29 error, | 29 error, |
1322 | 1322 |
1323 def __contains__(self, key): | 1323 def __contains__(self, key): |
1324 return self._repo.dirstate[key] not in "?r" | 1324 return self._repo.dirstate[key] not in "?r" |
1325 | 1325 |
1326 def hex(self): | 1326 def hex(self): |
1327 return hex(wdirid) | 1327 return wdirhex |
1328 | 1328 |
1329 @propertycache | 1329 @propertycache |
1330 def _parents(self): | 1330 def _parents(self): |
1331 p = self._repo.dirstate.parents() | 1331 p = self._repo.dirstate.parents() |
1332 if p[1] == nullid: | 1332 if p[1] == nullid: |