Chromium Code Reviews| Index: infra/libs/git2/data/commit.py |
| diff --git a/infra/services/gnumbd/support/data.py b/infra/libs/git2/data/commit.py |
| similarity index 94% |
| rename from infra/services/gnumbd/support/data.py |
| rename to infra/libs/git2/data/commit.py |
| index 4a3a6c3e23f5d0d28a46861805559407d3b3b25b..7c880da3b4465f3ff7b2b1fbc3323126f4728882 100644 |
| --- a/infra/services/gnumbd/support/data.py |
| +++ b/infra/libs/git2/data/commit.py |
| @@ -8,10 +8,14 @@ import re |
| from cStringIO import StringIO |
| -from infra.services.gnumbd.support.util import cached_property, freeze |
| +from infra.libs.decorators import cached_property |
| +from infra.libs.data_structures import freeze |
| + |
| +from infra.libs.git2.data.data import Alterable |
|
agable
2014/06/27 18:53:12
Do you really need data.data? Couldn't you just do
|
| LOGGER = logging.getLogger(__name__) |
| + |
| ################################################################################ |
| # Exceptions |
| ################################################################################ |
| @@ -30,27 +34,6 @@ class UnexpectedHeader(Exception): |
| ################################################################################ |
| -# Base Class |
| -################################################################################ |
| - |
| -class Alterable(object): |
| - def to_dict(self): # pragma: no cover |
| - """The shallow dictionary representation of this object (i.e. the dictionary |
| - may contain Alterable instances as values).""" |
| - raise NotImplementedError() |
| - |
| - def alter(self, **kwargs): # pragma: no cover |
| - """Returns a copy of self, except with the fields listed in kwargs replaced |
| - with new values.""" |
| - raise NotImplementedError() |
| - |
| - @classmethod |
| - def from_raw(cls, data): # pragma: no cover |
| - """Construct an instance of this class from a string.""" |
| - raise NotImplementedError() |
| - |
| - |
| -################################################################################ |
| # Implementation |
| ################################################################################ |