Instead of assigning dirstatetuple objects to entries in the dirstate, move
responsibility for creating tuples into the dirstatemap.
Details
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
mercurial/dirstate.py | ||
---|---|---|
1314 | To avoid doing two lookups in self._map: try: self._map.pop(f) return True except KeyError: return False |
mercurial/dirstate.py | ||
---|---|---|
130 | Why is ~all the interesting content of this docstring removed? Where is the meaning of the dirstate map documented other than this docstring? | |
1196–1235 | Per my comment above, let's insert a patch before this one that documents in more detail the API that dirstatemap is supposed to be providing, probably in a docstring on this class. Sound reasonable? (Then the above docstring I complained about could point to this docstring.) |
mercurial/dirstate.py | ||
---|---|---|
1196–1235 | Agreed. I removed the docstring above because it became a lie (we no longer implement __setitem__ or __delitem__, so it's not really a dict any more). I will add a docstring here on Monday. |
mercurial/dirstate.py | ||
---|---|---|
1314 | Good idea. I think return self._map.pop(f, None) is not None would avoid two lookups and also the exception. This function's going to be getting more complex in later diffs, so I'd like to avoid an exception handler if possible. |
Why is ~all the interesting content of this docstring removed? Where is the meaning of the dirstate map documented other than this docstring?