@@ -506,17 +506,18 @@ def svn_remote_repo_with_files(
506
506
507
507
508
508
def _create_hg_remote_repo (
509
- remote_repos_path : pathlib .Path ,
510
- remote_repo_name : str ,
509
+ remote_repo_path : pathlib .Path ,
511
510
remote_repo_post_init : Optional [CreateRepoPostInitFn ] = None ,
512
511
init_cmd_args : InitCmdArgs = None ,
513
512
) -> pathlib .Path :
514
513
"""Create a test hg repo to for checkout / commit purposes."""
515
514
if init_cmd_args is None :
516
515
init_cmd_args = []
517
516
518
- remote_repo_path = remote_repos_path / remote_repo_name
519
- run (["hg" , "init" , remote_repo_name , * init_cmd_args ], cwd = remote_repos_path )
517
+ run (
518
+ ["hg" , "init" , remote_repo_path .stem , * init_cmd_args ],
519
+ cwd = remote_repo_path .parent ,
520
+ )
520
521
521
522
if remote_repo_post_init is not None and callable (remote_repo_post_init ):
522
523
remote_repo_post_init (remote_repo_path = remote_repo_path )
@@ -548,8 +549,7 @@ def empty_hg_repo(
548
549
return empty_hg_repo_path
549
550
550
551
return _create_hg_remote_repo (
551
- remote_repos_path = empty_hg_repo_path .parent ,
552
- remote_repo_name = empty_hg_repo_path .stem ,
552
+ remote_repo_path = empty_hg_repo_path ,
553
553
remote_repo_post_init = None ,
554
554
init_cmd_args = None ,
555
555
)
0 commit comments