File tree 1 file changed +11
-1
lines changed
tools/src/main/python/opengrok_tools/scm
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 18
18
#
19
19
20
20
#
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.
22
22
# Portions Copyright (c) 2020, Krystof Tulinger <k.tulinger@seznam.cz>
23
23
#
24
24
@@ -78,10 +78,20 @@ def reposync(self):
78
78
return 1
79
79
80
80
hg_command = [self .command , "update" ]
81
+ #
81
82
# Avoid remote branch lookup for default branches since
82
83
# some servers do not support it.
84
+ #
83
85
if branch == "default" :
84
86
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
+
85
95
cmd = self .get_command (hg_command , work_dir = self .path ,
86
96
env_vars = self .env , logger = self .logger )
87
97
cmd .execute ()
You can’t perform that action at this time.
0 commit comments