rakelib/hglib.rb
changeset 336 b31bb339d800
parent 321 c868ba75e2da
equal deleted inserted replaced
335:0e5b715d82b1 336:b31bb339d800
   512         # username in remote URI. Otherwise Mercurial won't use
   512         # username in remote URI. Otherwise Mercurial won't use
   513         # password from config!
   513         # password from config!
   514         uri = URI.parse(self.paths[remote] || remote)
   514         uri = URI.parse(self.paths[remote] || remote)
   515         uri.user = nil
   515         uri.user = nil
   516         uri = uri.to_s
   516         uri = uri.to_s
   517         uri_alias = self.paths.has_key? remote ? remote : 'xxx'
   517         uri_alias = self.paths[remote] || 'xxx'
   518         authconf << "auth.#{uri_alias}.prefix=#{uri}"
   518         authconf << "auth.#{uri_alias}.prefix=#{uri}"
   519         authconf << "auth.#{uri_alias}.username=#{user}"
   519         authconf << "auth.#{uri_alias}.username=#{user}"
   520         authconf << "auth.#{uri_alias}.password=#{pass}"
   520         authconf << "auth.#{uri_alias}.password=#{pass}"
   521       end
   521       end
   522       authconf
   522       authconf