gclient: fix --delete_unversioned_trees bug

This occurs for svn checkouts when the DEPS change from:
  third_party/skia/gyp
  third_party/skia/include
  third_party/skia/src
to:
  third_party/skia

First, gclient deletes/moves third_party/skia to make room for the new checkout.
When finished, it notices that the three subdirectories under skia are now
"unversioned" according to .gclient_entries, even though they are part of Skia
repo. On the bots, this causes them to be deleted.

There is a check to determine whether the thought-to-be unversioned directories
are actually subdirectories of another checkout, but it doesn't work in the svn
case because the check assumes that, if they are subdirectories of another
checkout, it must be an svn checkout. scm.GetCheckoutRoot() returns None
because it can't find an svn checkout containing those subdirectories. None is
not in gclient_entries, so the directories get deleted.

BUG=

Review URL: https://codereview.chromium.org/275103009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270133 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed
tree: 1be2e7c002d11b88aa631e4bef320c6340eb91c6
  1. bootstrap/
  2. git-templates/
  3. git_utils/
  4. man/
  5. recipes/
  6. support/
  7. testing_support/
  8. tests/
  9. third_party/
  10. win_toolchain/
  11. zsh-goodies/
  12. .gitignore
  13. annotated_gclient.py
  14. apply_issue
  15. apply_issue.bat
  16. apply_issue.py
  17. breakpad.py
  18. checkout.py
  19. chrome-update-create-task.bat
  20. chrome-update.bat
  21. chrome-update.py
  22. clang-format
  23. clang-format.bat
  24. clang_format.py
  25. codereview.settings
  26. commit_queue.py
  27. cpplint.bat
  28. cpplint.py
  29. cpplint_chromium.py
  30. create-chromium-git-src
  31. create-ntfs-junction.c
  32. create-ntfs-junction.exe
  33. download_from_google_storage
  34. download_from_google_storage.bat
  35. download_from_google_storage.py
  36. drover
  37. drover.bat
  38. drover.py
  39. fetch
  40. fetch.bat
  41. fetch.py
  42. fix_encoding.py
  43. gcl
  44. gcl.bat
  45. gcl.py
  46. gclient
  47. gclient-new-workdir.py
  48. gclient.bat
  49. gclient.py
  50. gclient_completion.sh
  51. gclient_scm.py
  52. gclient_utils.py
  53. gerrit_util.py
  54. git-cache
  55. git-cl
  56. git-cl-upload-hook
  57. git-crsync
  58. git-crup
  59. git-freeze
  60. git-gs
  61. git-lkgr
  62. git-map
  63. git-map-branches
  64. git-mark-merge-base
  65. git-nav-downstream
  66. git-nav-upstream
  67. git-new-branch
  68. git-number
  69. git-rebase-update
  70. git-rename-branch
  71. git-reparent-branch
  72. git-runhooks
  73. git-squash-branch
  74. git-thaw
  75. git-try
  76. git-upstream-diff
  77. git_cache.py
  78. git_cl.py
  79. git_common.py
  80. git_freezer.py
  81. git_map.py
  82. git_map_branches.py
  83. git_mark_merge_base.py
  84. git_nav_downstream.py
  85. git_new_branch.py
  86. git_number.py
  87. git_rebase_update.py
  88. git_rename_branch.py
  89. git_reparent_branch.py
  90. git_squash_branch.py
  91. git_try.py
  92. git_upstream_diff.py
  93. gn
  94. gn.bat
  95. gn.py
  96. hammer
  97. hammer.bat
  98. LICENSE
  99. my_activity.py
  100. my_reviews.py
  101. ninja
  102. ninja-linux32
  103. ninja-linux64
  104. ninja-mac
  105. ninja.exe
  106. OWNERS
  107. owners.py
  108. owners_finder.py
  109. patch.py
  110. PRESUBMIT.py
  111. presubmit_canned_checks.py
  112. presubmit_support.py
  113. profile.xml
  114. pylint
  115. pylint.py
  116. pylintrc
  117. python_git_runner.sh
  118. README
  119. README.codereview
  120. README.gclient
  121. README.git-cl
  122. README.testing
  123. repo
  124. rietveld.py
  125. scm.py
  126. subcommand.py
  127. subprocess2.py
  128. trychange.py
  129. update_depot_tools
  130. update_depot_tools.bat
  131. upload_to_google_storage.py
  132. WATCHLISTS
  133. watchlists.py
  134. weekly
  135. wtf