make var names consistent

This commit is contained in:
Louis Abel 2023-08-22 00:35:53 -07:00
parent 163f723677
commit de3e4c56ed
Signed by: label
GPG Key ID: 2A6975660E424560
2 changed files with 20 additions and 17 deletions

View File

@ -566,9 +566,9 @@ class GitImport(Import):
package: str,
source_git_url_path: str,
source_git_org_path: str,
git_url_path: str,
dest_git_url_path: str,
release: str,
branch: str,
source_branch: str,
upstream_lookaside: str,
scl_mode: bool = False,
scl_package: str = '',
@ -578,8 +578,8 @@ class GitImport(Import):
dest_branch: str = '',
distprefix: str = 'el',
source_git_user: str = 'git',
git_user: str = 'git',
org: str = 'rpms'
dest_git_user: str = 'git',
dest_org: str = 'rpms'
):
"""
Init the class.
@ -595,11 +595,11 @@ class GitImport(Import):
full_source_git_url_path = f'{source_git_user}@{source_git_url_path}'
self.__source_git_url = f'{source_git_protocol}://{full_source_git_url_path}/{source_git_org_path}/{package}.git'
self.__git_url = f'ssh://{git_user}@{git_url_path}/{org}/{package}.git'
self.__dest_git_url = f'ssh://{dest_git_user}@{dest_git_url_path}/{dest_org}/{package}.git'
self.__dist_prefix = distprefix
self.__dist_tag = f'.{distprefix}{release}'
self.__branch = branch
self.__dest_branch = branch
self.__source_branch = source_branch
self.__dest_branch = source_branch
self.__dest_lookaside = dest_lookaside
self.__upstream_lookaside = upstream_lookaside
self.__upstream_lookaside_url = self.get_lookaside_template_path(upstream_lookaside)
@ -827,7 +827,7 @@ class GitImport(Import):
"""
Returns the starting branch
"""
return self.__branch
return self.__source_branch
@property
def dest_branch(self):
@ -848,7 +848,7 @@ class GitImport(Import):
"""
Returns the destination git url
"""
return self.__git_url
return self.__dest_git_url
@property
def dist_tag(self):

View File

@ -29,10 +29,10 @@ git_parser.add_argument('--name', type=str, required=True)
git_parser.add_argument('--source-gituser', type=str, required=False, default='git')
git_parser.add_argument('--source-giturl', type=str, required=True)
git_parser.add_argument('--source-gitorg', type=str, required=True)
git_parser.add_argument('--gituser', type=str, required=False, default='git')
git_parser.add_argument('--branch', type=str, required=True)
git_parser.add_argument('--giturl', type=str, required=True)
git_parser.add_argument('--gitorg', type=str, required=False, default='rpms')
git_parser.add_argument('--source-branch', type=str, required=True)
git_parser.add_argument('--dest-gituser', type=str, required=False, default='git')
git_parser.add_argument('--dest-giturl', type=str, required=True)
git_parser.add_argument('--dest-gitorg', type=str, required=False, default='rpms')
git_parser.add_argument('--dest-branch', type=str, required=False, default='')
git_parser.add_argument('--release', type=str, required=False, default='')
git_parser.add_argument('--distprefix', type=str, required=False, default='el')
@ -52,6 +52,9 @@ results = parser.parse_args()
command = parser.parse_args().cmd
def main():
"""
Run the main program. Callable via poetry or __main__
"""
if command == 'rpm':
classy = importutil.SrpmImport(
git_url_path=results.giturl,
@ -71,11 +74,11 @@ def main():
source_git_user=results.source_gituser,
source_git_url_path=results.source_giturl,
source_git_org_path=results.source_gitorg,
git_user=results.gituser,
git_url_path=results.giturl,
org=results.gitorg,
dest_git_user=results.dest_gituser,
dest_git_url_path=results.dest_giturl,
dest_org=results.dest_gitorg,
release=results.release,
branch=results.branch,
source_branch=results.source_branch,
dest_branch=results.dest_branch,
upstream_lookaside=results.upstream_lookaside,
distprefix=results.distprefix,