Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: infra/libs/git2/data/commit.py

Issue 355153002: Refactor infra git libs and testing. (Closed) Base URL: https://chromium.googlesource.com/infra/infra@fake_testing_support
Patch Set: Change config ref to have a sandard naming scheme Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..0095bda82aafebda8c50a80b8c36171606860881 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.types import freeze
+
+from infra.libs.git2.data.data import Alterable
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
################################################################################

Powered by Google App Engine
This is Rietveld 408576698