@@ -34,15 +34,14 @@ internal class MercurialWorkingTree(workingDir: File, vcsType: VcsType) : Workin
3434
3535 override fun isShallow () = false
3636
37- override fun getRemoteUrl () = MercurialCommand . run (workingDir, " paths" , " default" ).requireSuccess( ).stdout.trimEnd()
37+ override fun getRemoteUrl () = runHg( " paths" , " default" ).stdout.trimEnd()
3838
39- override fun getRevision () =
40- MercurialCommand .run (workingDir, " --debug" , " id" , " -i" ).requireSuccess().stdout.trimEnd()
39+ override fun getRevision () = runHg(" --debug" , " id" , " -i" ).stdout.trimEnd()
4140
42- override fun getRootPath () = File (MercurialCommand . run (workingDir, " root" ).requireSuccess( ).stdout.trimEnd())
41+ override fun getRootPath () = File (runHg( " root" ).stdout.trimEnd())
4342
4443 override fun listRemoteBranches (): List <String > {
45- val branches = MercurialCommand . run (workingDir, " branches" ).requireSuccess( ).stdout.trimEnd()
44+ val branches = runHg( " branches" ).stdout.trimEnd()
4645 return branches.lines().map {
4746 it.substringBefore(' ' )
4847 }.sorted()
@@ -51,8 +50,8 @@ internal class MercurialWorkingTree(workingDir: File, vcsType: VcsType) : Workin
5150 override fun listRemoteTags (): List <String > {
5251 // Mercurial does not have the concept of global remote tags. Its "regular tags" are defined per
5352 // branch as part of the committed ".hgtags" file. See https://stackoverflow.com/a/2059189/1127485.
54- MercurialCommand . run (workingDir, " pull" , " -r" , " default" ).requireSuccess( )
55- val tags = MercurialCommand . run (workingDir, " cat" , " -r" , " default" , " .hgtags" ).requireSuccess( ).stdout.trimEnd()
53+ runHg( " pull" , " -r" , " default" )
54+ val tags = runHg( " cat" , " -r" , " default" , " .hgtags" ).stdout.trimEnd()
5655 return tags.lines().map {
5756 it.substringAfterLast(' ' )
5857 }.sorted()
0 commit comments