commit b181a8a8f99008d6cddad803a9028ea9ac925814
Author: Peter Fern <github@obfusc8.org>
Date:   Mon Sep 2 20:48:32 2013 +1000

    Expand refs constraints to include valid characters
    
    Fixes #4831, #4865, #4932

diff --git a/config/routes.rb b/config/routes.rb
index ff84bc1..bafa0fb 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -225,13 +225,13 @@ Gitlab::Application.routes.draw do
         end
       end
 
-      resources :branches, only: [:index, :new, :create, :destroy] do
+      resources :branches, only: [:index, :new, :create, :destroy], constraints: { id: /[a-zA-Z.\/0-9_\-#%+@]+/ } do
         collection do
-          get :recent
+          get :recent, constraints: { id: /[a-zA-Z.\/0-9_\-#%+@]+/ }
         end
       end
 
-      resources :tags, only: [:index, :new, :create, :destroy]
+      resources :tags, only: [:index, :new, :create, :destroy], constraints: { id: /[a-zA-Z.\/0-9_\-#%+@]+/ }
       resources :protected_branches, only: [:index, :create, :destroy]
 
       resources :refs, only: [] do
@@ -241,11 +241,11 @@ Gitlab::Application.routes.draw do
 
         member do
           # tree viewer logs
-          get "logs_tree", constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ }
+          get "logs_tree", constraints: { id: /[a-zA-Z.\/0-9_\-#%+@]+/ }
           get "logs_tree/:path" => "refs#logs_tree",
             as: :logs_file,
             constraints: {
-              id:   /[a-zA-Z.0-9\/_\-#%+]+/,
+              id:   /[a-zA-Z.0-9\/_\-#%+@]+/,
               path: /.*/
             }
         end
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index 5fb0f86..574c3e6 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -138,12 +138,24 @@ end
 describe Projects::BranchesController, "routing" do
   it "to #branches" do
     get("/gitlabhq/branches").should route_to('projects/branches#index', project_id: 'gitlabhq')
+    delete("/gitlabhq/branches/feature%2345").should route_to('projects/branches#destroy', project_id: 'gitlabhq', id: 'feature#45')
+    delete("/gitlabhq/branches/feature%2B45").should route_to('projects/branches#destroy', project_id: 'gitlabhq', id: 'feature+45')
+    delete("/gitlabhq/branches/feature@45").should route_to('projects/branches#destroy', project_id: 'gitlabhq', id: 'feature@45')
+    delete("/gitlabhq/branches/feature%2345/foo/bar/baz").should route_to('projects/branches#destroy', project_id: 'gitlabhq', id: 'feature#45/foo/bar/baz')
+    delete("/gitlabhq/branches/feature%2B45/foo/bar/baz").should route_to('projects/branches#destroy', project_id: 'gitlabhq', id: 'feature+45/foo/bar/baz')
+    delete("/gitlabhq/branches/feature@45/foo/bar/baz").should route_to('projects/branches#destroy', project_id: 'gitlabhq', id: 'feature@45/foo/bar/baz')
   end
 end
 
 describe Projects::TagsController, "routing" do
   it "to #tags" do
     get("/gitlabhq/tags").should route_to('projects/tags#index', project_id: 'gitlabhq')
+    delete("/gitlabhq/tags/feature%2345").should route_to('projects/tags#destroy', project_id: 'gitlabhq', id: 'feature#45')
+    delete("/gitlabhq/tags/feature%2B45").should route_to('projects/tags#destroy', project_id: 'gitlabhq', id: 'feature+45')
+    delete("/gitlabhq/tags/feature@45").should route_to('projects/tags#destroy', project_id: 'gitlabhq', id: 'feature@45')
+    delete("/gitlabhq/tags/feature%2345/foo/bar/baz").should route_to('projects/tags#destroy', project_id: 'gitlabhq', id: 'feature#45/foo/bar/baz')
+    delete("/gitlabhq/tags/feature%2B45/foo/bar/baz").should route_to('projects/tags#destroy', project_id: 'gitlabhq', id: 'feature+45/foo/bar/baz')
+    delete("/gitlabhq/tags/feature@45/foo/bar/baz").should route_to('projects/tags#destroy', project_id: 'gitlabhq', id: 'feature@45/foo/bar/baz')
   end
 end
 
@@ -183,9 +195,11 @@ describe Projects::RefsController, "routing" do
     get("/gitlabhq/refs/stable/logs_tree").should             route_to('projects/refs#logs_tree', project_id: 'gitlabhq', id: 'stable')
     get("/gitlabhq/refs/feature%2345/logs_tree").should             route_to('projects/refs#logs_tree', project_id: 'gitlabhq', id: 'feature#45')
     get("/gitlabhq/refs/feature%2B45/logs_tree").should             route_to('projects/refs#logs_tree', project_id: 'gitlabhq', id: 'feature+45')
+    get("/gitlabhq/refs/feature@45/logs_tree").should               route_to('projects/refs#logs_tree', project_id: 'gitlabhq', id: 'feature@45')
     get("/gitlabhq/refs/stable/logs_tree/foo/bar/baz").should route_to('projects/refs#logs_tree', project_id: 'gitlabhq', id: 'stable', path: 'foo/bar/baz')
     get("/gitlabhq/refs/feature%2345/logs_tree/foo/bar/baz").should route_to('projects/refs#logs_tree', project_id: 'gitlabhq', id: 'feature#45', path: 'foo/bar/baz')
     get("/gitlabhq/refs/feature%2B45/logs_tree/foo/bar/baz").should route_to('projects/refs#logs_tree', project_id: 'gitlabhq', id: 'feature+45', path: 'foo/bar/baz')
+    get("/gitlabhq/refs/feature@45/logs_tree/foo/bar/baz").should route_to('projects/refs#logs_tree', project_id: 'gitlabhq', id: 'feature@45', path: 'foo/bar/baz')
     get("/gitlab/gitlabhq/refs/stable/logs_tree/files.scss").should route_to('projects/refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'stable', path: 'files.scss')
   end
 end
commit b8f1feccae440bb60b37b59b18e1e0afac54bc89
Author: GitLab <gitlab@git.sangoma.com>
Date:   Sun Sep 22 23:42:02 2013 +0000

    Added hack to ignore hudson pushed tags

diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index f6620b2..ac47af0 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -12,6 +12,10 @@ class DashboardController < ApplicationController
 
     @events = Event.in_projects(current_user.authorized_projects.pluck(:id))
     @events = @event_filter.apply_filter(@events)
+    ## Start Sangoma hack
+    # Hudson is user id 20
+    @events = @events.where("author_id != 20")
+    ## End Sangoma hack
     @events = @events.limit(20).offset(params[:offset] || 0)
 
     @last_push = current_user.recent_push
commit d93b0a6095c753cd7238ca5cfd183f8a4f112063
Author: GitLab <gitlab@git.sangoma.com>
Date:   Mon Sep 15 06:10:18 2014 +0000

    Manually fix issue with discussion rendering
    
    It seems all 6.x versions of gitlab are affected
    there is a year-long bug in gitlab bug tracker:
    
    https://github.com/gitlabhq/gitlabhq/issues/5234
    
    That lead me to the fix in gitlab 7
    https://github.com/gitlabhq/gitlabhq/commit/17bb700712f28c58564b0a2b1a2fcf375346d279
    
    Just checking if the diff is there (if diff) at the top seems to work

diff --git a/app/views/projects/notes/_discussion_diff.html.haml b/app/views/projects/notes/_discussion_diff.html.haml
index c3f41a1..a4b895b 100644
--- a/app/views/projects/notes/_discussion_diff.html.haml
+++ b/app/views/projects/notes/_discussion_diff.html.haml
@@ -1,24 +1,25 @@
 - diff = note.diff
-.header
-  - if diff.deleted_file
-    %span= diff.old_path
-  - else
-    %span= diff.new_path
-    - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
-      %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
-  %br/
-.content
-  %table
-    - each_diff_line_near(diff, note.diff_file_index, note.line_code) do |line, type, line_code, line_new, line_old|
-      %tr.line_holder{ id: line_code }
-        - if type == "match"
-          %td.old_line= "..."
-          %td.new_line= "..."
-          %td.line_content.matched= line
-        - else
-          %td.old_line= raw(type == "new" ? "&nbsp;" : line_old)
-          %td.new_line= raw(type == "old" ? "&nbsp;" : line_new)
-          %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} &nbsp;"
+- if diff
+  .header
+    - if diff.deleted_file
+      %span= diff.old_path
+    - else
+      %span= diff.new_path
+      - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
+        %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
+    %br/
+  .content
+    %table
+      - each_diff_line_near(diff, note.diff_file_index, note.line_code) do |line, type, line_code, line_new, line_old|
+        %tr.line_holder{ id: line_code }
+          - if type == "match"
+            %td.old_line= "..."
+            %td.new_line= "..."
+            %td.line_content.matched= line
+          - else
+            %td.old_line= raw(type == "new" ? "&nbsp;" : line_old)
+            %td.new_line= raw(type == "old" ? "&nbsp;" : line_new)
+            %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} &nbsp;"
 
-          - if line_code == note.line_code
-            = render "projects/notes/diff_notes_with_reply", notes: discussion_notes
+            - if line_code == note.line_code
+              = render "projects/notes/diff_notes_with_reply", notes: discussion_notes
