Bläddra i källkod

Merge "repo: Repo does not always handle '.' parameter correctly"

David Pursehouse 9 år sedan
förälder
incheckning
8016f60a46
2 ändrade filer med 6 tillägg och 1 borttagningar
  1. 5 0
      command.py
  2. 1 1
      project.py

+ 5 - 0
command.py

@@ -119,6 +119,11 @@ class Command(object):
         except KeyError:
           oldpath = path
           path = os.path.dirname(path)
+      if not project and path == manifest.topdir:
+        try:
+          project = self._by_path[path]
+        except KeyError:
+          pass
     else:
       try:
         project = self._by_path[path]

+ 1 - 1
project.py

@@ -628,7 +628,7 @@ class Project(object):
     self.gitdir = gitdir.replace('\\', '/')
     self.objdir = objdir.replace('\\', '/')
     if worktree:
-      self.worktree = worktree.replace('\\', '/')
+      self.worktree = os.path.normpath(worktree.replace('\\', '/'))
     else:
       self.worktree = None
     self.relpath = relpath