Chromium Code Reviews| Index: gclient_utils.py |
| =================================================================== |
| --- gclient_utils.py (revision 82287) |
| +++ gclient_utils.py (working copy) |
| @@ -112,6 +112,19 @@ |
| return tuple(components) |
| +def IsDateRevision(revision): |
| + """Returns true if the given revision is of the form "{ ... }".""" |
| + if revision is None: |
|
M-A Ruel
2011/04/21 23:54:58
return bool(revision and re.match(r'^\{.+\}$', str
Florian Loitsch
2011/04/26 12:53:06
Done.
|
| + return False |
| + return bool(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: |