Commit ff24962c authored by Henrique Ferreiro's avatar Henrique Ferreiro Committed by Commit Bot

Save .git_cl_description_backup in the working dir

Avoid cluttering the home directory by saving the CL description in
the project's working directory.

Bug: None
Change-Id: I42c78d03cd239e7c0453867f21fe4be57086722e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1925627
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
parent 1bfe890b
......@@ -103,7 +103,7 @@ TRACES_README_FORMAT = (
COMMIT_BOT_EMAIL = 'commit-bot@chromium.org'
POSTUPSTREAM_HOOK = '.git/hooks/post-cl-land'
DESCRIPTION_BACKUP_FILE = '~/.git_cl_description_backup'
DESCRIPTION_BACKUP_FILE = '.git_cl_description_backup'
REFS_THAT_ALIAS_TO_OTHER_REFS = {
'refs/remotes/origin/lkgr': 'refs/remotes/origin/master',
'refs/remotes/origin/lkcr': 'refs/remotes/origin/master',
......@@ -138,7 +138,7 @@ def DieWithError(message, change_desc=None):
def SaveDescriptionBackup(change_desc):
backup_path = os.path.expanduser(DESCRIPTION_BACKUP_FILE)
backup_path = os.path.join(settings.GetRoot(), DESCRIPTION_BACKUP_FILE)
print('\nsaving CL description to %s\n' % backup_path)
backup_file = open(backup_path, 'w')
backup_file.write(change_desc.description)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment