Commits

ZyX_I committed 4e4d686

Added support for gitorious

  • Participants
  • Parent commits 0762e03
  • Tags release-1.1

Comments (0)

Files changed (1)

plugin/aurum/drivers/mercurial.vim

 "  http://hg.savannah.nongnu.org/hgweb/mechsys/
 "  https://sharesource.org/hg/alqua/
 "  http://mercurial.tuxfamily.org/mercurialroot/slitaz/tazlito/
-"  git://repo.or.cz/vcscommand
+"  git://repo.or.cz/test2.git / http://repo.or.cz/r/test2.git /
+"       ssh://repo.or.cz/srv/git/test2.git
+"  git://gitorious.org/test4/test.git / https://git.gitorious.org/test4/test.git
+"       / git+ssh://git@gitorious.org:test4/test.git
 let s:ghpath='substitute(path, "\\v^[:/]|\\.git$", "", "g")'
 let s:gcproj='matchstr(domain, "\\v^[^.]+")'
 let s:pkbase='"http://".matchstr(domain, ''\v[^.]+\.[^.]+$'')."/projects/".matchstr(path, ''\v.*\/\zs[^~]+'').'.
 let s:cbbase='"https://".%s.".".domain."/projects/".%s."/repositories/".%s'
 let s:roproj='matchstr(path, ''\v\/@<=[^/]{-1,}%(%(\.git)?\/*$)@='').".git"'
 let s:robase='"http://".domain."/w/".'.s:roproj
+let s:godomain='substitute(domain, "^git\\.", "", "")'
+let s:gobase='"http://".'.s:godomain.'."/".'.s:ghpath
 let s:cbssh=printf(s:cbbase, 'matchstr(path, "\\v^[^/]+", 1)',
             \                'matchstr(path, ''\v[^/]+%(\/[^/]+\/?$)'')',
             \                'matchstr(path[:-4], "\\v[^/]+$")')
 \  'changeset': '"https://".domain."/".'.s:ghpath.'."/commit/".'.s:gb.'',
 \        'log': '"https://".domain."/".'.s:ghpath.'."/commits"',
 \      'clone': '"git://".domain."/".'.s:ghpath,
-\       'push': '"git+ssh://git@".domain.":".'.s:ghpath,}],
+\       'push': '"git+ssh://git@".domain.":".'.s:ghpath.'.".git"',}],
 \['domain =~? "\\Vhg.sourceforge.net\\$"',
 \ {     'html': '"http://".domain."/hgweb".path[7:]."/file/".cs.hex."/".file',     'hline': '"l".line',
 \        'raw': '"http://".domain."/hgweb".path[7:]."/raw-file/".cs.hex."/".file',
 \      'clone': 'url',}],
 \['domain is? "code.google.com"',
 \ {     'html': '"http://code.google.com/".substitute(path, "/$", "", "")."/source/browse/".file."?r=".'.s:gb,}],
+\['domain =~? ''\v^%(git\.)?gitorious\.org$''',
+\ {     'html': s:gobase.'."/blobs/".'.s:gb.'."/".file',       'hline': '"line".line',
+\        'raw': s:gobase.'."/blobs/raw/".'.s:gb.'."/".file',
+\   'annotate': s:gobase.'."/blobs/blame/".'.s:gb.'."/".file', 'aline': '"line".line',
+\   'filehist': s:gobase.'."/blobs/history/".'.s:gb.'."/".file',
+\  'changeset': s:gobase.'."/commit/".'.s:gb,
+\        'log': s:gobase.'."/commits/".'.s:gb,
+\      'clone': '"git://".'.s:godomain.'."/".'.s:ghpath,
+\       'push': '"git+ssh://git@".'.s:godomain.'.":".'.s:ghpath.'.".git"',}],
 \['domain is? "hg.assembla.com"',
 \ {     'html': '"http://trac-".domain.path."/browser/".file."?rev=".cs.hex',                'hline': '"L".line',
 \   'annotate': '"http://trac-".domain.path."/browser/".file."?annotate=blame&rev=".cs.hex', 'aline': '"L".line',
 \ '('.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 s:roproj
+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 s:gobase
+unlet s:godomain
 "▶1 removechangesets :: repo, start_rev_num → + repo
 function s:F.removechangesets(repo, start)
     let changesets=a:repo.changesets