diff options
author | Simon Hausmann <simon@lst.de> | 2007-05-24 00:24:52 +0200 |
---|---|---|
committer | Simon Hausmann <simon@lst.de> | 2007-05-24 00:24:52 +0200 |
commit | ebd8116870247fbc9fb27656d28f1b8a43aae766 (patch) | |
tree | 61342b31dcad2654aad4aebc60a9d7f870bd75f8 /contrib | |
parent | Fix multi-branch import with --silent. (diff) | |
download | tgif-ebd8116870247fbc9fb27656d28f1b8a43aae766.tar.xz |
Load the user map from p4 only once at run-time.
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/fast-import/git-p4 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index d8b7080b4b..9e9d623a3c 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -697,6 +697,8 @@ class P4Sync(Command): print "Tag %s does not match with change %s: file count is different." % (labelDetails["label"], change) def getUserMapFromPerforceServer(self): + if self.userMapFromPerforceServer: + return self.users = {} for output in p4CmdList("users"): @@ -708,9 +710,11 @@ class P4Sync(Command): for user in self.users.keys(): cache.write("%s\t%s\n" % (user, self.users[user])) cache.close(); + self.userMapFromPerforceServer = True def loadUserMapFromCache(self): self.users = {} + self.userMapFromPerforceServer = False try: cache = open(gitdir + "/p4-usercache.txt", "rb") lines = cache.readlines() |