aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2023-06-08 20:53:50 -0400
committerMike Frysinger <vapier@google.com>2023-06-09 12:26:40 +0000
commitdc5048790f91dd21504778e455b47b48779fec0d (patch)
tree9a44c49dc5e623b64a3c78067927acb2fa1a74ef
parent6391d356469ebc79312898ae8bb995f600a2137f (diff)
downloadrepohooks-dc5048790f91dd21504778e455b47b48779fec0d.tar.gz
rh.Project: drop unused remote field
We haven't needed to pass this around, so drop it to simplify. Bug: None Test: unittests Change-Id: I14fd1925fcaa3fc9775b56843278f13d55a919b5
-rwxr-xr-xpre-upload.py2
-rw-r--r--rh/__init__.py2
-rwxr-xr-xrh/hooks_unittest.py3
3 files changed, 3 insertions, 4 deletions
diff --git a/pre-upload.py b/pre-upload.py
index 0109133..f486125 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -293,7 +293,7 @@ def _run_project_hooks_in_cwd(project_name, proj_dir, output, from_git=False, co
f'{e}\nDid you run repo start? Is your HEAD detached?')
return False
- project = rh.Project(name=project_name, dir=proj_dir, remote=remote)
+ project = rh.Project(name=project_name, dir=proj_dir)
rel_proj_dir = os.path.relpath(proj_dir, rh.git.find_repo_root())
os.environ.update({
diff --git a/rh/__init__.py b/rh/__init__.py
index 9050fb6..91a106c 100644
--- a/rh/__init__.py
+++ b/rh/__init__.py
@@ -18,4 +18,4 @@ import collections
# An object representing the git project that we're testing currently.
-Project = collections.namedtuple('Project', ['name', 'dir', 'remote'])
+Project = collections.namedtuple('Project', ['name', 'dir'])
diff --git a/rh/hooks_unittest.py b/rh/hooks_unittest.py
index c366e1f..45ad688 100755
--- a/rh/hooks_unittest.py
+++ b/rh/hooks_unittest.py
@@ -307,8 +307,7 @@ class BuiltinHooksTests(unittest.TestCase):
"""Verify the builtin hooks."""
def setUp(self):
- self.project = rh.Project(name='project-name', dir='/.../repo/dir',
- remote='remote')
+ self.project = rh.Project(name='project-name', dir='/.../repo/dir')
self.options = rh.hooks.HookOptions('hook name', [], {})
def _test_commit_messages(self, func, accept, msgs, files=None):