Go to file
Dan Willemsen 2a3e15217a Fix _ReferenceGitDir symlinking
This fixes these errors:

  ...
  File ".repo/repo/project.py", line 2371, in _ReferenceGitDir
    os.symlink(os.path.relpath(src, os.path.dirname(dst)), dst)
  OSError: [Errno 17] File exists

Which was happening for checkouts that were created before v1.12.8, when
project-objects was created. Nothing had yet been forcing these
checkouts to use project-objects, until the recent verification changes.

In this OSError case, we already created the symlink, so src == dst, and
the directory did not exist. This caused us to run os.makedirs the
os.symlink on the same file.

dst really should be the file in gitdir, not the target of that symlink
if it exists. So just use realpath for the dotgit portion of the path.

Change-Id: Iff5396a2093de91029c42cf38aa57131fd22981c
2015-07-30 21:29:53 -07:00
docs Revert "Implementation of manifest defined githooks" 2015-03-17 11:29:58 -07:00
hooks Update the commit-msg hook to the version from Gerrit 2.8.2 2014-07-15 11:30:06 -07:00
subcmds Add option to correct gitdir when syncing 2015-07-29 14:44:46 -06:00
tests Fix inconsistent indentation 2012-11-14 11:38:57 +09:00
.gitattributes Protect line endings in shell scripts 2013-02-11 22:13:39 +01:00
.gitignore Add repoc to the .gitignore file 2013-03-08 01:18:08 +00:00
.project Set correct name in PyDev and Eclipse project config 2013-04-19 09:35:43 +09:00
.pydevproject Set correct name in PyDev and Eclipse project config 2013-04-19 09:35:43 +09:00
.pylintrc Remove deprecated include-ids setting from pylint config 2015-04-07 11:10:17 +09:00
color.py Pylint and PEP8 fixes for color.py 2015-03-28 21:12:27 +00:00
command.py repo: Support multiple branches for the same project. 2013-10-14 15:34:32 -07:00
COPYING Initial Contribution 2008-10-21 07:00:00 -07:00
editor.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
error.py error: fix typos 2015-06-04 00:21:16 +00:00
git_command.py git_command: only decode when needed 2015-06-03 16:50:39 +01:00
git_config.py git_config: fix _SaveJson typo 2015-06-04 00:22:23 +00:00
git_refs.py Fix some python3 encoding issues 2013-11-21 06:03:22 +00:00
git_ssh Don't allow git fetch to start ControlMaster 2010-10-29 08:15:14 -07:00
main.py Improve error message when syncing a project with invalid groups. 2015-06-19 15:55:15 -07:00
manifest_xml.py Always output upstream if specified 2015-07-10 14:59:10 -07:00
pager.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
progress.py Support units in progress messages 2011-09-19 14:52:57 -07:00
project.py Fix _ReferenceGitDir symlinking 2015-07-30 21:29:53 -07:00
pyversion.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
repo Revert "Change the min git version from 1.7.2 to 1.8.2" 2015-03-30 21:53:25 +00:00
SUBMITTING_PATCHES Add pylint configuration and instructions 2012-10-24 10:18:13 +09:00
trace.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
wrapper.py Add wrapper module 2014-01-30 15:17:09 -08:00