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

Unified Diff: tests/scm_unittest.py

Issue 6650011: Add code to correctly revert a svn add'ed file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 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 | « scm.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/scm_unittest.py
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py
index 6fd1ecc8938dca37a93cd4fe1b2803956772897c..31d0a7c46ecd5017d31428790080588ba1f9e2ba 100755
--- a/tests/scm_unittest.py
+++ b/tests/scm_unittest.py
@@ -282,11 +282,18 @@ class RealSvnTest(fake_repos.FakeReposTestBase):
with open(scm.os.path.join(self.svn_root, 'faala'), 'w') as f:
f.write('oh')
self._capture(['add', scm.os.path.join(self.svn_root, 'faala')])
+ added_and_removed = scm.os.path.join(self.svn_root, 'added_and_removed')
+ with open(added_and_removed, 'w') as f:
+ f.write('oh')
+ self._capture(['add', added_and_removed])
+ scm.os.remove(added_and_removed)
scm.SVN.Revert(self.svn_root)
self._capture(['update', '--revision', 'base'])
self.assertTree(self.tree, self.svn_root)
+ # Asserting the tree is not sufficient, svn status must come out clear too.
+ self.assertEquals('', self._capture(['status']))
if __name__ == '__main__':
« no previous file with comments | « scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698