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

Unified Diff: gclient_utils.py

Issue 6873110: Add --transitive flag. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: local switch to other directory Created 9 years, 8 months 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 | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 9953223898e03cbff726d2984a03bdf96e583b31..81a1f667e63f3e45434b1073fecd452171970b20 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -112,6 +112,17 @@ def SplitUrlRevision(url):
return tuple(components)
+def IsDateRevision(revision):
+ """Returns true if the given revision is of the form "{ ... }"."""
+ return bool(revision and re.match(r'^\{.+\}$', str(revision)))
+
+
+def MakeDateRevision(date):
+ """Returns a revision representing the latest revision before the given
+ date."""
+ return "{" + date + "}"
+
+
def SyntaxErrorToError(filename, e):
"""Raises a gclient_utils.Error exception with the human readable message"""
try:
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698