Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Unified Diff: scm.py

Issue 1471973004: Fix some path processing to work better on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: lint Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « repo ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm.py
diff --git a/scm.py b/scm.py
index 94b925e87d0abf14762462607221a88f51316214..7d7554907177b51731c95c3ae180778fe37ede8b 100644
--- a/scm.py
+++ b/scm.py
@@ -1040,10 +1040,10 @@ class SVN(object):
auth_dir = os.path.join(os.environ['APPDATA'], 'Subversion', 'auth',
'svn.simple')
else:
- if not 'HOME' in os.environ:
+ auth_dir = os.path.expanduser(
+ os.path.join('~', '.subversion', 'auth', 'svn.simple'))
+ if not os.path.exists(auth_dir):
return None
- auth_dir = os.path.join(os.environ['HOME'], '.subversion', 'auth',
- 'svn.simple')
for credfile in os.listdir(auth_dir):
cred_info = SVN.ReadSimpleAuth(os.path.join(auth_dir, credfile))
if regexp.match(cred_info.get('svn:realmstring')):
« no previous file with comments | « repo ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698