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

Unified Diff: scm.py

Issue 1307001: revinfo: Properly use git HEAD or svn BASE revisions (Closed)
Patch Set: fixed issues with patch set 1 Created 10 years, 9 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/scm_unittest.py » ('j') | 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 313ff783911c5f4b55f8ce4e8ffb91e92396a712..1b3b72f2c2cb731ac72a93861039ab108387d199 100644
--- a/scm.py
+++ b/scm.py
@@ -494,6 +494,17 @@ class SVN(object):
return dom.getElementsByTagName('entry')[0].getAttribute('revision')
@staticmethod
+ def CaptureBaseRevision(cwd):
+ """Get the base revision of a SVN repository.
+
+ Returns:
+ Int base revision
+ """
+ info = SVN.Capture(["info", "--xml"], cwd)
+ dom = xml.dom.minidom.parseString(info)
+ return dom.getElementsByTagName('entry')[0].getAttribute('revision')
+
+ @staticmethod
def CaptureStatus(files):
"""Returns the svn 1.5 svn status emulated output.
« no previous file with comments | « gclient_scm.py ('k') | tests/scm_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698