Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
94ffb7a9
Commit
94ffb7a9
authored
Oct 16, 2014
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1068494: Remove CVS/Bonsai/LXR-specific bits of Patch Viewer
r=gerv a=glob
parent
7ce5b04d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
26 additions
and
282 deletions
+26
-282
PatchReader.pm
Bugzilla/Attachment/PatchReader.pm
+17
-69
PatchViewer.pm
Bugzilla/Config/PatchViewer.pm
+0
-53
Localconfig.pm
Bugzilla/Install/Localconfig.pm
+0
-4
attachment.cgi
attachment.cgi
+2
-18
using.rst
docs/en/rst/using.rst
+4
-36
patchviewer.html.tmpl
template/en/default/admin/params/patchviewer.html.tmpl
+0
-51
diff-file.html.tmpl
template/en/default/attachment/diff-file.html.tmpl
+2
-16
diff-header.html.tmpl
template/en/default/attachment/diff-header.html.tmpl
+1
-29
filterexceptions.pl
template/en/default/filterexceptions.pl
+0
-2
strings.txt.pl
template/en/default/setup/strings.txt.pl
+0
-4
No files found.
Bugzilla/Attachment/PatchReader.pm
View file @
94ffb7a9
...
@@ -23,17 +23,18 @@ use Bugzilla::Util;
...
@@ -23,17 +23,18 @@ use Bugzilla::Util;
use
constant
PERLIO_IS_ENABLED
=>
$Config
{
useperlio
};
use
constant
PERLIO_IS_ENABLED
=>
$Config
{
useperlio
};
sub
process_diff
{
sub
process_diff
{
my
(
$attachment
,
$format
,
$context
)
=
@_
;
my
(
$attachment
,
$format
)
=
@_
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$lc
=
Bugzilla
->
localconfig
;
my
$lc
=
Bugzilla
->
localconfig
;
my
$vars
=
{};
my
$vars
=
{};
my
(
$reader
,
$last_reader
)
=
setup_patch_readers
(
undef
,
$context
);
require
PatchReader::
Raw
;
my
$reader
=
new
PatchReader::
Raw
;
if
(
$format
eq
'raw'
)
{
if
(
$format
eq
'raw'
)
{
require
PatchReader::DiffPrinter::
raw
;
require
PatchReader::DiffPrinter::
raw
;
$
last_
reader
->
sends_data_to
(
new
PatchReader::DiffPrinter::
raw
());
$reader
->
sends_data_to
(
new
PatchReader::DiffPrinter::
raw
());
# Actually print out the patch.
# Actually print out the patch.
print
$cgi
->
header
(
-
type
=>
'text/plain'
);
print
$cgi
->
header
(
-
type
=>
'text/plain'
);
disable_utf8
();
disable_utf8
();
...
@@ -71,7 +72,7 @@ sub process_diff {
...
@@ -71,7 +72,7 @@ sub process_diff {
$vars
->
{
'description'
}
=
$attachment
->
description
;
$vars
->
{
'description'
}
=
$attachment
->
description
;
$vars
->
{
'other_patches'
}
=
\
@other_patches
;
$vars
->
{
'other_patches'
}
=
\
@other_patches
;
setup_template_patch_reader
(
$
last_reader
,
$format
,
$context
,
$vars
);
setup_template_patch_reader
(
$
reader
,
$vars
);
# The patch is going to be displayed in a HTML page and if the utf8
# The patch is going to be displayed in a HTML page and if the utf8
# param is enabled, we have to encode attachment data as utf8.
# param is enabled, we have to encode attachment data as utf8.
if
(
Bugzilla
->
params
->
{
'utf8'
})
{
if
(
Bugzilla
->
params
->
{
'utf8'
})
{
...
@@ -83,11 +84,13 @@ sub process_diff {
...
@@ -83,11 +84,13 @@ sub process_diff {
}
}
sub
process_interdiff
{
sub
process_interdiff
{
my
(
$old_attachment
,
$new_attachment
,
$format
,
$context
)
=
@_
;
my
(
$old_attachment
,
$new_attachment
,
$format
)
=
@_
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$lc
=
Bugzilla
->
localconfig
;
my
$lc
=
Bugzilla
->
localconfig
;
my
$vars
=
{};
my
$vars
=
{};
require
PatchReader::
Raw
;
# Encode attachment data as utf8 if it's going to be displayed in a HTML
# Encode attachment data as utf8 if it's going to be displayed in a HTML
# page using the UTF-8 encoding.
# page using the UTF-8 encoding.
if
(
$format
ne
'raw'
&&
Bugzilla
->
params
->
{
'utf8'
})
{
if
(
$format
ne
'raw'
&&
Bugzilla
->
params
->
{
'utf8'
})
{
...
@@ -177,10 +180,11 @@ sub process_interdiff {
...
@@ -177,10 +180,11 @@ sub process_interdiff {
$warning
=
'interdiff3'
;
$warning
=
'interdiff3'
;
}
}
my
(
$reader
,
$last_reader
)
=
setup_patch_readers
(
""
,
$context
);
my
$reader
=
new
PatchReader::
Raw
;
if
(
$format
eq
'raw'
)
{
if
(
$format
eq
'raw'
)
{
require
PatchReader::DiffPrinter::
raw
;
require
PatchReader::DiffPrinter::
raw
;
$
last_
reader
->
sends_data_to
(
new
PatchReader::DiffPrinter::
raw
());
$reader
->
sends_data_to
(
new
PatchReader::DiffPrinter::
raw
());
# Actually print out the patch.
# Actually print out the patch.
print
$cgi
->
header
(
-
type
=>
'text/plain'
);
print
$cgi
->
header
(
-
type
=>
'text/plain'
);
disable_utf8
();
disable_utf8
();
...
@@ -193,7 +197,7 @@ sub process_interdiff {
...
@@ -193,7 +197,7 @@ sub process_interdiff {
$vars
->
{
'newid'
}
=
$new_attachment
->
id
;
$vars
->
{
'newid'
}
=
$new_attachment
->
id
;
$vars
->
{
'new_desc'
}
=
$new_attachment
->
description
;
$vars
->
{
'new_desc'
}
=
$new_attachment
->
description
;
setup_template_patch_reader
(
$
last_reader
,
$format
,
$context
,
$vars
);
setup_template_patch_reader
(
$
reader
,
$vars
);
}
}
$reader
->
iterate_string
(
'interdiff #'
.
$old_attachment
->
id
.
$reader
->
iterate_string
(
'interdiff #'
.
$old_attachment
->
id
.
' #'
.
$new_attachment
->
id
,
$stdout
);
' #'
.
$new_attachment
->
id
,
$stdout
);
...
@@ -208,7 +212,6 @@ sub get_unified_diff {
...
@@ -208,7 +212,6 @@ sub get_unified_diff {
# Bring in the modules we need.
# Bring in the modules we need.
require
PatchReader::
Raw
;
require
PatchReader::
Raw
;
require
PatchReader::
FixPatchRoot
;
require
PatchReader::DiffPrinter::
raw
;
require
PatchReader::DiffPrinter::
raw
;
require
PatchReader::
PatchInfoGrabber
;
require
PatchReader::
PatchInfoGrabber
;
require
File::
Temp
;
require
File::
Temp
;
...
@@ -220,14 +223,6 @@ sub get_unified_diff {
...
@@ -220,14 +223,6 @@ sub get_unified_diff {
my
$reader
=
new
PatchReader::
Raw
;
my
$reader
=
new
PatchReader::
Raw
;
my
$last_reader
=
$reader
;
my
$last_reader
=
$reader
;
# Fixes patch root (makes canonical if possible).
if
(
Bugzilla
->
params
->
{
'cvsroot'
})
{
my
$fix_patch_root
=
new
PatchReader::
FixPatchRoot
(
Bugzilla
->
params
->
{
'cvsroot'
});
$last_reader
->
sends_data_to
(
$fix_patch_root
);
$last_reader
=
$fix_patch_root
;
}
# Grabs the patch file info.
# Grabs the patch file info.
my
$patch_info_grabber
=
new
PatchReader::
PatchInfoGrabber
();
my
$patch_info_grabber
=
new
PatchReader::
PatchInfoGrabber
();
$last_reader
->
sends_data_to
(
$patch_info_grabber
);
$last_reader
->
sends_data_to
(
$patch_info_grabber
);
...
@@ -274,46 +269,8 @@ sub warn_if_interdiff_might_fail {
...
@@ -274,46 +269,8 @@ sub warn_if_interdiff_might_fail {
return
undef
;
return
undef
;
}
}
sub
setup_patch_readers
{
my
(
$diff_root
,
$context
)
=
@_
;
# Parameters:
# format=raw|html
# context=patch|file|0-n
# collapsed=0|1
# headers=0|1
# Define the patch readers.
# The reader that reads the patch in (whatever its format).
require
PatchReader::
Raw
;
my
$reader
=
new
PatchReader::
Raw
;
my
$last_reader
=
$reader
;
# Fix the patch root if we have a cvs root.
if
(
Bugzilla
->
params
->
{
'cvsroot'
})
{
require
PatchReader::
FixPatchRoot
;
$last_reader
->
sends_data_to
(
new
PatchReader::
FixPatchRoot
(
Bugzilla
->
params
->
{
'cvsroot'
}));
$last_reader
->
sends_data_to
->
diff_root
(
$diff_root
)
if
defined
(
$diff_root
);
$last_reader
=
$last_reader
->
sends_data_to
;
}
# Add in cvs context if we have the necessary info to do it
if
(
$context
ne
'patch'
&&
Bugzilla
->
localconfig
->
{
cvsbin
}
&&
Bugzilla
->
params
->
{
'cvsroot_get'
})
{
require
PatchReader::
AddCVSContext
;
# We need to set $cvsbin as global, because PatchReader::CVSClient
# needs it in order to find 'cvs'.
$
main::
cvsbin
=
Bugzilla
->
localconfig
->
{
cvsbin
};
$last_reader
->
sends_data_to
(
new
PatchReader::
AddCVSContext
(
$context
,
Bugzilla
->
params
->
{
'cvsroot_get'
}));
$last_reader
=
$last_reader
->
sends_data_to
;
}
return
(
$reader
,
$last_reader
);
}
sub
setup_template_patch_reader
{
sub
setup_template_patch_reader
{
my
(
$last_reader
,
$
format
,
$context
,
$
vars
)
=
@_
;
my
(
$last_reader
,
$vars
)
=
@_
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$template
=
Bugzilla
->
template
;
my
$template
=
Bugzilla
->
template
;
...
@@ -328,22 +285,15 @@ sub setup_template_patch_reader {
...
@@ -328,22 +285,15 @@ sub setup_template_patch_reader {
}
}
$vars
->
{
'collapsed'
}
=
$cgi
->
param
(
'collapsed'
);
$vars
->
{
'collapsed'
}
=
$cgi
->
param
(
'collapsed'
);
$vars
->
{
'context'
}
=
$context
;
$vars
->
{
'do_context'
}
=
Bugzilla
->
localconfig
->
{
cvsbin
}
&&
Bugzilla
->
params
->
{
'cvsroot_get'
}
&&
!
$vars
->
{
'newid'
};
# Print everything out.
# Print everything out.
print
$cgi
->
header
(
-
type
=>
'text/html'
);
print
$cgi
->
header
(
-
type
=>
'text/html'
);
$last_reader
->
sends_data_to
(
new
PatchReader::DiffPrinter::
template
(
$template
,
$last_reader
->
sends_data_to
(
new
PatchReader::DiffPrinter::
template
(
$template
,
"attachment/diff-header.$format.tmpl"
,
'attachment/diff-header.html.tmpl'
,
"attachment/diff-file.$format.tmpl"
,
'attachment/diff-file.html.tmpl'
,
"attachment/diff-footer.$format.tmpl"
,
'attachment/diff-footer.html.tmpl'
,
{
%
{
$vars
},
$vars
));
bonsai_url
=>
Bugzilla
->
params
->
{
'bonsai_url'
},
lxr_url
=>
Bugzilla
->
params
->
{
'lxr_url'
},
lxr_root
=>
Bugzilla
->
params
->
{
'lxr_root'
},
}));
}
}
1
;
1
;
...
@@ -364,6 +314,4 @@ __END__
...
@@ -364,6 +314,4 @@ __END__
=item process_interdiff
=item process_interdiff
=item setup_patch_readers
=back
=back
Bugzilla/Config/PatchViewer.pm
deleted
100644 → 0
View file @
7ce5b04d
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
package
Bugzilla::Config::
PatchViewer
;
use
5.10.1
;
use
strict
;
use
warnings
;
use
Bugzilla::Config::
Common
;
our
$sortkey
=
1300
;
sub
get_param_list
{
my
$class
=
shift
;
my
@param_list
=
(
{
name
=>
'cvsroot'
,
type
=>
't'
,
default
=>
''
,
},
{
name
=>
'cvsroot_get'
,
type
=>
't'
,
default
=>
''
,
},
{
name
=>
'bonsai_url'
,
type
=>
't'
,
default
=>
''
},
{
name
=>
'lxr_url'
,
type
=>
't'
,
default
=>
''
},
{
name
=>
'lxr_root'
,
type
=>
't'
,
default
=>
''
,
}
);
return
@param_list
;
}
1
;
Bugzilla/Install/Localconfig.pm
View file @
94ffb7a9
...
@@ -101,10 +101,6 @@ use constant LOCALCONFIG_VARS => (
...
@@ -101,10 +101,6 @@ use constant LOCALCONFIG_VARS => (
default
=>
0
,
default
=>
0
,
},
},
{
{
name
=>
'cvsbin'
,
default
=>
sub
{
bin_loc
(
'cvs'
)
},
},
{
name
=>
'interdiffbin'
,
name
=>
'interdiffbin'
,
default
=>
sub
{
bin_loc
(
'interdiff'
)
},
default
=>
sub
{
bin_loc
(
'interdiff'
)
},
},
},
...
...
attachment.cgi
View file @
94ffb7a9
...
@@ -190,20 +190,6 @@ sub validateFormat {
...
@@ -190,20 +190,6 @@ sub validateFormat {
return
$format
;
return
$format
;
}
}
# Validates context of a diff/interdiff. Will throw an error if the context
# is not number, "file" or "patch". Returns the validated, detainted context.
sub
validateContext
{
my
$context
=
$cgi
->
param
(
'context'
)
||
"patch"
;
if
(
$context
ne
"file"
&&
$context
ne
"patch"
)
{
my
$orig_context
=
$context
;
detaint_natural
(
$context
)
||
ThrowUserError
(
"invalid_context"
,
{
context
=>
$orig_context
});
}
return
$context
;
}
# Gets the attachment object(s) generated by validateID, while ensuring
# Gets the attachment object(s) generated by validateID, while ensuring
# attachbase and token authentication is used when required.
# attachbase and token authentication is used when required.
sub
get_attachment
{
sub
get_attachment
{
...
@@ -392,17 +378,15 @@ sub interdiff {
...
@@ -392,17 +378,15 @@ sub interdiff {
$old_attachment
=
validateID
(
'oldid'
);
$old_attachment
=
validateID
(
'oldid'
);
$new_attachment
=
validateID
(
'newid'
);
$new_attachment
=
validateID
(
'newid'
);
}
}
my
$context
=
validateContext
();
Bugzilla::Attachment::PatchReader::
process_interdiff
(
Bugzilla::Attachment::PatchReader::
process_interdiff
(
$old_attachment
,
$new_attachment
,
$format
,
$context
);
$old_attachment
,
$new_attachment
,
$format
);
}
}
sub
diff
{
sub
diff
{
# Retrieve and validate parameters
# Retrieve and validate parameters
my
$format
=
validateFormat
(
'html'
,
'raw'
);
my
$format
=
validateFormat
(
'html'
,
'raw'
);
my
$attachment
=
$format
eq
'raw'
?
get_attachment
()
:
validateID
();
my
$attachment
=
$format
eq
'raw'
?
get_attachment
()
:
validateID
();
my
$context
=
validateContext
();
# If it is not a patch, view normally.
# If it is not a patch, view normally.
if
(
!
$attachment
->
ispatch
)
{
if
(
!
$attachment
->
ispatch
)
{
...
@@ -410,7 +394,7 @@ sub diff {
...
@@ -410,7 +394,7 @@ sub diff {
return
;
return
;
}
}
Bugzilla::Attachment::PatchReader::
process_diff
(
$attachment
,
$format
,
$context
);
Bugzilla::Attachment::PatchReader::
process_diff
(
$attachment
,
$format
);
}
}
# Display all attachments for a given bug in a series of IFRAMEs within one
# Display all attachments for a given bug in a series of IFRAMEs within one
...
...
docs/en/rst/using.rst
View file @
94ffb7a9
...
@@ -623,11 +623,10 @@ file first.
...
@@ -623,11 +623,10 @@ file first.
Patch Viewer
Patch Viewer
============
============
Viewing and reviewing patches in Bugzilla is often difficult due to
Viewing and reviewing patches in Bugzilla is often difficult due to improper
lack of context, improper format and the inherent readability issues that
format and the inherent readability issues that raw patches present. Patch
raw patches present. Patch Viewer is an enhancement to Bugzilla designed
Viewer is an enhancement to Bugzilla designed to fix that by offering linking
to fix that by offering increased context, linking to sections, and
to sections.
integrating with Bonsai, LXR and CVS.
Patch viewer allows you to:
Patch viewer allows you to:
...
@@ -636,17 +635,12 @@ Patch viewer allows you to:
...
@@ -636,17 +635,12 @@ Patch viewer allows you to:
+ See the difference between two patches.
+ See the difference between two patches.
+ Get more context in a patch.
+ Collapse and expand sections of a patch for easy
+ Collapse and expand sections of a patch for easy
reading.
reading.
+ Link to a particular section of a patch for discussion or
+ Link to a particular section of a patch for discussion or
review
review
+ Go to Bonsai or LXR to see more context, blame, and
cross-references for the part of the patch you are looking at
+ Create a rawtext unified format diff out of any patch, no
+ Create a rawtext unified format diff out of any patch, no
matter what format it came from
matter what format it came from
...
@@ -671,18 +665,6 @@ dropdown at the top of the page ("Differences between \[dropdown] and
...
@@ -671,18 +665,6 @@ dropdown at the top of the page ("Differences between \[dropdown] and
this patch") and click the "Diff" button. This will show you what
this patch") and click the "Diff" button. This will show you what
is new or changed in the newer patch.
is new or changed in the newer patch.
.. _patchviewer_context:
Getting More Context in a Patch
-------------------------------
To get more context in a patch, you put a number in the textbox at
the top of Patch Viewer ("Patch / File / \[textbox]") and hit enter.
This will give you that many lines of context before and after each
change. Alternatively, you can click on the "File" link there and it
will show each change in the full context of the file. This feature only
works against files that were diffed using "cvs diff".
.. _patchviewer_collapse:
.. _patchviewer_collapse:
Collapsing and Expanding Sections of a Patch
Collapsing and Expanding Sections of a Patch
...
@@ -705,20 +687,6 @@ able to give someone a URL to show them which part you are talking
...
@@ -705,20 +687,6 @@ able to give someone a URL to show them which part you are talking
about) you simply click the "Link Here" link on the section header. The
about) you simply click the "Link Here" link on the section header. The
resulting URL can be copied and used in discussion.
resulting URL can be copied and used in discussion.
.. _patchviewer_bonsai_lxr:
Going to Bonsai and LXR
-----------------------
To go to Bonsai to get blame for the lines you are interested in,
you can click the "Lines XX-YY" link on the section header you are
interested in. This works even if the patch is against an old
version of the file, since Bonsai stores all versions of the file.
To go to LXR, you click on the filename on the file header
(unfortunately, since LXR only does the most recent version, line
numbers are likely to rot).
.. _patchviewer_unified_diff:
.. _patchviewer_unified_diff:
Creating a Unified Diff
Creating a Unified Diff
...
...
template/en/default/admin/params/patchviewer.html.tmpl
deleted
100644 → 0
View file @
7ce5b04d
[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
[%
title = "Patch Viewer"
desc = "Set up third-party applications to run with PatchViewer"
%]
[% param_descs = {
cvsroot => "The <a href=\"http://www.cvshome.org\">CVS</a> root that most " _
"users of your system will be using for 'cvs diff'. Used in " _
"Patch Viewer ('Diff' option on patches) to figure out where " _
"patches are rooted even if users did the 'cvs diff' from " _
"different places in the directory structure. (NOTE: if your " _
"CVS repository is remote and requires a password, you must " _
"either ensure the $terms.Bugzilla user has done a 'cvs login' or " _
"specify the password " _
"<a href=\"http://www.cvshome.org/docs/manual/cvs_2.html#SEC26\">as " _
"part of the CVS root</a>.) Leave this blank if you have no " _
"CVS repository.",
cvsroot_get => "The CVS root Bugzilla will be using to get patches from. " _
"Some installations may want to mirror their CVS repository on " _
"the Bugzilla server or even have it on that same server, and " _
"thus the repository can be the local file system (and much " _
"faster). Make this the same as cvsroot if you don't " _
"understand what this is (if cvsroot is blank, make this blank too).",
bonsai_url => "The URL to a <a href=\"http://www.mozilla.org/bonsai.html\">Bonsai</a> " _
"server containing information about your CVS repository. " _
"Patch Viewer will use this information to create links to " _
"bonsai's blame for each section of a patch (it will append " _
"'/cvsblame.cgi?...' to this url). Leave this blank if you " _
"don't understand what this is.",
lxr_url => "The URL to an <a href=\"http://sourceforge.net/projects/lxr\">LXR</a> server " _
"that indexes your CVS repository. Patch Viewer will use this " _
"information to create links to LXR for each file in a patch. " _
"Leave this blank if you don't understand what this is.",
lxr_root => "Some LXR installations do not index the CVS repository from the root -- " _
"<a href=\"http://lxr.mozilla.org/mozilla\">Mozilla's</a>, for " _
"example, starts indexing under <code>mozilla/</code>. This " _
"means URLs are relative to that extra path under the root. " _
"Enter this if you have a similar situation. Leave it blank " _
"if you don't know what this is." }
%]
template/en/default/attachment/diff-file.html.tmpl
View file @
94ffb7a9
...
@@ -19,11 +19,7 @@
...
@@ -19,11 +19,7 @@
onclick="return twisty_click(this)">[% collapsed ? '(+)' : '(-)' %]</a><input
onclick="return twisty_click(this)">[% collapsed ? '(+)' : '(-)' %]</a><input
type="checkbox" name="[% file.filename FILTER html %]"[% collapsed ? '' : ' checked' %]
type="checkbox" name="[% file.filename FILTER html %]"[% collapsed ? '' : ' checked' %]
class="bz_default_hidden">
class="bz_default_hidden">
[% IF lxr_prefix && !file.is_add %]
[% file.filename FILTER html %]
<a href="[% lxr_prefix %]">[% file.filename FILTER html %]</a>
[% ELSE %]
[% file.filename FILTER html %]
[% END %]
[% IF file.plus_lines %]
[% IF file.plus_lines %]
[% IF file.minus_lines %]
[% IF file.minus_lines %]
(-[% file.minus_lines %] / +[% file.plus_lines %] lines)
(-[% file.minus_lines %] / +[% file.plus_lines %] lines)
...
@@ -49,23 +45,13 @@ incremental_restore()
...
@@ -49,23 +45,13 @@ incremental_restore()
[% IF file.is_add %]
[% IF file.is_add %]
Added
Added
[% ELSIF file.is_remove %]
[% ELSIF file.is_remove %]
[% IF bonsai_prefix %]
Removed
<a href="[% bonsai_prefix %]">Removed</a>
[% ELSE %]
Removed
[% END %]
[% ELSE %]
[% ELSE %]
[% IF bonsai_prefix %]
<a href="[% bonsai_prefix %]#[% section.old_start %]">
[% END %]
[% IF section.old_lines > 1 %]
[% IF section.old_lines > 1 %]
Lines [% section.old_start %]-[% section.old_start + section.old_lines - 1 %]
Lines [% section.old_start %]-[% section.old_start + section.old_lines - 1 %]
[% ELSE %]
[% ELSE %]
Line [% section.old_start %]
Line [% section.old_start %]
[% END %]
[% END %]
[% IF bonsai_prefix %]
</a>
[% END %]
[%+ section.func_info FILTER html IF section.func_info %]
[%+ section.func_info FILTER html IF section.func_info %]
[% END %]
[% END %]
</span>
</span>
...
...
template/en/default/attachment/diff-header.html.tmpl
View file @
94ffb7a9
...
@@ -60,8 +60,7 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %]
...
@@ -60,8 +60,7 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %]
[% IF headers %]
[% IF headers %]
<a
href=
"[% PROCESS viewurl id=attachid %]"
>
View
</a>
<a
href=
"[% PROCESS viewurl id=attachid %]"
>
View
</a>
|
<a
href=
"[% PROCESS editurl id=attachid %]"
>
Details
</a>
|
<a
href=
"[% PROCESS editurl id=attachid %]"
>
Details
</a>
|
<a
href=
"[% PROCESS diffurl id=attachid %]&context=[%
|
<a
href=
"[% PROCESS diffurl id=attachid %]&collapsed=[% collapsed FILTER uri %]&headers=[%
context FILTER uri %]&collapsed=[% collapsed FILTER uri %]&headers=[%
headers FILTER uri %]&format=raw"
>
Raw
Unified
</a>
headers FILTER uri %]&format=raw"
>
Raw
Unified
</a>
| Return to [% "$terms.bug $bugid" FILTER bug_link(bugid) FILTER none %]
| Return to [% "$terms.bug $bugid" FILTER bug_link(bugid) FILTER none %]
[% END %]
[% END %]
...
@@ -102,33 +101,6 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %]
...
@@ -102,33 +101,6 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %]
onmouseout=
"window.status = lastStatus; return true"
onmouseout=
"window.status = lastStatus; return true"
onclick=
"return expand_all()"
>
Expand All
</a>
onclick=
"return expand_all()"
>
Expand All
</a>
[% IF do_context %]
[%# only happens for normal viewing, not interdiff %]
|
<strong>
Context:
</strong>
[% IF context == "patch" %]
(
<strong>
Patch
</strong>
/
[% ELSE %]
(
<a
href=
"[% PROCESS diffurl id=attachid %]&headers=[% headers FILTER uri %]"
>
Patch
</a>
/
[% END %]
[% IF context == "file" %]
<strong>
File
</strong>
/
[% ELSE %]
<a
href=
"[% PROCESS diffurl id=attachid %]&headers=[% headers FILTER uri %]&context=file"
>
File
</a>
/
[% END %]
[% IF context == "patch" || context == "file" %]
[% context = 3 %]
[% END %]
[%# textbox for context %]
<form
class=
"inline"
action=
"attachment.cgi"
>
<input
type=
"hidden"
name=
"action"
value=
"diff"
>
<input
type=
"hidden"
name=
"id"
value=
"[% attachid %]"
>
<input
type=
"hidden"
name=
"collapsed"
value=
"[% collapsed FILTER html %]"
>
<input
type=
"hidden"
name=
"headers"
value=
"[% headers FILTER html %]"
>
<input
type=
"text"
name=
"context"
value=
"[% context FILTER html %]"
size=
"3"
>
</form>
)
[% END %]
[% IF warning %]
[% IF warning %]
<h2
class=
"warning"
>
<h2
class=
"warning"
>
Warning:
Warning:
...
...
template/en/default/filterexceptions.pl
View file @
94ffb7a9
...
@@ -322,10 +322,8 @@
...
@@ -322,10 +322,8 @@
],
],
'attachment/diff-file.html.tmpl'
=>
[
'attachment/diff-file.html.tmpl'
=>
[
'lxr_prefix'
,
'file.minus_lines'
,
'file.minus_lines'
,
'file.plus_lines'
,
'file.plus_lines'
,
'bonsai_prefix'
,
'section.old_start'
,
'section.old_start'
,
'section_num'
,
'section_num'
,
'current_line_old'
,
'current_line_old'
,
...
...
template/en/default/setup/strings.txt.pl
View file @
94ffb7a9
...
@@ -155,10 +155,6 @@ they don't exist.
...
@@ -155,10 +155,6 @@ they don't exist.
If this is set to 0, checksetup.pl will not create .htaccess files.
If this is set to 0, checksetup.pl will not create .htaccess files.
END
END
localconfig_cvsbin => <<'
END
',
If you want to use the CVS integration of the Patch Viewer, please specify
the full path to the "cvs" executable here.
END
localconfig_db_check => <<'
END
',
localconfig_db_check => <<'
END
',
Should checksetup.pl try to verify that your database setup is correct?
Should checksetup.pl try to verify that your database setup is correct?
With some combinations of database servers/Perl modules/moonphase this
With some combinations of database servers/Perl modules/moonphase this
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment