File Diff Resource¶
Name | file |
URI | /api/review-requests/{review_request_id}/diffs/{diff_revision}/files/{filediff_id}/ |
Description | Provides information on per-file diffs. Each of these contains a single, self-contained diff file that applies to exactly one file on a repository. |
HTTP Methods |
|
Parent Resource | File Diff List Resource |
Child Resources | |
Anonymous Access | Yes, if anonymous site access is enabled |
Fields¶
Field | Type | Description |
---|---|---|
dest_detail | String | Additional information of the destination file. This is parsed from the diff, but is usually not used for anything. |
dest_file | String | The new name of the patched file. This may be the same as the existing file. |
id | Integer | The numeric ID of the file diff. |
source_file | String | The original name of the modified file in the diff. |
source_revision | String | The revision of the file being modified. This is a valid revision in the repository. |
Links¶
Name | Method | Resource |
---|---|---|
diff_comments | GET | File Diff Comment List Resource |
self | GET | File Diff Resource |
HTTP GET¶
Returns the information or contents on a per-file diff.
The output varies by mimetype.
If application/json or application/xml is used, then the fields for the diff are returned, like with any other resource.
If text/x-patch is used, then the actual diff file itself is returned. This diff should be as it was when uploaded originally, for this file only, with potentially some extra SCM-specific headers stripped.
If application/vnd.reviewboard.org.diff.data+json or application/vnd.reviewboard.org.diff.data+xml is used, then the raw diff data (lists of inserts, deletes, replaces, moves, header information, etc.) is returned in either JSON or XML. This contains nearly all of the information used to render the diff in the diff viewer, and can be useful for building a diff viewer that interfaces with Review Board.
If ?syntax-highlighting=1 is passed, the rendered diff content for each line will contain HTML markup showing syntax highlighting. Otherwise, the content will be in plain text.
The format of the diff data is a bit complex. The data is stored under a top-level diff_data element and contains the following information:
Field | Type | Description |
---|---|---|
binary | Boolean | Whether or not the file is a binary file. Binary files won’t have any diff content to display. |
chunks | List of Dictionary | A list of chunks. These are used to render the diff. See below. |
changed_chunk_indexes | List of Integer | The list of chunks in the diff that have actual changes (inserts, deletes, or replaces). |
new_file | Boolean | Whether or not this is a newly added file, rather than an existing file in the repository. |
num_changes | Integer | The number of changes made in this file (chunks of adds, removes, or deletes). |
Each chunk contains the following fields:
Field | Type | Description |
---|---|---|
change | One of equal, delete, insert, replace | The type of change on this chunk. The type influences what sort of information is available for the chunk. |
collapsable | Boolean | Whether or not this chunk is collapseable. A collapseable chunk is one that is hidden by default in the diff viewer, but can be expanded. These will always be equal chunks, but not every equal chunk is necessarily collapseable (as they may be there to provide surrounding context for the changes). |
index | Integer | The index of the chunk. This is 0-based. |
lines | List of List | The list of rendered lines for a side-by-side diff. Each entry in the list is itself a list with 8 items:
|
meta | Dictionary | Additional information about the chunk. See below for more information. |
numlines | Integer | The number of lines in the chunk. |
A chunk’s meta information contains:
Field | Type | Description |
---|---|---|
headers | List of (String, String) | Class definitions, function definitions, or other useful headers that should be displayed before this chunk. This helps users to identify where in a file they are and what the current chunk may be a part of. |
whitespace_chunk | Boolean | Whether or not the entire chunk consists only of whitespace changes. |
whitespace_lines | List of (Integer, Integer) | A list of start, end row indexes in the lins that contain whitespace-only changes. These are 1-based. |
Other meta information may be available, but most is intended for internal use and shouldn’t be relied upon.
Examples¶
text/x-patch¶
Index: /trunk/reviewboard/settings_local.py.tmpl
===================================================================
--- /trunk/reviewboard/settings_local.py.tmpl (revision 1797)
+++ /trunk/reviewboard/settings_local.py.tmpl (working copy)
@@ -13,15 +13,15 @@
# django installations, the best option is probably to use memcached.
CACHE_BACKEND = 'locmem:///'
-# Local time zone for this installation. All choices can be found here:
-# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
-TIME_ZONE = 'US/Pacific'
-
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'en-us'
+# Local time zone for this installation. All choices can be found here:
+# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
+TIME_ZONE = 'US/Pacific'
+
# This should match the ID of the Site object in the database. This is used to
# figure out URLs to stick in e-mails and related pages.
SITE_ID = 1
@@ -34,7 +34,6 @@
# to load the internationalization machinery.
USE_I18N = True
-
# TLS for LDAP. If you're using LDAP authentication and your LDAP server
# doesn't support ldaps://, you can enable start-TLS with this.
LDAP_TLS = False
application/vnd.reviewboard.org.diff.data+json¶
{
"diff_data": {
"binary": false,
"changed_chunk_indexes": [
2,
4,
6
],
"chunks": [
{
"change": "equal",
"collapsable": true,
"index": 0,
"lines": [
[
1,
1,
"# Database backend. Any supported django database engine should work.",
[],
1,
"# Database backend. Any supported django database engine should work.",
[],
false
],
[
2,
2,
"DATABASE_ENGINE = 'mysql' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.",
[],
2,
"DATABASE_ENGINE = 'mysql' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.",
[],
false
],
[
3,
3,
"DATABASE_NAME = 'reviewboard' # Or path to database file if using sqlite3.",
[],
3,
"DATABASE_NAME = 'reviewboard' # Or path to database file if using sqlite3.",
[],
false
],
[
4,
4,
"DATABASE_USER = '********' # Not used with sqlite3.",
[],
4,
"DATABASE_USER = '********' # Not used with sqlite3.",
[],
false
],
[
5,
5,
"DATABASE_PASSWORD = '********' # Not used with sqlite3.",
[],
5,
"DATABASE_PASSWORD = '********' # Not used with sqlite3.",
[],
false
],
[
6,
6,
"DATABASE_HOST = '' # Set to empty string for localhost.",
[],
6,
"DATABASE_HOST = '' # Set to empty string for localhost.",
[],
false
],
[
7,
7,
"DATABASE_PORT = '' # Set to empty string for default.",
[],
7,
"DATABASE_PORT = '' # Set to empty string for default.",
[],
false
],
[
8,
8,
"",
[],
8,
"",
[],
false
],
[
9,
9,
"# Make this unique, and don't share it with anybody.",
[],
9,
"# Make this unique, and don't share it with anybody.",
[],
false
],
[
10,
10,
"SECRET_KEY = '***********************************************'",
[],
10,
"SECRET_KEY = '***********************************************'",
[],
false
]
],
"meta": {
"left_headers": [],
"right_headers": []
},
"numlines": 10
},
{
"change": "equal",
"collapsable": false,
"index": 1,
"lines": [
[
11,
11,
"",
[],
11,
"",
[],
false
],
[
12,
12,
"# Cache backend. Unset this to turn off caching completely. As with most",
[],
12,
"# Cache backend. Unset this to turn off caching completely. As with most",
[],
false
],
[
13,
13,
"# django installations, the best option is probably to use memcached.",
[],
13,
"# django installations, the best option is probably to use memcached.",
[],
false
],
[
14,
14,
"CACHE_BACKEND = 'locmem:///'",
[],
14,
"CACHE_BACKEND = 'locmem:///'",
[],
false
],
[
15,
15,
"",
[],
15,
"",
[],
false
]
],
"meta": {
"left_headers": [],
"right_headers": []
},
"numlines": 5
},
{
"change": "delete",
"collapsable": false,
"index": 2,
"lines": [
[
16,
16,
"# Local time zone for this installation. All choices can be found here:",
[],
"",
"",
[],
false,
21
],
[
17,
17,
"# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE",
[],
"",
"",
[],
false,
22
],
[
18,
18,
"TIME_ZONE = 'US/Pacific'",
[],
"",
"",
[],
false,
23
],
[
19,
19,
"",
[],
"",
"",
[],
false
]
],
"meta": {
"left_headers": [],
"moved": {
"16": 21,
"17": 22,
"18": 23
},
"right_headers": [],
"whitespace_chunk": false,
"whitespace_lines": []
},
"numlines": 4
},
{
"change": "equal",
"collapsable": false,
"index": 3,
"lines": [
[
20,
20,
"# Language code for this installation. All choices can be found here:",
[],
16,
"# Language code for this installation. All choices can be found here:",
[],
false
],
[
21,
21,
"# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes",
[],
17,
"# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes",
[],
false
],
[
22,
22,
"# http://blogs.law.harvard.edu/tech/stories/storyReader$15",
[],
18,
"# http://blogs.law.harvard.edu/tech/stories/storyReader$15",
[],
false
],
[
23,
23,
"LANGUAGE_CODE = 'en-us'",
[],
19,
"LANGUAGE_CODE = 'en-us'",
[],
false
],
[
24,
24,
"",
[],
20,
"",
[],
false
]
],
"meta": {
"left_headers": [],
"right_headers": [],
"whitespace_chunk": false,
"whitespace_lines": []
},
"numlines": 5
},
{
"change": "insert",
"collapsable": false,
"index": 4,
"lines": [
[
25,
"",
"",
[],
21,
"# Local time zone for this installation. All choices can be found here:",
[],
false,
16
],
[
26,
"",
"",
[],
22,
"# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE",
[],
false,
17
],
[
27,
"",
"",
[],
23,
"TIME_ZONE = 'US/Pacific'",
[],
false,
18
],
[
28,
"",
"",
[],
24,
"",
[],
false
]
],
"meta": {
"left_headers": [],
"moved": {
"21": 16,
"22": 17,
"23": 18
},
"right_headers": [],
"whitespace_chunk": false,
"whitespace_lines": []
},
"numlines": 4
},
{
"change": "equal",
"collapsable": false,
"index": 5,
"lines": [
[
29,
25,
"# This should match the ID of the Site object in the database. This is used to",
[],
25,
"# This should match the ID of the Site object in the database. This is used to",
[],
false
],
[
30,
26,
"# figure out URLs to stick in e-mails and related pages.",
[],
26,
"# figure out URLs to stick in e-mails and related pages.",
[],
false
],
[
31,
27,
"SITE_ID = 1",
[],
27,
"SITE_ID = 1",
[],
false
],
[
32,
28,
"",
[],
28,
"",
[],
false
],
[
33,
29,
"# Set this to the place of your reviewboard if it does not reside",
[],
29,
"# Set this to the place of your reviewboard if it does not reside",
[],
false
],
[
34,
30,
"# at the root of your server. - Add the trailing slash.",
[],
30,
"# at the root of your server. - Add the trailing slash.",
[],
false
],
[
35,
31,
"# SITE_ROOT = "/reviewboard/"",
[],
31,
"# SITE_ROOT = "/reviewboard/"",
[],
false
],
[
36,
32,
"",
[],
32,
"",
[],
false
],
[
37,
33,
"# If you set this to False, Django will make some optimizations so as not",
[],
33,
"# If you set this to False, Django will make some optimizations so as not",
[],
false
],
[
38,
34,
"# to load the internationalization machinery.",
[],
34,
"# to load the internationalization machinery.",
[],
false
],
[
39,
35,
"USE_I18N = True",
[],
35,
"USE_I18N = True",
[],
false
],
[
40,
36,
"",
[],
36,
"",
[],
false
]
],
"meta": {
"left_headers": [],
"right_headers": [],
"whitespace_chunk": false,
"whitespace_lines": []
},
"numlines": 12
},
{
"change": "delete",
"collapsable": false,
"index": 6,
"lines": [
[
41,
37,
"",
[],
"",
"",
[],
false
]
],
"meta": {
"left_headers": [],
"right_headers": [],
"whitespace_chunk": false,
"whitespace_lines": []
},
"numlines": 1
},
{
"change": "equal",
"collapsable": false,
"index": 7,
"lines": [
[
42,
38,
"# TLS for LDAP. If you're using LDAP authentication and your LDAP server",
[],
37,
"# TLS for LDAP. If you're using LDAP authentication and your LDAP server",
[],
false
],
[
43,
39,
"# doesn't support ldaps://, you can enable start-TLS with this.",
[],
38,
"# doesn't support ldaps://, you can enable start-TLS with this.",
[],
false
],
[
44,
40,
"LDAP_TLS = False",
[],
39,
"LDAP_TLS = False",
[],
false
]
],
"meta": {
"left_headers": [],
"right_headers": [],
"whitespace_chunk": false,
"whitespace_lines": []
},
"numlines": 3
}
],
"new_file": false,
"num_changes": 3
},
"stat": "ok"
}
application/vnd.reviewboard.org.diff.data+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<diff_data>
<chunks>
<array>
<item>
<index>0</index>
<lines>
<array>
<item>
<array>
<item>1</item>
<item>1</item>
<item># Database backend. Any supported django database engine should work.</item>
<item>
<array>
</array>
</item>
<item>1</item>
<item># Database backend. Any supported django database engine should work.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>2</item>
<item>2</item>
<item>DATABASE_ENGINE = &#39;mysql&#39; # &#39;postgresql&#39;, &#39;mysql&#39;, &#39;sqlite3&#39; or &#39;ado_mssql&#39;.</item>
<item>
<array>
</array>
</item>
<item>2</item>
<item>DATABASE_ENGINE = &#39;mysql&#39; # &#39;postgresql&#39;, &#39;mysql&#39;, &#39;sqlite3&#39; or &#39;ado_mssql&#39;.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>3</item>
<item>3</item>
<item>DATABASE_NAME = &#39;reviewboard&#39; # Or path to database file if using sqlite3.</item>
<item>
<array>
</array>
</item>
<item>3</item>
<item>DATABASE_NAME = &#39;reviewboard&#39; # Or path to database file if using sqlite3.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>4</item>
<item>4</item>
<item>DATABASE_USER = &#39;********&#39; # Not used with sqlite3.</item>
<item>
<array>
</array>
</item>
<item>4</item>
<item>DATABASE_USER = &#39;********&#39; # Not used with sqlite3.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>5</item>
<item>5</item>
<item>DATABASE_PASSWORD = &#39;********&#39; # Not used with sqlite3.</item>
<item>
<array>
</array>
</item>
<item>5</item>
<item>DATABASE_PASSWORD = &#39;********&#39; # Not used with sqlite3.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>6</item>
<item>6</item>
<item>DATABASE_HOST = &#39;&#39; # Set to empty string for localhost.</item>
<item>
<array>
</array>
</item>
<item>6</item>
<item>DATABASE_HOST = &#39;&#39; # Set to empty string for localhost.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>7</item>
<item>7</item>
<item>DATABASE_PORT = &#39;&#39; # Set to empty string for default.</item>
<item>
<array>
</array>
</item>
<item>7</item>
<item>DATABASE_PORT = &#39;&#39; # Set to empty string for default.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>8</item>
<item>8</item>
<item></item>
<item>
<array>
</array>
</item>
<item>8</item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>9</item>
<item>9</item>
<item># Make this unique, and don&#39;t share it with anybody.</item>
<item>
<array>
</array>
</item>
<item>9</item>
<item># Make this unique, and don&#39;t share it with anybody.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>10</item>
<item>10</item>
<item>SECRET_KEY = &#39;***********************************************&#39;</item>
<item>
<array>
</array>
</item>
<item>10</item>
<item>SECRET_KEY = &#39;***********************************************&#39;</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
</array>
</lines>
<numlines>10</numlines>
<meta>
<right_headers>
<array>
</array>
</right_headers>
<left_headers>
<array>
</array>
</left_headers>
</meta>
<collapsable>1</collapsable>
<change>equal</change>
</item>
<item>
<index>1</index>
<lines>
<array>
<item>
<array>
<item>11</item>
<item>11</item>
<item></item>
<item>
<array>
</array>
</item>
<item>11</item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>12</item>
<item>12</item>
<item># Cache backend. Unset this to turn off caching completely. As with most</item>
<item>
<array>
</array>
</item>
<item>12</item>
<item># Cache backend. Unset this to turn off caching completely. As with most</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>13</item>
<item>13</item>
<item># django installations, the best option is probably to use memcached.</item>
<item>
<array>
</array>
</item>
<item>13</item>
<item># django installations, the best option is probably to use memcached.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>14</item>
<item>14</item>
<item>CACHE_BACKEND = &#39;locmem:///&#39;</item>
<item>
<array>
</array>
</item>
<item>14</item>
<item>CACHE_BACKEND = &#39;locmem:///&#39;</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>15</item>
<item>15</item>
<item></item>
<item>
<array>
</array>
</item>
<item>15</item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
</array>
</lines>
<numlines>5</numlines>
<meta>
<right_headers>
<array>
</array>
</right_headers>
<left_headers>
<array>
</array>
</left_headers>
</meta>
<collapsable>0</collapsable>
<change>equal</change>
</item>
<item>
<index>2</index>
<lines>
<array>
<item>
<array>
<item>16</item>
<item>16</item>
<item># Local time zone for this installation. All choices can be found here:</item>
<item>
<array>
</array>
</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
<item>21</item>
</array>
</item>
<item>
<array>
<item>17</item>
<item>17</item>
<item># http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE</item>
<item>
<array>
</array>
</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
<item>22</item>
</array>
</item>
<item>
<array>
<item>18</item>
<item>18</item>
<item>TIME_ZONE = &#39;US/Pacific&#39;</item>
<item>
<array>
</array>
</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
<item>23</item>
</array>
</item>
<item>
<array>
<item>19</item>
<item>19</item>
<item></item>
<item>
<array>
</array>
</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
</array>
</lines>
<numlines>4</numlines>
<meta>
<right_headers>
<array>
</array>
</right_headers>
<whitespace_chunk>0</whitespace_chunk>
<moved>
<int value="16">21</int>
<int value="17">22</int>
<int value="18">23</int>
</moved>
<left_headers>
<array>
</array>
</left_headers>
<whitespace_lines>
<array>
</array>
</whitespace_lines>
</meta>
<collapsable>0</collapsable>
<change>delete</change>
</item>
<item>
<index>3</index>
<lines>
<array>
<item>
<array>
<item>20</item>
<item>20</item>
<item># Language code for this installation. All choices can be found here:</item>
<item>
<array>
</array>
</item>
<item>16</item>
<item># Language code for this installation. All choices can be found here:</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>21</item>
<item>21</item>
<item># http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes</item>
<item>
<array>
</array>
</item>
<item>17</item>
<item># http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>22</item>
<item>22</item>
<item># http://blogs.law.harvard.edu/tech/stories/storyReader$15</item>
<item>
<array>
</array>
</item>
<item>18</item>
<item># http://blogs.law.harvard.edu/tech/stories/storyReader$15</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>23</item>
<item>23</item>
<item>LANGUAGE_CODE = &#39;en-us&#39;</item>
<item>
<array>
</array>
</item>
<item>19</item>
<item>LANGUAGE_CODE = &#39;en-us&#39;</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>24</item>
<item>24</item>
<item></item>
<item>
<array>
</array>
</item>
<item>20</item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
</array>
</lines>
<numlines>5</numlines>
<meta>
<right_headers>
<array>
</array>
</right_headers>
<whitespace_chunk>0</whitespace_chunk>
<left_headers>
<array>
</array>
</left_headers>
<whitespace_lines>
<array>
</array>
</whitespace_lines>
</meta>
<collapsable>0</collapsable>
<change>equal</change>
</item>
<item>
<index>4</index>
<lines>
<array>
<item>
<array>
<item>25</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>21</item>
<item># Local time zone for this installation. All choices can be found here:</item>
<item>
<array>
</array>
</item>
<item>0</item>
<item>16</item>
</array>
</item>
<item>
<array>
<item>26</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>22</item>
<item># http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE</item>
<item>
<array>
</array>
</item>
<item>0</item>
<item>17</item>
</array>
</item>
<item>
<array>
<item>27</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>23</item>
<item>TIME_ZONE = &#39;US/Pacific&#39;</item>
<item>
<array>
</array>
</item>
<item>0</item>
<item>18</item>
</array>
</item>
<item>
<array>
<item>28</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>24</item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
</array>
</lines>
<numlines>4</numlines>
<meta>
<right_headers>
<array>
</array>
</right_headers>
<whitespace_chunk>0</whitespace_chunk>
<moved>
<int value="21">16</int>
<int value="22">17</int>
<int value="23">18</int>
</moved>
<left_headers>
<array>
</array>
</left_headers>
<whitespace_lines>
<array>
</array>
</whitespace_lines>
</meta>
<collapsable>0</collapsable>
<change>insert</change>
</item>
<item>
<index>5</index>
<lines>
<array>
<item>
<array>
<item>29</item>
<item>25</item>
<item># This should match the ID of the Site object in the database. This is used to</item>
<item>
<array>
</array>
</item>
<item>25</item>
<item># This should match the ID of the Site object in the database. This is used to</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>30</item>
<item>26</item>
<item># figure out URLs to stick in e-mails and related pages.</item>
<item>
<array>
</array>
</item>
<item>26</item>
<item># figure out URLs to stick in e-mails and related pages.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>31</item>
<item>27</item>
<item>SITE_ID = 1</item>
<item>
<array>
</array>
</item>
<item>27</item>
<item>SITE_ID = 1</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>32</item>
<item>28</item>
<item></item>
<item>
<array>
</array>
</item>
<item>28</item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>33</item>
<item>29</item>
<item># Set this to the place of your reviewboard if it does not reside</item>
<item>
<array>
</array>
</item>
<item>29</item>
<item># Set this to the place of your reviewboard if it does not reside</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>34</item>
<item>30</item>
<item># at the root of your server. - Add the trailing slash.</item>
<item>
<array>
</array>
</item>
<item>30</item>
<item># at the root of your server. - Add the trailing slash.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>35</item>
<item>31</item>
<item># SITE_ROOT = &quot;/reviewboard/&quot;</item>
<item>
<array>
</array>
</item>
<item>31</item>
<item># SITE_ROOT = &quot;/reviewboard/&quot;</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>36</item>
<item>32</item>
<item></item>
<item>
<array>
</array>
</item>
<item>32</item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>37</item>
<item>33</item>
<item># If you set this to False, Django will make some optimizations so as not</item>
<item>
<array>
</array>
</item>
<item>33</item>
<item># If you set this to False, Django will make some optimizations so as not</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>38</item>
<item>34</item>
<item># to load the internationalization machinery.</item>
<item>
<array>
</array>
</item>
<item>34</item>
<item># to load the internationalization machinery.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>39</item>
<item>35</item>
<item>USE_I18N = True</item>
<item>
<array>
</array>
</item>
<item>35</item>
<item>USE_I18N = True</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>40</item>
<item>36</item>
<item></item>
<item>
<array>
</array>
</item>
<item>36</item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
</array>
</lines>
<numlines>12</numlines>
<meta>
<right_headers>
<array>
</array>
</right_headers>
<whitespace_chunk>0</whitespace_chunk>
<left_headers>
<array>
</array>
</left_headers>
<whitespace_lines>
<array>
</array>
</whitespace_lines>
</meta>
<collapsable>0</collapsable>
<change>equal</change>
</item>
<item>
<index>6</index>
<lines>
<array>
<item>
<array>
<item>41</item>
<item>37</item>
<item></item>
<item>
<array>
</array>
</item>
<item></item>
<item></item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
</array>
</lines>
<numlines>1</numlines>
<meta>
<right_headers>
<array>
</array>
</right_headers>
<whitespace_chunk>0</whitespace_chunk>
<left_headers>
<array>
</array>
</left_headers>
<whitespace_lines>
<array>
</array>
</whitespace_lines>
</meta>
<collapsable>0</collapsable>
<change>delete</change>
</item>
<item>
<index>7</index>
<lines>
<array>
<item>
<array>
<item>42</item>
<item>38</item>
<item># TLS for LDAP. If you&#39;re using LDAP authentication and your LDAP server</item>
<item>
<array>
</array>
</item>
<item>37</item>
<item># TLS for LDAP. If you&#39;re using LDAP authentication and your LDAP server</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>43</item>
<item>39</item>
<item># doesn&#39;t support ldaps://, you can enable start-TLS with this.</item>
<item>
<array>
</array>
</item>
<item>38</item>
<item># doesn&#39;t support ldaps://, you can enable start-TLS with this.</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
<item>
<array>
<item>44</item>
<item>40</item>
<item>LDAP_TLS = False</item>
<item>
<array>
</array>
</item>
<item>39</item>
<item>LDAP_TLS = False</item>
<item>
<array>
</array>
</item>
<item>0</item>
</array>
</item>
</array>
</lines>
<numlines>3</numlines>
<meta>
<right_headers>
<array>
</array>
</right_headers>
<whitespace_chunk>0</whitespace_chunk>
<left_headers>
<array>
</array>
</left_headers>
<whitespace_lines>
<array>
</array>
</whitespace_lines>
</meta>
<collapsable>0</collapsable>
<change>equal</change>
</item>
</array>
</chunks>
<binary>0</binary>
<changed_chunk_indexes>
<array>
<item>2</item>
<item>4</item>
<item>6</item>
</array>
</changed_chunk_indexes>
<num_changes>3</num_changes>
<new_file>0</new_file>
</diff_data>
<stat>ok</stat>
</rsp>
application/vnd.reviewboard.org.file+json¶
{
"file": {
"dest_detail": "(working copy)",
"dest_file": "/trunk/reviewboard/settings_local.py.tmpl",
"id": 31,
"links": {
"diff_comments": {
"href": "http://reviews.example.com/api/review-requests/8/diffs/1/files/31/diff-comments/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/8/diffs/1/files/31/",
"method": "GET"
}
},
"source_file": "/trunk/reviewboard/settings_local.py.tmpl",
"source_revision": "1797"
},
"stat": "ok"
}
application/vnd.reviewboard.org.file+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<stat>ok</stat>
<file>
<links>
<self>
<href>http://reviews.example.com/api/review-requests/8/diffs/1/files/31/</href>
<method>GET</method>
</self>
<diff_comments>
<href>http://reviews.example.com/api/review-requests/8/diffs/1/files/31/diff-comments/</href>
<method>GET</method>
</diff_comments>
</links>
<dest_detail>(working copy)</dest_detail>
<source_revision>1797</source_revision>
<source_file>/trunk/reviewboard/settings_local.py.tmpl</source_file>
<dest_file>/trunk/reviewboard/settings_local.py.tmpl</dest_file>
<id>31</id>
</file>
</rsp>