File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
tools/src/main/python/opengrok_tools/scm Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1818#
1919
2020#
21- # Copyright (c) 2018, 2021 , Oracle and/or its affiliates. All rights reserved.
21+ # Copyright (c) 2018, 2024 , Oracle and/or its affiliates. All rights reserved.
2222# Portions Copyright (c) 2020, Krystof Tulinger <k.tulinger@seznam.cz>
2323#
2424
@@ -78,10 +78,20 @@ def reposync(self):
7878 return 1
7979
8080 hg_command = [self .command , "update" ]
81+ #
8182 # Avoid remote branch lookup for default branches since
8283 # some servers do not support it.
84+ #
8385 if branch == "default" :
8486 hg_command .append ("--check" )
87+
88+ #
89+ # In a multi-head situation, select the head with the
90+ # biggest index as this is likely the correct one.
91+ #
92+ hg_command .append ("-r" )
93+ hg_command .append ("'max(head() and branch(\" .\" ))'" )
94+
8595 cmd = self .get_command (hg_command , work_dir = self .path ,
8696 env_vars = self .env , logger = self .logger )
8797 cmd .execute ()
You can’t perform that action at this time.
0 commit comments