@@ -192,7 +192,7 @@ def merge_base(self, ref1, ref2) -> str:
192
192
return self ._run_git_cmd ("merge-base" , ref1 , ref2 ).strip ()
193
193
194
194
def rev_list (self , ref ):
195
- return self ._run_git_cmd ("rev-list" , f"{ self .remote } /master ..{ ref } " ).strip ().split ()
195
+ return self ._run_git_cmd ("rev-list" , f"{ self .remote } /main ..{ ref } " ).strip ().split ()
196
196
197
197
198
198
def build_commit_dict (commits : List [GitCommit ]) -> Dict [str , GitCommit ]:
@@ -353,16 +353,16 @@ def print_contributor_stats(commits, delta: Optional[timedelta] = None) -> None:
353
353
def commits_missing_in_branch (repo : GitRepo , branch : str , orig_branch : str , milestone_idx : int ) -> None :
354
354
def get_commits_dict (x , y ):
355
355
return build_commit_dict (repo .get_commit_list (x , y ))
356
- master_commits = get_commits_dict (orig_branch , 'master ' )
356
+ main_commits = get_commits_dict (orig_branch , 'main ' )
357
357
release_commits = get_commits_dict (orig_branch , branch )
358
- print (f"len(master_commits )={ len (master_commits )} " )
358
+ print (f"len(main_commits )={ len (main_commits )} " )
359
359
print (f"len(release_commits)={ len (release_commits )} " )
360
360
print ("URL;Title;Status" )
361
361
for issue in gh_get_milestone_issues ('pytorch' , 'pytorch' , milestone_idx , IssueState .ALL ):
362
362
html_url , state = issue ["html_url" ], issue ["state" ]
363
363
# Skip closed states if they were landed before merge date
364
364
if state == "closed" :
365
- mentioned_after_cut = any (html_url in commit_message for commit_message in master_commits .values ())
365
+ mentioned_after_cut = any (html_url in commit_message for commit_message in main_commits .values ())
366
366
# If issue is not mentioned after cut, that it must be present in release branch
367
367
if not mentioned_after_cut :
368
368
continue
@@ -450,7 +450,7 @@ def main():
450
450
451
451
print (f"Parsing git history with remote { remote } ..." , end = '' , flush = True )
452
452
start_time = time .time ()
453
- x = repo ._run_git_log (f"{ remote } /master " )
453
+ x = repo ._run_git_log (f"{ remote } /main " )
454
454
print (f"done in { time .time ()- start_time :.1f} sec" )
455
455
if args .analyze_reverts :
456
456
analyze_reverts (x )
0 commit comments