Commits

ZyX_I committed 8ad163e

Improved codeplex support

Comments (0)

Files changed (1)

plugin/aurum/drivers/mercurial.vim

 let s:gcproj='matchstr(domain, "\\v^[^.]+")'
 let s:pkbase='"http://".matchstr(domain, ''\v[^.]+\.[^.]+$'')."/projects/".matchstr(path, ''\v.*\/\zs[^~]+'').'.
             \                                                '"/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:cbssh=printf(s:cbbase, 'matchstr(path, "\\v^[^/]+", 1)',
             \                'matchstr(path, ''\v[^/]+%(\/[^/]+\/?$)'')',
 \      'clone': '"https://".domain.path',
 \       'push': '"ssh://hg@".matchstr(domain, ''\v\.@<=.*$'')."/".matchstr(domain, "\\v^[^.]+").path',}],
 \['domain =~? "\\V\\^hg\\d\\+.codeplex.com\\$"',
-\ {  'html': '"http://".path[1:].".codeplex.com/SourceControl/changeset/view/".'.
-\                                              'cs.hex[:11].'.
-\                                              '"#".substitute(file, "/", "%2f", "g")'}],
+\ {     'html': s:cpbase.'"/changeset/view/".cs.hex[:11]."#".substitute(file, "/", "%2f", "g")',
+\     'bundle': '"http://download.codeplex.com/Download/SourceControlFileDownload.ashx'.
+\                       '?ProjectName=".path[1:]."&changeSetId=".cs.hex[:11]',
+\  'changeset': s:cpbase.'"/changeset/changes/".cs.hex[:11]',
+\        'log': s:cpbase.'"/list/changesets"',
+\      'clone': '"https://".domain.path',
+\       'push': '"https://".domain.path',
+\ }],
 \['domain =~? "\\Vkilnhg.com\\$"',
 \ {  'html': '"http://".domain.path."/File/".file."?rev=".cs.hex',
 \    'hline': 'line'}],
 \        'log': '"http://".domain.path."/graph"',
 \      'clone': '"http://".domain.path',}],
 \]
-unlet s:ghpath s:gcproj s:cbssh s:cbhttps
+unlet s:ghpath s:gcproj s:cbssh s:cbhttps s:pkbase s:cpbase
 "▶1 removechangesets :: repo, start_rev_num → + repo
 function s:F.removechangesets(repo, start)
     let changesets=a:repo.changesets