From 94877bb353d2cc8f818d7378c170f867c0834baa Mon Sep 17 00:00:00 2001
From: huang
+ {:controller => 'repositories', :action => 'diff', :id => project,
+ :repository_id => @repository.identifier_param, :path => to_path_param(path)},
+ :method => :get
+ ) do %>
+
<%= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
-
-
-
-
-
-<% show_diff = revisions.size > 1 %>
-<% line_num = 1 %>
-<% revisions.each do |changeset| %>
-#
-
-
- <%= l(:label_date) %>
-<%= l(:field_author) %>
-<%= l(:field_comments) %>
-
-<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
-<%= content_tag(:td, :class => 'id', :style => id_style) do %>
- <%= link_to_revision(changeset, @repository) %>
-<% end %>
-
-<% line_num += 1 %>
-<% end %>
-
-<%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %>
-<%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %>
-<%= format_time(changeset.committed_on) %>
-<%= h truncate(changeset.author.to_s, :length => 30) %>
-<%= textilizable(truncate_at_line_break(changeset.comments)) %>
-
+
+
+
+
+ <% show_diff = revisions.size > 1 %>
+ <% line_num = 1 %>
+ <% revisions.each do |changeset| %>
+ #
+
+
+ <%= l(:label_date) %>
+ <%= l(:field_author) %>
+ <%= l(:field_comments) %>
+
+ <% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
+ <%= content_tag(:td, :class => 'id', :style => id_style) do %>
+ <%= link_to_revision(changeset, @repository) %>
+ <% end %>
+
+ <% line_num += 1 %>
+ <% end %>
+
+ <%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %>
+ <%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %>
+ <%= format_time(changeset.committed_on) %>
+ <%= h truncate(changeset.author.to_s, :length => 30) %>
+ <%= textilizable(truncate_at_line_break(changeset.comments)) %>
+
项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。
通过cmd命令提示符进入代码对应文件夹的根目录,假设当前用户的登录名为user,版本库名称为demo,需要操作的版本库分支为branch。 - 如果是首次提交代码,执行如下命令:
+ 如果是首次提交代码,执行如下命令:git init
@@ -53,7 +52,7 @@git push -u origin branch:branch
已经有本地库,还没有配置远程地址,打开命令行执行如下:
git push -u origin branch:branch
- +已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:
git push origin branch_name
- +从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:
李海提供
- <% if !@entries.nil? && authorize_for('repositories', 'browse') %> - <%= render :partial => 'dir_list' %> - <% end %> - - <%= render_properties(@properties) %> - <% if authorize_for('repositories', 'revisions') %> - <% if @changesets && !@changesets.empty? %> -+ <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) + sep = '' %> + <% if @repository.supports_all_revisions? && @path.blank? %> + <%= link_to l(:label_view_all_revisions), {:action => 'revisions', :id => @project, + :repository_id => @repository.identifier_param}, + :class => "orange_u_btn" %> + <% sep = '|' %> <% end %> -
- <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) - sep = '' %> - <% if @repository.supports_all_revisions? && @path.blank? %> - <%= link_to l(:label_view_all_revisions), {:action => 'revisions', :id => @project, - :repository_id => @repository.identifier_param}, - :class => "orange_u_btn" %> - <% sep = '|' %> - <% end %> - <% if @repository.supports_directory_revisions? && (has_branches || !@path.blank? || !@rev.blank?) %> - <%= sep %> - <%= link_to l(:label_view_revisions), - {:action => 'changes', - :path => to_path_param(@path), - :id => @project, - :repository_id => @repository.identifier_param, - :rev => @rev}, - :class => "orange_u_btn" %> - <% end %> -
- <% if @repository.supports_all_revisions? %> - <% content_for :header_tags do %> - <%= auto_discovery_link_tag( - :atom, params.merge( - {:format => 'atom', :action => 'revisions', - :id => @project, :page => nil, :key => User.current.rss_key})) %> - <% end %> + <% if @repository.supports_directory_revisions? && (has_branches || !@path.blank? || !@rev.blank?) %> + <%= sep %> + <%= link_to l(:label_view_revisions), + {:action => 'changes', + :path => to_path_param(@path), + :id => @project, + :repository_id => @repository.identifier_param, + :rev => @rev}, + :class => "orange_u_btn" %> <% end %> - <% end %> + + <% if @repository.supports_all_revisions? %> + <% content_for :header_tags do %> + <%= auto_discovery_link_tag( + :atom, params.merge( + {:format => 'atom', :action => 'revisions', + :id => @project, :page => nil, :key => User.current.rss_key})) %> + <% end %> + <% end %> +<% end %> - -查看如何提交代码: - <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %> - <%= link_to('English', en_usage_path, :class => "c_blue") %> + +
查看如何提交代码: + <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %> + <%= link_to('English', en_usage_path, :class => "c_blue") %> -
+ <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> From 482df88d70d3ff1f6fba15f17cc6d8b2fcce2829 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Fri, 12 Jun 2015 16:52:49 +0800 Subject: [PATCH 2/7] ... --- app/views/projects/_history.html.erb | 3 ++- app/views/users/_history.html.erb | 3 ++- app/views/words/_journal_reply_items.html.erb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/projects/_history.html.erb b/app/views/projects/_history.html.erb index d85906a2c..54dda7b28 100644 --- a/app/views/projects/_history.html.erb +++ b/app/views/projects/_history.html.erb @@ -9,7 +9,8 @@ <%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10', :target => "_blank" %> <%= format_time(journal.created_on) %> -<%= textilizable journal.notes%>
+ +<%=journal.notes.html_safe%>
<%= textilizable journal.notes%>
+ +<%=journal.notes.html_safe%>
- <%= reply.notes %> + <%= reply.notes.html_safe %>
<%= format_time reply.created_on %> From 5d88de3e6e87de3ca659a405ffddb5ad6593def6 Mon Sep 17 00:00:00 2001 From: huang