... | ... |
@@ -1251,14 +1251,13 @@ sub parse_commit_text { |
1251 | 1251 |
} |
1252 | 1252 |
|
1253 | 1253 |
sub get_commits { |
1254 |
- my ($self, $user, $project, $rev, $maxcount, $skip, $file, @args) = @_; |
|
1254 |
+ my ($self, $rep_info, $rev, $maxcount, $skip, $file, @args) = @_; |
|
1255 | 1255 |
|
1256 | 1256 |
# Get Commits |
1257 | 1257 |
$maxcount ||= 1; |
1258 | 1258 |
$skip ||= 0; |
1259 |
- my @cmd = $self->cmd_rep( |
|
1260 |
- $user, |
|
1261 |
- $project, |
|
1259 |
+ my @cmd = $self->cmd( |
|
1260 |
+ $rep_info, |
|
1262 | 1261 |
'rev-list', |
1263 | 1262 |
'--header', |
1264 | 1263 |
@args, |
... | ... |
@@ -1387,15 +1386,14 @@ sub parse_ls_tree_line { |
1387 | 1386 |
} |
1388 | 1387 |
|
1389 | 1388 |
sub import_branch { |
1390 |
- my ($self, $user, $project, $branch, $remote_user, $remote_project, $remote_branch, $opt) = @_; |
|
1389 |
+ my ($self, $rep_info, $branch, $remote_rep_info, $remote_branch, $opt) = @_; |
|
1391 | 1390 |
|
1392 | 1391 |
my $force = $opt->{force}; |
1393 | 1392 |
|
1394 | 1393 |
# Git pull |
1395 |
- my $remote_rep = $self->app->rep_path($remote_user, $remote_project); |
|
1396 |
- my @cmd = $self->cmd_rep( |
|
1397 |
- $user, |
|
1398 |
- $project, |
|
1394 |
+ my $remote_rep = $remote_rep_info->{git_dir}; |
|
1395 |
+ my @cmd = $self->cmd( |
|
1396 |
+ $rep_info, |
|
1399 | 1397 |
'fetch', |
1400 | 1398 |
$remote_rep, |
1401 | 1399 |
($force ? '+' : '') . "refs/heads/$remote_branch:refs/heads/$branch" |
... | ... |
@@ -1917,13 +1917,13 @@ button.close { |
1917 | 1917 |
|
1918 | 1918 |
.project-header-left { |
1919 | 1919 |
float:left; |
1920 |
- width:50%; |
|
1920 |
+ width:80%; |
|
1921 | 1921 |
overflow:hidden; |
1922 | 1922 |
} |
1923 | 1923 |
|
1924 | 1924 |
.project-header-right { |
1925 | 1925 |
float:left; |
1926 |
- width:50%; |
|
1926 |
+ width:20%; |
|
1927 | 1927 |
overflow:hidden; |
1928 | 1928 |
} |
1929 | 1929 |
|
... | ... |
@@ -32,8 +32,7 @@ |
32 | 32 |
# Commits |
33 | 33 |
my $page_count = 30; |
34 | 34 |
my $commits = $git->get_commits( |
35 |
- $user, |
|
36 |
- $project, |
|
35 |
+ app->rep_info($user, $project), |
|
37 | 36 |
$commit->{id}, |
38 | 37 |
$page_count, |
39 | 38 |
$page_count * $page, |
... | ... |
@@ -81,11 +81,9 @@ |
81 | 81 |
else { |
82 | 82 |
eval { |
83 | 83 |
$git->import_branch( |
84 |
- $user, |
|
85 |
- $project, |
|
84 |
+ app->rep_info($user, $project), |
|
86 | 85 |
$branch, |
87 |
- $remote_user, |
|
88 |
- $remote_project, |
|
86 |
+ app->rep_info($remote_user, $remote_project), |
|
89 | 87 |
$remote_branch, |
90 | 88 |
{force => $force} |
91 | 89 |
); |
... | ... |
@@ -76,12 +76,14 @@ |
76 | 76 |
% } |
77 | 77 |
|
78 | 78 |
% if (defined $original_project) { |
79 |
- ( |
|
80 |
- forked from |
|
81 |
- <a href="<%= url_for("/$original_user/$original_project") %>"> |
|
82 |
- <%= "$original_user/$original_project" %> |
|
83 |
- </a> |
|
84 |
- ) |
|
79 |
+ <small> |
|
80 |
+ ( |
|
81 |
+ forked from |
|
82 |
+ <a href="<%= url_for("/$original_user/$original_project") %>"> |
|
83 |
+ <%= "$original_user/$original_project" %> |
|
84 |
+ </a> |
|
85 |
+ ) |
|
86 |
+ </small> |
|
85 | 87 |
% } |
86 | 88 |
</ul> |
87 | 89 |
</div> |
... | ... |
@@ -5,10 +5,9 @@ |
5 | 5 |
my $rev2_abs = param('rev2_abs'); |
6 | 6 |
my ($remote_user, $remote_project, $remote_branch) = split /\//, $rev2_abs, 3; |
7 | 7 |
|
8 |
- my $commits = app->git->get_commits($user, $project, $branch, 100); |
|
8 |
+ my $commits = app->git->get_commits(app->rep_info($user, $project), $branch, 100); |
|
9 | 9 |
my $remote_commits = app->git->get_commits( |
10 |
- $remote_user, |
|
11 |
- $remote_project, |
|
10 |
+ app->rep_info($remote_user, $remote_project), |
|
12 | 11 |
$remote_branch, |
13 | 12 |
100 |
14 | 13 |
); |