From: Dmitry Smirnov Date: Wed, 11 Nov 2009 09:43:52 GMT Subject: Re: P4 Sync problem Message-ID: In-Reply-To: <1a6be5fa0911110043i63b5c032s7924f9f1cdfe32ee@mail.gmail.com> Tor Arvid Lund gmail.com> writes: > Hi. So - I think the problem is that git-p4 doesn't understand what it > is you want to sync. I believe it will never understand that until self.depotPaths will be initialized. It looks like it is intitilized from argument list only (or from already saved settings). See P4Sync.run(). But self.getClientSpec() which is called some time before, does not init neither self.depotPaths nor args. I had fixed this with the following code (new lines marked with +): if self.useClientSpec or gitConfig("git-p4.useclientspec") == "true": + if self.verbose: + print "Get client spec" self.getClientSpec() + if self.verbose: + print "Client Spec Dirs: %s" % self.clientSpecDirs + if len(args) == 0: + for item in self.clientSpecDirs: + k,v = item + args.append(k) Unfortunately, this fails on another stage: >git p4 sync --verbose Reading pipe: git config git-p4.useclientspec Get client spec Reading pipe: git config git-p4.user Reading pipe: git config git-p4.password Reading pipe: git config git-p4.port Reading pipe: git config git-p4.host Reading pipe: git config git-p4.client p4 -c MYCLIENT-G client -o Opening pipe: p4 -c MYCLIENT-G client -o Client Spec Dirs:[ ] Doing initial import of from revision #head into refs/remotes/p4/master p4 -c MYCLIENT-G files Opening pipe: p4 -c MYCLIENT-G files p4 returned an error: //MYCLIENT/path/file.c/...#head> - file(s) not in client view. My client spec contains some line to the file: -//depot/path/... //MYCLIENT/null/... //depot/path/file.cs //MYCLIENT/path/file.cs This means that I wish to sync only file.cs into my client and get rid of other files in this directory. BTW, note that file extension is truncated in the log Dmitry