File tree 2 files changed +16
-6
lines changed
2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 37
37
38
38
POSSIBLE_REGEXES = (
39
39
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|\/)?)$' ),
46
45
re .compile (r'(git\+)?'
47
46
r'((?P<protocol>\w+)://)'
48
47
r'((?P<user>\w+)@)?'
Original file line number Diff line number Diff line change @@ -315,6 +315,17 @@ def first_match_urls():
315
315
'name' : 'Stouts.openvpn' ,
316
316
'owner' : 'tterranigma' ,
317
317
},
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' : 'ssh://someserver.com/tfs/SomeWhere/My.Project/_git/somerepo' ,
323
+ 'resource' : 'someserver.com' ,
324
+ 'user' : None ,
325
+ 'port' : None ,
326
+ 'name' : 'somerepo' ,
327
+ 'owner' : 'tfs/SomeWhere/My.Project/_git' ,
328
+ },
318
329
}
319
330
320
331
You can’t perform that action at this time.
0 commit comments