diff options
| author | David Pursehouse <dpursehouse@collab.net> | 2016-08-14 08:50:28 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-08-14 08:50:28 +0000 |
| commit | 8016f60a46845fdadbadd88c5746cdaabe476417 (patch) | |
| tree | cf9940274c5c0c518a0e30ca87101f104bd8b133 | |
| parent | f97e72e5ddfcd34400aba384775b793170044f5c (diff) | |
| parent | f9fe3e14d2b56140c90a8969892e06aa71127305 (diff) | |
| download | git-repo-8016f60a46845fdadbadd88c5746cdaabe476417.tar.gz | |
Merge "repo: Repo does not always handle '.' parameter correctly"
| -rw-r--r-- | command.py | 5 | ||||
| -rw-r--r-- | project.py | 2 |
2 files changed, 6 insertions, 1 deletions
| @@ -119,6 +119,11 @@ class Command(object): | |||
| 119 | except KeyError: | 119 | except KeyError: |
| 120 | oldpath = path | 120 | oldpath = path |
| 121 | path = os.path.dirname(path) | 121 | path = os.path.dirname(path) |
| 122 | if not project and path == manifest.topdir: | ||
| 123 | try: | ||
| 124 | project = self._by_path[path] | ||
| 125 | except KeyError: | ||
| 126 | pass | ||
| 122 | else: | 127 | else: |
| 123 | try: | 128 | try: |
| 124 | project = self._by_path[path] | 129 | project = self._by_path[path] |
| @@ -628,7 +628,7 @@ class Project(object): | |||
| 628 | self.gitdir = gitdir.replace('\\', '/') | 628 | self.gitdir = gitdir.replace('\\', '/') |
| 629 | self.objdir = objdir.replace('\\', '/') | 629 | self.objdir = objdir.replace('\\', '/') |
| 630 | if worktree: | 630 | if worktree: |
| 631 | self.worktree = worktree.replace('\\', '/') | 631 | self.worktree = os.path.normpath(worktree.replace('\\', '/')) |
| 632 | else: | 632 | else: |
| 633 | self.worktree = None | 633 | self.worktree = None |
| 634 | self.relpath = relpath | 634 | self.relpath = relpath |
