git-cl: Reword the message when surfacing traces to the user.
In crbug.com/955206 they pointed out that:
- It's not clear when to upload the issue
- It's not clear where to report it, or where to look for existing issues.
- It's not made clear that the traces can contain information the user might not want to share.
I've reworded the message to address those concerns
Bug: 955206
Change-Id: Ia1426007d389328eac52babeee1ec3782c2b104e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1606608
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 91b6856..a665aa9 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -1114,23 +1114,19 @@
calls += [
# Write a description with context for the current trace.
((['FileWrite', 'TRACES_DIR/20170316T200041.000000-README',
- 'Date: Thu Mar 16 20:00:41 2017\n\n'
- 'Change: https://%(short_hostname)s-review.googlesource.com/'
- 'q/%(change_id)s\n'
- 'Title: %(title)s\n\n'
- '%(description)s\n\n'
- 'Execution time: 1000\n'
- 'Exit code: 0\n\n'
- 'When filing a bug for this push, be sure to include the traces '
- 'found at:\n'
- ' TRACES_DIR/20170316T200041.000000-traces.zip\n'
- 'Consider including the git config and gitcookies, which we have '
- 'packed for \nyou at:\n'
- ' TRACES_DIR/20170316T200041.000000-git-info.zip\n' % {
+ 'Thu Mar 16 20:00:41 2017\n'
+ '%(short_hostname)s-review.googlesource.com\n'
+ '%(change_id)s\n'
+ '%(title)s\n'
+ '%(description)s\n'
+ '1000\n'
+ '0\n'
+ '%(trace_name)s' % {
'short_hostname': short_hostname,
'change_id': change_id,
'description': final_description,
'title': original_title,
+ 'trace_name': 'TRACES_DIR/20170316T200041.000000',
}],),
None,
),
@@ -1255,6 +1251,15 @@
lambda: datetime.datetime(2017, 3, 16, 20, 0, 41, 0))
self.mock(git_cl.tempfile, 'mkdtemp', lambda: 'TEMP_DIR')
self.mock(git_cl, 'TRACES_DIR', 'TRACES_DIR')
+ self.mock(git_cl, 'TRACES_README_FORMAT',
+ '%(now)s\n'
+ '%(gerrit_host)s\n'
+ '%(change_id)s\n'
+ '%(title)s\n'
+ '%(description)s\n'
+ '%(execution_time)s\n'
+ '%(exit_code)s\n'
+ '%(trace_name)s')
self.mock(git_cl.shutil, 'make_archive',
lambda *args: self._mocked_call(['make_archive'] + list(args)))
self.mock(os.path, 'isfile',