Get roll-dep to handle \ separators

roll-dep.py helpfully trims both trailing '/' and trailing '\'
characters, however it then fails if there are any '\' characters
embedded in the path. We can make this script friendlier for Windows
users by replacing '\' with '/'.

This was manually tested with a deps-roll of src\native_client.

Change-Id: I8fbd3395364612c85db39b234ee7dcbda705d0b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2260997
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
changes/97/2260997/2
Bruce Dawson 5 years ago committed by LUCI CQ
parent b7db183f02
commit 37b62e51e5

@ -221,7 +221,7 @@ def main():
gclient_root = gclient(['root'])
current_dir = os.getcwd()
dependencies = sorted(d.rstrip('/').rstrip('\\') for d in args.dep_path)
dependencies = sorted(d.replace('\\', '/').rstrip('/') for d in args.dep_path)
cmdline = 'roll-dep ' + ' '.join(dependencies) + ''.join(
' --key ' + k for k in args.key)
try:

Loading…
Cancel
Save