diff options
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index ad05cadd..6bccbb03 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -123,7 +123,8 @@ later is required to fix a server side protocol bug. | |||
123 | def UpdateProjectList(self): | 123 | def UpdateProjectList(self): |
124 | new_project_paths = [] | 124 | new_project_paths = [] |
125 | for project in self.manifest.projects.values(): | 125 | for project in self.manifest.projects.values(): |
126 | new_project_paths.append(project.relpath) | 126 | if project.relpath: |
127 | new_project_paths.append(project.relpath) | ||
127 | file_name = 'project.list' | 128 | file_name = 'project.list' |
128 | file_path = os.path.join(self.manifest.repodir, file_name) | 129 | file_path = os.path.join(self.manifest.repodir, file_name) |
129 | old_project_paths = [] | 130 | old_project_paths = [] |
@@ -135,6 +136,8 @@ later is required to fix a server side protocol bug. | |||
135 | finally: | 136 | finally: |
136 | fd.close() | 137 | fd.close() |
137 | for path in old_project_paths: | 138 | for path in old_project_paths: |
139 | if not path: | ||
140 | continue | ||
138 | if path not in new_project_paths: | 141 | if path not in new_project_paths: |
139 | project = Project( | 142 | project = Project( |
140 | manifest = self.manifest, | 143 | manifest = self.manifest, |
@@ -166,6 +169,7 @@ uncommitted changes are present' % project.relpath | |||
166 | fd = open(file_path, 'w') | 169 | fd = open(file_path, 'w') |
167 | try: | 170 | try: |
168 | fd.write('\n'.join(new_project_paths)) | 171 | fd.write('\n'.join(new_project_paths)) |
172 | fd.write('\n') | ||
169 | finally: | 173 | finally: |
170 | fd.close() | 174 | fd.close() |
171 | return 0 | 175 | return 0 |