File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 3737
3838POSSIBLE_REGEXES  =  (
3939    re .compile (r'^(?P<protocol>https?|git|ssh|rsync)\://' 
40-                r'(?:(?P<user>.+)@)*' 
41-                r'(?P<resource>[a-z0-9_.-]*)' 
42-                r'[:/]*' 
43-                r'(?P<port>[\d]+){0,1}' 
44-                r'(?P<pathname>\/((?P<owner>[\w\-]+)\/)?' 
45-                r'((?P<name>[\w\-\.]+?)(\.git|\/)?)?)$' ),
40+                r'(?:(?P<user>[^@]+)@)?' 
41+                r'(?P<resource>[^\/:]+)' 
42+                r'(:?(?P<port>\d+))?' 
43+                r'(?P<pathname>\/((?P<owner>[\w\-\.\/]+)\/)?' 
44+                r'(?P<name>[^\/]+?)(\.git|\/)?)$' ),
4645    re .compile (r'(git\+)?' 
4746               r'((?P<protocol>\w+)://)' 
4847               r'((?P<user>\w+)@)?' 
Original file line number Diff line number Diff line change @@ -315,6 +315,18 @@ def first_match_urls():
315315            'name' : 'Stouts.openvpn' ,
316316            'owner' : 'tterranigma' ,
317317        },
318+         'ssh://someserver.com/tfs/SomeWhere/My.Project/_git/somerepo' : {
319+             'pathname' : '/tfs/SomeWhere/My.Project/_git/somerepo' ,
320+             'protocols' : ['ssh' ],
321+             'protocol' : 'ssh' ,
322+             'href' :
323+             'ssh://someserver.com/tfs/SomeWhere/My.Project/_git/somerepo' ,
324+             'resource' : 'someserver.com' ,
325+             'user' : None ,
326+             'port' : None ,
327+             'name' : 'somerepo' ,
328+             'owner' : 'tfs/SomeWhere/My.Project/_git' ,
329+         },
318330    }
319331
320332
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments