Index: tools/findit/utils.py |
diff --git a/tools/findit/utils.py b/tools/findit/utils.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..747e633494c670017d02c27925051fe05e8c9654 |
--- /dev/null |
+++ b/tools/findit/utils.py |
@@ -0,0 +1,21 @@ |
+# Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import sys |
+ |
+ |
+def GetOSName(platform_name=sys.platform): |
+ if platform_name == 'cygwin' or platform_name.startswith('win'): |
+ return 'win' |
+ elif platform_name.startswith('linux'): |
+ return 'unix' |
+ elif platform_name.startswith('darwin'): |
+ return 'mac' |
+ else: |
+ return platform_name |
+ |
+ |
+def IsSvnRevision(revision): |
+ revision = str(revision) |
+ return len(revision) < 8 and revision.isdigit() |
Martin Barbella
2014/07/16 20:50:49
This seems hacky.
stgao
2014/07/22 00:35:46
Yes, it is a little hacky. But I can't think out a
|