Show More
@@ -32,7 +32,11 b' class dirstate(object):' | |||
|
32 | 32 | def getcwd(self): |
|
33 | 33 | cwd = os.getcwd() |
|
34 | 34 | if cwd == self.root: return '' |
|
35 | return cwd[len(self.root) + 1:] | |
|
35 | # self.root ends with a path separator if self.root is '/' or 'C:\' | |
|
36 | common_prefix_len = len(self.root) | |
|
37 | if not self.root.endswith(os.sep): | |
|
38 | common_prefix_len += 1 | |
|
39 | return cwd[common_prefix_len:] | |
|
36 | 40 | |
|
37 | 41 | def hgignore(self): |
|
38 | 42 | '''return the contents of .hgignore files as a list of patterns. |
General Comments 0
You need to be logged in to leave comments.
Login now