Commits

ZyX_I committed 75bcfad

Fixed repo.or.cz support

  • Participants
  • Parent commits bc93a62

Comments (0)

Files changed (1)

plugin/aurum/drivers/mercurial.vim

             \                                                '"/sources/". matchstr(path, "\\v[^~]+$")'
 let s:cpbase='"http://".path[1:].".codeplex.com/SourceControl'
 let s:cbbase='"https://".%s.".".domain."/projects/".%s."/repositories/".%s'
-let s:robase='"http://".domain."/w".substitute(path, ''\v(\.git)?\/*$'', ".git", "")'
+let s:roproj='matchstr(path, ''\v\/@<=[^/]{-1,}%(%(\.git)?\/*$)@='').".git"'
+let s:robase='"http://".domain."/w/".'.s:roproj
 let s:cbssh=printf(s:cbbase, 'matchstr(path, "\\v^[^/]+", 1)',
             \                'matchstr(path, ''\v[^/]+%(\/[^/]+\/?$)'')',
             \                'matchstr(path[:-4], "\\v[^/]+$")')
 \  'changeset': '"http://".domain."/git/gitweb.cgi?p=".path[9:].";a=commitdiff;hb=".'.s:gb,
 \        'log': '"http://".domain."/git/gitweb.cgi?p=".path[9:].";a=log"',
 \      'clone': '"http://".domain.":8000".path',
-\       'push': '"ssh://".user."@".domain.path',}],
+\       'push': '"git+ssh://".user."@".domain.path',}],
 \['domain =~? "\\Vsvn.sourceforge.net\\$"',
 \ {     'html': '"http://".domain."/viewvc".path[8:]."/".file."?view=log"',
 \        'raw': '"http://".domain."/viewvc".path[8:]."/".file',
 \   'filehist': s:robase.'."/history/".'.s:gb.'.":/".file',
 \  'changeset': s:robase.'."/commit/".'.s:gb,
 \        'log': s:robase.'."/log/".'.s:gb,
-\      'clone': '"http://".domain.path',}],
+\      'clone': '"git://".domain."/".'.s:roproj,
+\       'push': '"git+ssh://".domain."/srv/git/".'.s:roproj,}],
 \['domain is? "sharesource.org" && path[:2] is? "/hg"',
 \ map(copy(s:hgwebdict), 'substitute(v:val, "http", "https", "")')],
 \[ 'domain =~? ''\v^%(mercurial\.%(intuxication|tuxfamily)|hg\.mozdev|hg\.savannah\.%(non)?gnu)\.org$'' || '.
 \ '('.s:dl.'=~#''\V<link rel="icon" href="\[^"]\*static/hgicon.png" type="image/png" />'')',
 \ s:hgwebdict],
 \]
-unlet s:ghpath s:gcproj s:cbssh s:cbhttps s:pkbase s:cpbase s:gb s:dl s:hgwebdict s:bbdict s:robase
+unlet s:ghpath s:gcproj s:cbssh s:cbhttps s:pkbase s:cpbase s:gb s:dl s:hgwebdict s:bbdict s:robase s:roproj
 "▶1 removechangesets :: repo, start_rev_num → + repo
 function s:F.removechangesets(repo, start)
     let changesets=a:repo.changesets