comparison mercurial/context.py @ 19560:f256e1108053

basectx: move filenode from changectx
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 05 Aug 2013 18:28:40 -0500
parents 80ad9fe22e18
children 7806e63598b0
comparison
equal deleted inserted replaced
19559:80ad9fe22e18 19560:f256e1108053
107 if not node: 107 if not node:
108 raise error.ManifestLookupError(self._node, path, 108 raise error.ManifestLookupError(self._node, path,
109 _('not found in manifest')) 109 _('not found in manifest'))
110 110
111 return node, flag 111 return node, flag
112
113 def filenode(self, path):
114 return self._fileinfo(path)[0]
112 115
113 class changectx(basectx): 116 class changectx(basectx):
114 """A changecontext object makes access to data related to a particular 117 """A changecontext object makes access to data related to a particular
115 changeset convenient. It represents a read-only context already presnt in 118 changeset convenient. It represents a read-only context already presnt in
116 the repo.""" 119 the repo."""
328 if self.bumped(): 331 if self.bumped():
329 troubles.append('bumped') 332 troubles.append('bumped')
330 if self.divergent(): 333 if self.divergent():
331 troubles.append('divergent') 334 troubles.append('divergent')
332 return troubles 335 return troubles
333
334 def filenode(self, path):
335 return self._fileinfo(path)[0]
336 336
337 def flags(self, path): 337 def flags(self, path):
338 try: 338 try:
339 return self._fileinfo(path)[1] 339 return self._fileinfo(path)[1]
340 except error.LookupError: 340 except error.LookupError: