diff options
-rwxr-xr-x | project.py | 14 | ||||
-rw-r--r-- | subcmds/info.py | 2 | ||||
-rw-r--r-- | subcmds/init.py | 4 | ||||
-rw-r--r-- | subcmds/sync.py | 3 |
4 files changed, 14 insertions, 9 deletions
@@ -1172,10 +1172,11 @@ class Project(object): | |||
1172 | 1172 | ||
1173 | ref_spec = '%s:refs/%s/%s' % (R_HEADS + branch.name, upload_type, | 1173 | ref_spec = '%s:refs/%s/%s' % (R_HEADS + branch.name, upload_type, |
1174 | dest_branch) | 1174 | dest_branch) |
1175 | opts = [] | ||
1175 | if auto_topic: | 1176 | if auto_topic: |
1176 | ref_spec = ref_spec + '/' + branch.name | 1177 | opts += ['topic=' + branch.name] |
1177 | 1178 | ||
1178 | opts = ['r=%s' % p for p in people[0]] | 1179 | opts += ['r=%s' % p for p in people[0]] |
1179 | opts += ['cc=%s' % p for p in people[1]] | 1180 | opts += ['cc=%s' % p for p in people[1]] |
1180 | if notify: | 1181 | if notify: |
1181 | opts += ['notify=' + notify] | 1182 | opts += ['notify=' + notify] |
@@ -1980,8 +1981,9 @@ class Project(object): | |||
1980 | 1981 | ||
1981 | if is_sha1 or tag_name is not None: | 1982 | if is_sha1 or tag_name is not None: |
1982 | if self._CheckForImmutableRevision(): | 1983 | if self._CheckForImmutableRevision(): |
1983 | print('Skipped fetching project %s (already have persistent ref)' | 1984 | if not quiet: |
1984 | % self.name) | 1985 | print('Skipped fetching project %s (already have persistent ref)' |
1986 | % self.name) | ||
1985 | return True | 1987 | return True |
1986 | if is_sha1 and not depth: | 1988 | if is_sha1 and not depth: |
1987 | # When syncing a specific commit and --depth is not set: | 1989 | # When syncing a specific commit and --depth is not set: |
@@ -2397,6 +2399,7 @@ class Project(object): | |||
2397 | if m.Has(key, include_defaults=False): | 2399 | if m.Has(key, include_defaults=False): |
2398 | self.config.SetString(key, m.GetString(key)) | 2400 | self.config.SetString(key, m.GetString(key)) |
2399 | self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f') | 2401 | self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f') |
2402 | self.config.SetString('filter.lfs.process', 'git-lfs filter-process --skip') | ||
2400 | if self.manifest.IsMirror: | 2403 | if self.manifest.IsMirror: |
2401 | self.config.SetString('core.bare', 'true') | 2404 | self.config.SetString('core.bare', 'true') |
2402 | else: | 2405 | else: |
@@ -2588,7 +2591,7 @@ class Project(object): | |||
2588 | cmd.append('-v') | 2591 | cmd.append('-v') |
2589 | cmd.append(HEAD) | 2592 | cmd.append(HEAD) |
2590 | if GitCommand(self, cmd).Wait() != 0: | 2593 | if GitCommand(self, cmd).Wait() != 0: |
2591 | raise GitError("cannot initialize work tree") | 2594 | raise GitError("cannot initialize work tree for " + self.name) |
2592 | 2595 | ||
2593 | if submodules: | 2596 | if submodules: |
2594 | self._SyncSubmodules(quiet=True) | 2597 | self._SyncSubmodules(quiet=True) |
@@ -2688,6 +2691,7 @@ class Project(object): | |||
2688 | def DiffZ(self, name, *args): | 2691 | def DiffZ(self, name, *args): |
2689 | cmd = [name] | 2692 | cmd = [name] |
2690 | cmd.append('-z') | 2693 | cmd.append('-z') |
2694 | cmd.append('--ignore-submodules') | ||
2691 | cmd.extend(args) | 2695 | cmd.extend(args) |
2692 | p = GitCommand(self._project, | 2696 | p = GitCommand(self._project, |
2693 | cmd, | 2697 | cmd, |
diff --git a/subcmds/info.py b/subcmds/info.py index ed196e90..f2827b34 100644 --- a/subcmds/info.py +++ b/subcmds/info.py | |||
@@ -45,7 +45,7 @@ class Info(PagedCommand): | |||
45 | def Execute(self, opt, args): | 45 | def Execute(self, opt, args): |
46 | self.out = _Coloring(self.manifest.globalConfig) | 46 | self.out = _Coloring(self.manifest.globalConfig) |
47 | self.heading = self.out.printer('heading', attr = 'bold') | 47 | self.heading = self.out.printer('heading', attr = 'bold') |
48 | self.headtext = self.out.printer('headtext', fg = 'yellow') | 48 | self.headtext = self.out.nofmt_printer('headtext', fg = 'yellow') |
49 | self.redtext = self.out.printer('redtext', fg = 'red') | 49 | self.redtext = self.out.printer('redtext', fg = 'red') |
50 | self.sha = self.out.printer("sha", fg = 'yellow') | 50 | self.sha = self.out.printer("sha", fg = 'yellow') |
51 | self.text = self.out.nofmt_printer('text') | 51 | self.text = self.out.nofmt_printer('text') |
diff --git a/subcmds/init.py b/subcmds/init.py index 9a9e8499..632d1a33 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -197,6 +197,8 @@ to update the working directory files. | |||
197 | else: | 197 | else: |
198 | m.PreSync() | 198 | m.PreSync() |
199 | 199 | ||
200 | self._ConfigureDepth(opt) | ||
201 | |||
200 | if opt.manifest_url: | 202 | if opt.manifest_url: |
201 | r = m.GetRemote(m.remote.name) | 203 | r = m.GetRemote(m.remote.name) |
202 | r.url = opt.manifest_url | 204 | r.url = opt.manifest_url |
@@ -429,6 +431,4 @@ to update the working directory files. | |||
429 | self._ConfigureUser() | 431 | self._ConfigureUser() |
430 | self._ConfigureColor() | 432 | self._ConfigureColor() |
431 | 433 | ||
432 | self._ConfigureDepth(opt) | ||
433 | |||
434 | self._DisplayResult() | 434 | self._DisplayResult() |
diff --git a/subcmds/sync.py b/subcmds/sync.py index fafc1e5c..ec7337aa 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -550,7 +550,8 @@ later is required to fix a server side protocol bug. | |||
550 | old_project_paths = fd.read().split('\n') | 550 | old_project_paths = fd.read().split('\n') |
551 | finally: | 551 | finally: |
552 | fd.close() | 552 | fd.close() |
553 | for path in old_project_paths: | 553 | # In reversed order, so subfolders are deleted before parent folder. |
554 | for path in sorted(old_project_paths, reverse=True): | ||
554 | if not path: | 555 | if not path: |
555 | continue | 556 | continue |
556 | if path not in new_project_paths: | 557 | if path not in new_project_paths: |