summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9320da8)
raw | patch | inline | side by side (parent: 9320da8)
author | Han-Wen Nienhuys <hanwen@google.com> | |
Wed, 23 May 2007 21:49:35 +0000 (18:49 -0300) | ||
committer | Han-Wen Nienhuys <hanwen@google.com> | |
Wed, 30 May 2007 19:35:32 +0000 (16:35 -0300) |
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
contrib/fast-import/git-p4 | patch | blob | history |
index f1f562fae4ef23440f30cf310e1fce4fb478e1fe..bd1afb296431a30814b46cb25c9b3b6e1491d922 100755 (executable)
print ("Tag %s does not match with change %s: file count is different."
% (labelDetails["label"], change))
+ def getUserCacheFilename(self):
+ return os.environ["HOME"] + "/.gitp4-usercache.txt")
+
def getUserMapFromPerforceServer(self):
if self.userMapFromPerforceServer:
return
continue
self.users[output["User"]] = output["FullName"] + " <" + output["Email"] + ">"
- cache = open(self.gitdir + "/p4-usercache.txt", "wb")
- for user in self.users.keys():
- cache.write("%s\t%s\n" % (user, self.users[user]))
- cache.close();
+
+ s = ''
+ for (key, val) in self.users.items():
+ s += "%s\t%s\n" % (key, val)
+
+ open(self.getUserCacheFilename(), "wb").write(s)
self.userMapFromPerforceServer = True
def loadUserMapFromCache(self):
self.users = {}
self.userMapFromPerforceServer = False
try:
- cache = open(self.gitdir + "/p4-usercache.txt", "rb")
+ cache = open(self.getUserCacheFilename(), "rb")
lines = cache.readlines()
cache.close()
for line in lines: