Dmitriy Zaporozhets
d60d5fe4e4
Improve ExtractsPath logic related to atom format
...
* Don't set request format to atom if '.atom' suffix was not provided
* Don't try '.atom' detection logic on request that uses extended_sha1
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-15 01:36:05 +03:00
Sean McGivern
1022456bb1
Allow browsing branches that end with '.atom'
...
We need to do two things to support this:
1. Simplify the regex capture in the routing for the CommitsController
to not exclude the '.atom' suffix. That's a perfectly valid git
branch name, so we shouldn't blow up if we get it.
2. Because Rails now can't automatically detect the request format, add
some code to do so in `ExtractPath` when there is no path. This means
that, given branches 'foo' and 'foo.atom', the Atom feed for the
former is unroutable. To fix this: don't do that! Give the branches
different names!
2016-10-11 13:31:12 +01:00
winniehell
ddbdf4e609
Restore get_id in ExtractsPath
2016-08-24 12:54:16 +02:00
winniehell
bb48a0faea
Do not escape URI when extracting path ( !5878 )
2016-08-19 18:08:08 +02:00
Elliot
68cea38e94
Fix front-end for branches that happen to contain urlencoding escape characters (e.g. %)
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-11 13:21:59 +02:00
Valery Sizov
8346dde052
Only render 404 page from /public
2015-10-13 20:12:34 +03:00
Stan Hu
ecbe119af1
Fix "Network" and "Graphs" pages for branches with encoded slashes
...
Closes #1359
2015-08-02 00:07:23 -07:00
Stan Hu
9add3e6eb5
Extract the longest-matching ref from a commit path when multiple matches occur
...
Closes #1839
2015-07-01 07:01:59 -07:00
Vinnie Okada
76aad9b76e
Upgrade to Rails 4.1.9
...
Make the following changes to deal with new behavior in Rails 4.1.2:
* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Dmitriy Zaporozhets
c916124178
Explicitly set before_filter for ref-related controllers
2015-01-26 15:01:51 -08:00
Dmitriy Zaporozhets
97a4d8aea4
Improve code according to new gitlab_git
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-04 14:46:15 +02:00
Dmitriy Zaporozhets
1d3f03fb69
Fix blob and repo stuff after gitlab_git v3
2013-10-01 18:26:55 +03:00
Dmitriy Zaporozhets
ae9dd62762
Update code to work with gitlab_git 3
2013-10-01 17:00:28 +03:00
Hiroyuki Sato
1101ceb3f4
A little improvement
...
1. Replace params key 'q' with 'extended_sha1'. A extended SHA1 syntax is explained in 'man gitrevisions'.
2. Change the placeholder of looking for commit.
3. Change the label of ref filter.
2013-08-21 19:20:29 +09:00
Hiroyuki Sato
5f24bdb7d0
Render not found when failing to look for a commit
2013-08-21 17:53:51 +09:00
Dmitriy Zaporozhets
b92655663c
Update main calls to gitlab_git
2013-08-05 16:51:04 +03:00
Sato Hiroyuki
c0e3b39792
Set @options in assing_ref_vars
...
@options enable to keep params when switching ref.
2013-05-13 18:44:33 +09:00
Sato Hiroyuki
97a9c2293a
Refactor: remove dup code
2013-05-13 18:41:04 +09:00
Sato Hiroyuki
05c2c15cd1
Fix Gitlab::Git::Repository#commit returns wrong commit, if commit_id is "tag name".
2013-04-25 20:54:00 +00:00
Dmitriy Zaporozhets
03f41e2820
Gitlab::Git::Tree & Blob added
2013-04-02 22:37:20 +03:00
Dmitriy Zaporozhets
5f4445c3d3
store commits for MR as array of hashes
2013-04-02 21:30:36 +03:00
Dmitriy Zaporozhets
541d899410
Project.repository should never be nil so you can call repository.exists? or repository.empty?
...
Also specify separate project factory for project with filled repo
2013-04-01 16:56:25 +03:00
Dmitriy Zaporozhets
bbfbff3add
Extend models functionality with old decorator methods. Use Repository model
2013-03-31 23:48:12 +03:00
Dmitriy Zaporozhets
9dc644635f
Fix tests and remove app/models/repository.rb
2013-03-31 18:50:17 +03:00
Sato Hiroyuki
a1fe375e44
Fix 404 error while displaying json files.
...
It uses params[:id] instead of request.fullpath.
It should fix #3132 .
2013-03-21 15:10:14 +00:00
Sato Hiroyuki
e7a67a5583
Don't set format manually, bacause set in routing.
2013-03-06 16:36:10 +09:00
Dmitriy Zaporozhets
a73e58f70b
draper raise now RuntimeError instead of NoMethodError
2013-03-01 15:59:43 +02:00
Sato Hiroyuki
df85c9c06a
Fix bug when it has been switched to tag.
2013-02-05 19:08:25 +09:00
Sato Hiroyuki
525a8cd3e9
Switchable the main branch on network graph
2013-01-30 09:12:03 +09:00
Jun Futagawa
79b9249ff4
Remove relative_url_root from path. Fixes #2602
...
Files and Commits render a 404 when running with relative_url_root.
2013-01-23 17:29:46 +09:00
Dmitriy Zaporozhets
0d5c6a48be
Merge pull request #2484 from netdata/fix_url_encode
...
Fixing request.fullpath URL encoding
2013-01-09 00:35:32 -08:00
Dmitriy Zaporozhets
aa97ff7fde
Fixed tree logs for branches with slash. Fixed remember of path when switch branch
2013-01-09 09:34:26 +02:00
Wouter D'Haeseleer
fd4bcd9f09
Fixing request.fullpath URL encoding
...
Let's assume your path is = "project/tree/master/This%20Is%20valid"
In this case gitlab renders a 404.
To fix this we should decode the path so that it looks like
"project/tree/master/This Is valid"
2013-01-04 15:05:00 +01:00
Dmitriy Zaporozhets
39ba934c0a
REpostiry, Team models
2013-01-03 21:09:18 +02:00
Dmitriy Zaporozhets
1b25a8f437
Improve Extract path
2013-01-02 22:39:02 +02:00
Dmitriy Zaporozhets
c8ba5c2d58
Fix routing issues when navigating over tree, commits etc
2012-12-25 06:14:05 +03:00
Robert Speicher
3606a14889
ExtractsPath: Use ref_names instead of branches+tags
2012-10-04 14:13:52 -04:00
Valeriy Sizov
e25ddca0c4
Fix bug with branches whose name contains slash
2012-10-04 19:31:31 +03:00
Robert Speicher
835be5b1bf
ExtractPaths - Only call assign_ref_vars on show action
2012-09-26 16:32:22 -04:00
Robert Speicher
a1e68a9120
Rename RefExtractor to ExtractsPath
...
Update docs a bit
2012-09-26 16:32:22 -04:00