Index: gclient_scm.py |
=================================================================== |
--- gclient_scm.py (revision 101811) |
+++ gclient_scm.py (working copy) |
@@ -766,7 +766,18 @@ |
dir_info = scm.SVN.CaptureStatus(os.path.join(self.checkout_path, '.')) |
for d in dir_info: |
if d[0][2] == 'L': |
- self._Run(['cleanup', d[1]], options) |
+ try: |
+ self._Run(['cleanup', d[1]], options) |
+ except subprocess2.CalledProcessError, e: |
+ # Only remove the directory automatically if it's not versioned |
+ # and --force is used. |
+ if d[0][0] in ('?', '!') and options.force: |
M-A Ruel
2011/09/19 20:36:25
I don't see why you'd get the status '? L '.
I
Paweł Hajdan Jr.
2011/09/19 20:40:06
I was getting '! L '.
M-A Ruel
2011/09/19 20:43:59
In that case, it's because the root directory is n
|
+ print 'Removing troublesome path %s' % d[1] |
+ gclient_utils.rmtree(d[1]) |
+ else: |
+ print 'Not removing troublesome path %s automatically.' % d[1] |
+ print 'If the directory is not versioned you can use --force.' |
+ raise e |
# Retrieve the current HEAD version because svn is slow at null updates. |
if options.manually_grab_svn_rev and not revision: |