From 0ce6ca9c7bc285eb644cdaacec92afca24939841 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 10 Jan 2011 13:26:01 -0800 Subject: [PATCH] Fix mirror clients with no worktree Commit "Make path references OS independent" (df14a70c45) broke mirror clients by trying to invoke replace() on None when there is no worktree. Change-Id: Ie0a187058358f7dcdf83119e45cc65409c980f11 --- project.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project.py b/project.py index 25347daf..12595cd7 100644 --- a/project.py +++ b/project.py @@ -237,7 +237,10 @@ class Project(object): self.name = name self.remote = remote self.gitdir = gitdir.replace('\\', '/') - self.worktree = worktree.replace('\\', '/') + if worktree: + self.worktree = worktree.replace('\\', '/') + else: + self.worktree = None self.relpath = relpath self.revisionExpr = revisionExpr