Clarify error messages in roll_dep.py

If you specify a directory incorrectly to roll_dep then it may not be
obvious why it cannot be found. For instance, "roll-dep tools\gyp" vs.
"roll-dep src\tools\gyp". This change prints the full directory.

This change also clarifies what is meant by a clean tree to make that
error message easier to understand.

R=maruel@chromium.org

Review URL: https://codereview.chromium.org/1507623003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297875 0039d316-1c4b-4281-b951-d872f2087c98
parent 9b433a02
......@@ -78,11 +78,11 @@ def roll(root, deps_dir, roll_to, key, reviewers, bug, no_log, log_limit,
'containing DEPS file.')
if not ignore_dirty_tree and not is_pristine(root):
raise Error('Ensure %s is clean first.' % root)
raise Error('Ensure %s is clean first (no non-merged commits).' % root)
full_dir = os.path.normpath(os.path.join(os.path.dirname(root), deps_dir))
if not os.path.isdir(full_dir):
raise Error('Directory not found: %s' % deps_dir)
raise Error('Directory not found: %s (%s)' % (deps_dir, full_dir))
head = check_output(['git', 'rev-parse', 'HEAD'], cwd=full_dir).strip()
if not head in deps_content:
......
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