Mercurial > hg
comparison hgext/git/dirstate.py @ 47539:84391ddf4c78
dirstate-item: rename the class to DirstateItem
The object is no longer a tuple, so it seems clearer to rename it (and its
associated method)
Differential Revision: https://phab.mercurial-scm.org/D10982
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 22:27:29 +0200 |
parents | 7431f5ab0d2a |
children | 0bdcb5ef932c |
comparison
equal
deleted
inserted
replaced
47538:77fce401a2bb | 47539:84391ddf4c78 |
---|---|
109 def __iter__(self): | 109 def __iter__(self): |
110 return (pycompat.fsencode(f.path) for f in self.git.index) | 110 return (pycompat.fsencode(f.path) for f in self.git.index) |
111 | 111 |
112 def items(self): | 112 def items(self): |
113 for ie in self.git.index: | 113 for ie in self.git.index: |
114 yield ie.path, None # value should be a dirstatetuple | 114 yield ie.path, None # value should be a DirstateItem |
115 | 115 |
116 # py2,3 compat forward | 116 # py2,3 compat forward |
117 iteritems = items | 117 iteritems = items |
118 | 118 |
119 def __getitem__(self, filename): | 119 def __getitem__(self, filename): |