Rakefiles: fix `HG::Repository#autoconf`
authorJan Vrany <jan.vrany@labware.com>
Mon, 31 Jul 2023 11:41:28 +0100
changeset 336 b31bb339d800
parent 335 0e5b715d82b1
child 337 bb034655c810
Rakefiles: fix `HG::Repository#autoconf` This commit fixes a slip in `autoconf` method which generated working but somewhat confusing HTTP auth config - it used to generate '... --config auth.true.prefix` rather than (intended) `... --config auth.upstream.prefix`.
rakelib/hglib.rb
--- a/rakelib/hglib.rb	Fri Jun 16 21:44:00 2023 +0100
+++ b/rakelib/hglib.rb	Mon Jul 31 11:41:28 2023 +0100
@@ -514,7 +514,7 @@
         uri = URI.parse(self.paths[remote] || remote)
         uri.user = nil
         uri = uri.to_s
-        uri_alias = self.paths.has_key? remote ? remote : 'xxx'
+        uri_alias = self.paths[remote] || 'xxx'
         authconf << "auth.#{uri_alias}.prefix=#{uri}"
         authconf << "auth.#{uri_alias}.username=#{user}"
         authconf << "auth.#{uri_alias}.password=#{pass}"