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

Unified Diff: checkout.py

Issue 319673003: Verify our assumptions about SCM commands deleting files from checkout (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 6 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: checkout.py
diff --git a/checkout.py b/checkout.py
index 15d548cdb6ee8004ad0ba47e0dbcb2efd006f63c..5ba4ba93d3fc4d1db6880523977d611c5ec45b1a 100644
--- a/checkout.py
+++ b/checkout.py
@@ -174,6 +174,7 @@ class RawCheckout(CheckoutBase):
filepath = os.path.join(self.project_path, p.filename)
if p.is_delete:
os.remove(filepath)
+ assert(not os.path.exists(filepath))
jochen (gone - plz use gerrit) 2014/06/05 13:33:26 this won't work if filepath is a directory, right?
stdout.append('Deleted.')
else:
dirname = os.path.dirname(p.filename)
@@ -361,6 +362,7 @@ class SvnCheckout(CheckoutBase, SvnMixIn):
if p.is_delete:
stdout.append(self._check_output_svn(
['delete', p.filename, '--force'], credentials=False))
+ assert(not os.path.exists(filepath))
stdout.append('Deleted.')
else:
# svn add while creating directories otherwise svn add on the
@@ -654,6 +656,7 @@ class GitCheckout(CheckoutBase):
pass
else:
stdout.append(self._check_output_git(['rm', p.filename]))
+ assert(not os.path.exists(filepath))
stdout.append('Deleted.')
else:
dirname = os.path.dirname(p.filename)
« 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