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

Unified Diff: scm.py

Issue 743083002: Make gclient ready for the Blink (DEPS to main project) transition (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Fix tests Created 6 years 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') | testing_support/fake_repos.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 9bc96bc8055832707a749d3b9d256766b5a43956..94b925e87d0abf14762462607221a88f51316214 100644
--- a/scm.py
+++ b/scm.py
@@ -443,6 +443,16 @@ class GIT(object):
return False
@staticmethod
+ def IsDirectoryVersioned(cwd, relative_dir):
+ """Checks whether the given |relative_dir| is part of cwd's repo."""
+ return bool(GIT.Capture(['ls-tree', 'HEAD', relative_dir], cwd=cwd))
+
+ @staticmethod
+ def CleanupDir(cwd, relative_dir):
+ """Cleans up untracked file inside |relative_dir|."""
+ return bool(GIT.Capture(['clean', '-df', relative_dir], cwd=cwd))
+
+ @staticmethod
def GetGitSvnHeadRev(cwd):
"""Gets the most recently pulled git-svn revision."""
try:
« no previous file with comments | « gclient_scm.py ('k') | testing_support/fake_repos.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698