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

Unified Diff: gclient.py

Issue 660299: Fix revinfo with git (Closed)
Patch Set: Created 10 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index c585385750962847f95dea6fa045f4b8928f7e74..ef893d6d450dbd1b269f491c486d95efca1d3c73 100755
--- a/gclient.py
+++ b/gclient.py
@@ -773,16 +773,13 @@ class GClient(object):
def PrintRevInfo(self):
"""Output revision info mapping for the client and its dependencies. This
- allows the capture of a overall "revision" for the source tree that can
+ allows the capture of an overall "revision" for the source tree that can
be used to reproduce the same tree in the future. The actual output
contains enough information (source paths, svn server urls and revisions)
that it can be used either to generate external svn commands (without
gclient) or as input to gclient's --rev option (with some massaging of
the data).
- NOTE: Unlike RunOnDeps this does not require a local checkout and is run
- on the Pulse master. It MUST NOT execute hooks.
-
Raises:
Error: If the client has conflicting entries.
"""
@@ -830,13 +827,18 @@ class GClient(object):
raise gclient_utils.Error("solution %s specified more than once" % name)
(url, rev) = GetURLAndRev(name, solution["url"])
entries[name] = "%s@%s" % (url, rev)
- # TODO(aharper): SVN/SCMWrapper cleanup (non-local commandset)
- entries_deps_content[name] = gclient_scm.scm.SVN.Capture(
- ["cat",
- "%s/%s@%s" % (url,
- self._options.deps_file,
- rev)],
- os.getcwd())
+ deps_file = solution.get("deps_file", self._options.deps_file)
+ if '/' in deps_file or '\\' in deps_file:
+ raise gclient_utils.Error('deps_file name must not be a path, just a '
+ 'filename.')
+ try:
+ deps_content = gclient_utils.FileRead(
+ os.path.join(self._root_dir, name, deps_file))
+ except IOError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ deps_content = ""
+ entries_deps_content[name] = deps_content
# Process the dependencies next (sort alphanumerically to ensure that
# containing directories get populated first and for readability)
@@ -863,7 +865,7 @@ class GClient(object):
sub_deps = self._ParseSolutionDeps(deps[d].module_name, content, {})
(url, rev) = GetURLAndRev(d, sub_deps[d])
entries[d] = "%s@%s" % (url, rev)
- print(";\n\n".join(["%s: %s" % (x, entries[x])
+ print(";\n".join(["%s: %s" % (x, entries[x])
for x in sorted(entries.keys())]))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698