@@ -558,12 +558,15 @@ def _create_hg_remote_repo(
558
558
return remote_repo_path
559
559
560
560
561
- def hg_remote_repo_single_commit_post_init (remote_repo_path : pathlib .Path ) -> None :
561
+ def hg_remote_repo_single_commit_post_init (
562
+ remote_repo_path : pathlib .Path ,
563
+ env : "_ENV | None" = None ,
564
+ ) -> None :
562
565
"""Post-initialization: Create a test mercurial repo with a single commit."""
563
566
testfile_filename = "testfile.test"
564
- run (["touch" , testfile_filename ], cwd = remote_repo_path )
565
- run (["hg" , "add" , testfile_filename ], cwd = remote_repo_path )
566
- run (["hg" , "commit" , "-m" , "test file for hg repo" ], cwd = remote_repo_path )
567
+ run (["touch" , testfile_filename ], cwd = remote_repo_path , env = env )
568
+ run (["hg" , "add" , testfile_filename ], cwd = remote_repo_path , env = env )
569
+ run (["hg" , "commit" , "-m" , "test file for hg repo" ], cwd = remote_repo_path , env = env )
567
570
568
571
569
572
@pytest .fixture (scope = "session" )
@@ -625,10 +628,13 @@ def fn(
625
628
def hg_remote_repo (
626
629
remote_repos_path : pathlib .Path ,
627
630
create_hg_remote_repo : CreateRepoPytestFixtureFn ,
631
+ hgconfig : pathlib .Path ,
628
632
) -> pathlib .Path :
629
633
"""Pre-made, file-based repo for push and pull."""
630
634
repo_path = create_hg_remote_repo ()
631
- hg_remote_repo_single_commit_post_init (remote_repo_path = repo_path )
635
+ hg_remote_repo_single_commit_post_init (
636
+ remote_repo_path = repo_path , env = {"HGRCPATH" : str (hgconfig )}
637
+ )
632
638
return repo_path
633
639
634
640
0 commit comments