diff options
Diffstat (limited to 'subcmds/diff.py')
-rw-r--r-- | subcmds/diff.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/subcmds/diff.py b/subcmds/diff.py index a1f4ba88..a606ee9a 100644 --- a/subcmds/diff.py +++ b/subcmds/diff.py | |||
@@ -35,18 +35,21 @@ to the Unix 'patch' command. | |||
35 | dest='absolute', action='store_true', | 35 | dest='absolute', action='store_true', |
36 | help='paths are relative to the repository root') | 36 | help='paths are relative to the repository root') |
37 | 37 | ||
38 | def _ExecuteOne(self, absolute, project): | 38 | def _ExecuteOne(self, absolute, local, project): |
39 | """Obtains the diff for a specific project. | 39 | """Obtains the diff for a specific project. |
40 | 40 | ||
41 | Args: | 41 | Args: |
42 | absolute: Paths are relative to the root. | 42 | absolute: Paths are relative to the root. |
43 | local: a boolean, if True, the path is relative to the local | ||
44 | (sub)manifest. If false, the path is relative to the | ||
45 | outermost manifest. | ||
43 | project: Project to get status of. | 46 | project: Project to get status of. |
44 | 47 | ||
45 | Returns: | 48 | Returns: |
46 | The status of the project. | 49 | The status of the project. |
47 | """ | 50 | """ |
48 | buf = io.StringIO() | 51 | buf = io.StringIO() |
49 | ret = project.PrintWorkTreeDiff(absolute, output_redir=buf) | 52 | ret = project.PrintWorkTreeDiff(absolute, output_redir=buf, local=local) |
50 | return (ret, buf.getvalue()) | 53 | return (ret, buf.getvalue()) |
51 | 54 | ||
52 | def Execute(self, opt, args): | 55 | def Execute(self, opt, args): |
@@ -63,7 +66,7 @@ to the Unix 'patch' command. | |||
63 | 66 | ||
64 | return self.ExecuteInParallel( | 67 | return self.ExecuteInParallel( |
65 | opt.jobs, | 68 | opt.jobs, |
66 | functools.partial(self._ExecuteOne, opt.absolute), | 69 | functools.partial(self._ExecuteOne, opt.absolute, opt.this_manifest_only), |
67 | all_projects, | 70 | all_projects, |
68 | callback=_ProcessResults, | 71 | callback=_ProcessResults, |
69 | ordered=True) | 72 | ordered=True) |