Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 25738:04d26a3c96fd
workingctx: use node.wdirid constant
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 22 Jun 2015 22:05:10 +0900 |
parents | 24cda1dd45ff |
children | fe03f522dda9 |
comparison
equal
deleted
inserted
replaced
25737:1a5211f2f87f | 25738:04d26a3c96fd |
---|---|
3 # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> | 3 # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> |
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 from node import nullid, nullrev, short, hex, bin | 8 from node import nullid, nullrev, wdirid, short, hex, bin |
9 from i18n import _ | 9 from i18n import _ |
10 import mdiff, error, util, scmutil, subrepo, patch, encoding, phases | 10 import mdiff, error, util, scmutil, subrepo, patch, encoding, phases |
11 import match as matchmod | 11 import match as matchmod |
12 import os, errno, stat | 12 import os, errno, stat |
13 import obsolete as obsmod | 13 import obsolete as obsmod |
1337 | 1337 |
1338 def __contains__(self, key): | 1338 def __contains__(self, key): |
1339 return self._repo.dirstate[key] not in "?r" | 1339 return self._repo.dirstate[key] not in "?r" |
1340 | 1340 |
1341 def hex(self): | 1341 def hex(self): |
1342 return "ff" * 20 | 1342 return hex(wdirid) |
1343 | 1343 |
1344 @propertycache | 1344 @propertycache |
1345 def _parents(self): | 1345 def _parents(self): |
1346 p = self._repo.dirstate.parents() | 1346 p = self._repo.dirstate.parents() |
1347 if p[1] == nullid: | 1347 if p[1] == nullid: |