##// END OF EJS Templates
switched repo_name to non greedy match....
marcink -
r2692:1f75b23c beta
parent child Browse files
Show More
@@ -69,7 +69,7 b' def make_map(config):'
69 69 rmap.connect('home', '/', controller='home', action='index')
70 70 rmap.connect('repo_switcher', '/repos', controller='home',
71 71 action='repo_switcher')
72 rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*}',
72 rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*?}',
73 73 controller='home', action='branch_tag_switcher')
74 74 rmap.connect('bugtracker',
75 75 "http://bitbucket.org/marcinkuzminski/rhodecode/issues",
@@ -93,49 +93,49 b' def make_map(config):'
93 93 action="new", conditions=dict(method=["GET"]))
94 94 m.connect("formatted_new_repo", "/repos/new.{format}",
95 95 action="new", conditions=dict(method=["GET"]))
96 m.connect("/repos/{repo_name:.*}",
96 m.connect("/repos/{repo_name:.*?}",
97 97 action="update", conditions=dict(method=["PUT"],
98 98 function=check_repo))
99 m.connect("/repos/{repo_name:.*}",
99 m.connect("/repos/{repo_name:.*?}",
100 100 action="delete", conditions=dict(method=["DELETE"],
101 101 function=check_repo))
102 m.connect("edit_repo", "/repos/{repo_name:.*}/edit",
102 m.connect("edit_repo", "/repos/{repo_name:.*?}/edit",
103 103 action="edit", conditions=dict(method=["GET"],
104 104 function=check_repo))
105 m.connect("formatted_edit_repo", "/repos/{repo_name:.*}.{format}/edit",
105 m.connect("formatted_edit_repo", "/repos/{repo_name:.*?}.{format}/edit",
106 106 action="edit", conditions=dict(method=["GET"],
107 107 function=check_repo))
108 m.connect("repo", "/repos/{repo_name:.*}",
108 m.connect("repo", "/repos/{repo_name:.*?}",
109 109 action="show", conditions=dict(method=["GET"],
110 110 function=check_repo))
111 m.connect("formatted_repo", "/repos/{repo_name:.*}.{format}",
111 m.connect("formatted_repo", "/repos/{repo_name:.*?}.{format}",
112 112 action="show", conditions=dict(method=["GET"],
113 113 function=check_repo))
114 114 #ajax delete repo perm user
115 m.connect('delete_repo_user', "/repos_delete_user/{repo_name:.*}",
115 m.connect('delete_repo_user', "/repos_delete_user/{repo_name:.*?}",
116 116 action="delete_perm_user",
117 117 conditions=dict(method=["DELETE"], function=check_repo))
118 118
119 119 #ajax delete repo perm users_group
120 120 m.connect('delete_repo_users_group',
121 "/repos_delete_users_group/{repo_name:.*}",
121 "/repos_delete_users_group/{repo_name:.*?}",
122 122 action="delete_perm_users_group",
123 123 conditions=dict(method=["DELETE"], function=check_repo))
124 124
125 125 #settings actions
126 m.connect('repo_stats', "/repos_stats/{repo_name:.*}",
126 m.connect('repo_stats', "/repos_stats/{repo_name:.*?}",
127 127 action="repo_stats", conditions=dict(method=["DELETE"],
128 128 function=check_repo))
129 m.connect('repo_cache', "/repos_cache/{repo_name:.*}",
129 m.connect('repo_cache', "/repos_cache/{repo_name:.*?}",
130 130 action="repo_cache", conditions=dict(method=["DELETE"],
131 131 function=check_repo))
132 m.connect('repo_public_journal', "/repos_public_journal/{repo_name:.*}",
132 m.connect('repo_public_journal', "/repos_public_journal/{repo_name:.*?}",
133 133 action="repo_public_journal", conditions=dict(method=["PUT"],
134 134 function=check_repo))
135 m.connect('repo_pull', "/repo_pull/{repo_name:.*}",
135 m.connect('repo_pull', "/repo_pull/{repo_name:.*?}",
136 136 action="repo_pull", conditions=dict(method=["PUT"],
137 137 function=check_repo))
138 m.connect('repo_as_fork', "/repo_as_fork/{repo_name:.*}",
138 m.connect('repo_as_fork', "/repo_as_fork/{repo_name:.*?}",
139 139 action="repo_as_fork", conditions=dict(method=["PUT"],
140 140 function=check_repo))
141 141
@@ -300,7 +300,6 b' def make_map(config):'
300 300 m.connect("admin_settings_my_pullrequests", "/my_account/pull_requests",
301 301 action="my_account_my_pullrequests", conditions=dict(method=["GET"]))
302 302
303
304 303 #NOTIFICATION REST ROUTES
305 304 with rmap.submapper(path_prefix=ADMIN_PREFIX,
306 305 controller='admin/notifications') as m:
@@ -394,18 +393,18 b' def make_map(config):'
394 393 controller='login', action='password_reset_confirmation')
395 394
396 395 #FEEDS
397 rmap.connect('rss_feed_home', '/{repo_name:.*}/feed/rss',
396 rmap.connect('rss_feed_home', '/{repo_name:.*?}/feed/rss',
398 397 controller='feed', action='rss',
399 398 conditions=dict(function=check_repo))
400 399
401 rmap.connect('atom_feed_home', '/{repo_name:.*}/feed/atom',
400 rmap.connect('atom_feed_home', '/{repo_name:.*?}/feed/atom',
402 401 controller='feed', action='atom',
403 402 conditions=dict(function=check_repo))
404 403
405 404 #==========================================================================
406 405 # REPOSITORY ROUTES
407 406 #==========================================================================
408 rmap.connect('summary_home', '/{repo_name:.*}',
407 rmap.connect('summary_home', '/{repo_name:.*?}',
409 408 controller='summary',
410 409 conditions=dict(function=check_repo))
411 410
@@ -413,159 +412,159 b' def make_map(config):'
413 412 controller='admin/repos_groups', action="show_by_name",
414 413 conditions=dict(function=check_group))
415 414
416 rmap.connect('changeset_home', '/{repo_name:.*}/changeset/{revision}',
415 rmap.connect('changeset_home', '/{repo_name:.*?}/changeset/{revision}',
417 416 controller='changeset', revision='tip',
418 417 conditions=dict(function=check_repo))
419 418
420 419 rmap.connect('changeset_comment',
421 '/{repo_name:.*}/changeset/{revision}/comment',
420 '/{repo_name:.*?}/changeset/{revision}/comment',
422 421 controller='changeset', revision='tip', action='comment',
423 422 conditions=dict(function=check_repo))
424 423
425 424 rmap.connect('changeset_comment_delete',
426 '/{repo_name:.*}/changeset/comment/{comment_id}/delete',
425 '/{repo_name:.*?}/changeset/comment/{comment_id}/delete',
427 426 controller='changeset', action='delete_comment',
428 427 conditions=dict(function=check_repo, method=["DELETE"]))
429 428
430 429 rmap.connect('raw_changeset_home',
431 '/{repo_name:.*}/raw-changeset/{revision}',
430 '/{repo_name:.*?}/raw-changeset/{revision}',
432 431 controller='changeset', action='raw_changeset',
433 432 revision='tip', conditions=dict(function=check_repo))
434 433
435 434 rmap.connect('compare_url',
436 '/{repo_name:.*}/compare/{org_ref_type}@{org_ref}...{other_ref_type}@{other_ref}',
435 '/{repo_name:.*?}/compare/{org_ref_type}@{org_ref}...{other_ref_type}@{other_ref}',
437 436 controller='compare', action='index',
438 437 conditions=dict(function=check_repo),
439 438 requirements=dict(org_ref_type='(branch|book|tag|rev)',
440 439 other_ref_type='(branch|book|tag|rev)'))
441 440
442 441 rmap.connect('pullrequest_home',
443 '/{repo_name:.*}/pull-request/new', controller='pullrequests',
442 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
444 443 action='index', conditions=dict(function=check_repo,
445 444 method=["GET"]))
446 445
447 446 rmap.connect('pullrequest',
448 '/{repo_name:.*}/pull-request/new', controller='pullrequests',
447 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
449 448 action='create', conditions=dict(function=check_repo,
450 449 method=["POST"]))
451 450
452 451 rmap.connect('pullrequest_show',
453 '/{repo_name:.*}/pull-request/{pull_request_id}',
452 '/{repo_name:.*?}/pull-request/{pull_request_id}',
454 453 controller='pullrequests',
455 454 action='show', conditions=dict(function=check_repo,
456 455 method=["GET"]))
457 456 rmap.connect('pullrequest_update',
458 '/{repo_name:.*}/pull-request/{pull_request_id}',
457 '/{repo_name:.*?}/pull-request/{pull_request_id}',
459 458 controller='pullrequests',
460 459 action='update', conditions=dict(function=check_repo,
461 460 method=["PUT"]))
462 461
463 462 rmap.connect('pullrequest_show_all',
464 '/{repo_name:.*}/pull-request',
463 '/{repo_name:.*?}/pull-request',
465 464 controller='pullrequests',
466 465 action='show_all', conditions=dict(function=check_repo,
467 466 method=["GET"]))
468 467
469 468 rmap.connect('pullrequest_comment',
470 '/{repo_name:.*}/pull-request-comment/{pull_request_id}',
469 '/{repo_name:.*?}/pull-request-comment/{pull_request_id}',
471 470 controller='pullrequests',
472 471 action='comment', conditions=dict(function=check_repo,
473 472 method=["POST"]))
474 473
475 474 rmap.connect('pullrequest_comment_delete',
476 '/{repo_name:.*}/pull-request-comment/{comment_id}/delete',
475 '/{repo_name:.*?}/pull-request-comment/{comment_id}/delete',
477 476 controller='pullrequests', action='delete_comment',
478 477 conditions=dict(function=check_repo, method=["DELETE"]))
479 478
480 rmap.connect('summary_home', '/{repo_name:.*}/summary',
479 rmap.connect('summary_home', '/{repo_name:.*?}/summary',
481 480 controller='summary', conditions=dict(function=check_repo))
482 481
483 rmap.connect('shortlog_home', '/{repo_name:.*}/shortlog',
482 rmap.connect('shortlog_home', '/{repo_name:.*?}/shortlog',
484 483 controller='shortlog', conditions=dict(function=check_repo))
485 484
486 rmap.connect('branches_home', '/{repo_name:.*}/branches',
485 rmap.connect('branches_home', '/{repo_name:.*?}/branches',
487 486 controller='branches', conditions=dict(function=check_repo))
488 487
489 rmap.connect('tags_home', '/{repo_name:.*}/tags',
488 rmap.connect('tags_home', '/{repo_name:.*?}/tags',
490 489 controller='tags', conditions=dict(function=check_repo))
491 490
492 rmap.connect('bookmarks_home', '/{repo_name:.*}/bookmarks',
491 rmap.connect('bookmarks_home', '/{repo_name:.*?}/bookmarks',
493 492 controller='bookmarks', conditions=dict(function=check_repo))
494 493
495 rmap.connect('changelog_home', '/{repo_name:.*}/changelog',
494 rmap.connect('changelog_home', '/{repo_name:.*?}/changelog',
496 495 controller='changelog', conditions=dict(function=check_repo))
497 496
498 rmap.connect('changelog_details', '/{repo_name:.*}/changelog_details/{cs}',
497 rmap.connect('changelog_details', '/{repo_name:.*?}/changelog_details/{cs}',
499 498 controller='changelog', action='changelog_details',
500 499 conditions=dict(function=check_repo))
501 500
502 rmap.connect('files_home', '/{repo_name:.*}/files/{revision}/{f_path:.*}',
501 rmap.connect('files_home', '/{repo_name:.*?}/files/{revision}/{f_path:.*}',
503 502 controller='files', revision='tip', f_path='',
504 503 conditions=dict(function=check_repo))
505 504
506 rmap.connect('files_diff_home', '/{repo_name:.*}/diff/{f_path:.*}',
505 rmap.connect('files_diff_home', '/{repo_name:.*?}/diff/{f_path:.*}',
507 506 controller='files', action='diff', revision='tip', f_path='',
508 507 conditions=dict(function=check_repo))
509 508
510 509 rmap.connect('files_rawfile_home',
511 '/{repo_name:.*}/rawfile/{revision}/{f_path:.*}',
510 '/{repo_name:.*?}/rawfile/{revision}/{f_path:.*}',
512 511 controller='files', action='rawfile', revision='tip',
513 512 f_path='', conditions=dict(function=check_repo))
514 513
515 514 rmap.connect('files_raw_home',
516 '/{repo_name:.*}/raw/{revision}/{f_path:.*}',
515 '/{repo_name:.*?}/raw/{revision}/{f_path:.*}',
517 516 controller='files', action='raw', revision='tip', f_path='',
518 517 conditions=dict(function=check_repo))
519 518
520 519 rmap.connect('files_annotate_home',
521 '/{repo_name:.*}/annotate/{revision}/{f_path:.*}',
520 '/{repo_name:.*?}/annotate/{revision}/{f_path:.*}',
522 521 controller='files', action='index', revision='tip',
523 522 f_path='', annotate=True, conditions=dict(function=check_repo))
524 523
525 524 rmap.connect('files_edit_home',
526 '/{repo_name:.*}/edit/{revision}/{f_path:.*}',
525 '/{repo_name:.*?}/edit/{revision}/{f_path:.*}',
527 526 controller='files', action='edit', revision='tip',
528 527 f_path='', conditions=dict(function=check_repo))
529 528
530 529 rmap.connect('files_add_home',
531 '/{repo_name:.*}/add/{revision}/{f_path:.*}',
530 '/{repo_name:.*?}/add/{revision}/{f_path:.*}',
532 531 controller='files', action='add', revision='tip',
533 532 f_path='', conditions=dict(function=check_repo))
534 533
535 rmap.connect('files_archive_home', '/{repo_name:.*}/archive/{fname}',
534 rmap.connect('files_archive_home', '/{repo_name:.*?}/archive/{fname}',
536 535 controller='files', action='archivefile',
537 536 conditions=dict(function=check_repo))
538 537
539 538 rmap.connect('files_nodelist_home',
540 '/{repo_name:.*}/nodelist/{revision}/{f_path:.*}',
539 '/{repo_name:.*?}/nodelist/{revision}/{f_path:.*}',
541 540 controller='files', action='nodelist',
542 541 conditions=dict(function=check_repo))
543 542
544 rmap.connect('repo_settings_delete', '/{repo_name:.*}/settings',
543 rmap.connect('repo_settings_delete', '/{repo_name:.*?}/settings',
545 544 controller='settings', action="delete",
546 545 conditions=dict(method=["DELETE"], function=check_repo))
547 546
548 rmap.connect('repo_settings_update', '/{repo_name:.*}/settings',
547 rmap.connect('repo_settings_update', '/{repo_name:.*?}/settings',
549 548 controller='settings', action="update",
550 549 conditions=dict(method=["PUT"], function=check_repo))
551 550
552 rmap.connect('repo_settings_home', '/{repo_name:.*}/settings',
551 rmap.connect('repo_settings_home', '/{repo_name:.*?}/settings',
553 552 controller='settings', action='index',
554 553 conditions=dict(function=check_repo))
555 554
556 rmap.connect('repo_fork_create_home', '/{repo_name:.*}/fork',
555 rmap.connect('repo_fork_create_home', '/{repo_name:.*?}/fork',
557 556 controller='forks', action='fork_create',
558 557 conditions=dict(function=check_repo, method=["POST"]))
559 558
560 rmap.connect('repo_fork_home', '/{repo_name:.*}/fork',
559 rmap.connect('repo_fork_home', '/{repo_name:.*?}/fork',
561 560 controller='forks', action='fork',
562 561 conditions=dict(function=check_repo))
563 562
564 rmap.connect('repo_forks_home', '/{repo_name:.*}/forks',
563 rmap.connect('repo_forks_home', '/{repo_name:.*?}/forks',
565 564 controller='forks', action='forks',
566 565 conditions=dict(function=check_repo))
567 566
568 rmap.connect('repo_followers_home', '/{repo_name:.*}/followers',
567 rmap.connect('repo_followers_home', '/{repo_name:.*?}/followers',
569 568 controller='followers', action='followers',
570 569 conditions=dict(function=check_repo))
571 570
General Comments 0
You need to be logged in to leave comments. Login now