git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: P4 Sync problem

From
DSDmitry Smirnov <divis1969@gmail.com>
Date
Nov 11, 2009, 09:43 UTC
Message-ID
<loom.20091111T100646-406@post.gmane.org>
In-Reply-To
<1a6be5fa0911110043i63b5c032s7924f9f1cdfe32ee@mail.gmail.com>
Tor Arvid Lund <torarvid <at> 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:[ <my paths here> ] Doing initial import of <my paths here> from revision #head into refs/remotes/p4/master p4 -c MYCLIENT-G files <my paths here appended with ...#head > Opening pipe: p4 -c MYCLIENT-G files <my paths here appended with ...#head > 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
Previous: Tor Arvid LundNext: Tor Arvid Lund
Message 3 of 9 in “P4 Sync problem”
  1. Dmitry SmirnovNov 10, 2009
  2. Tor Arvid LundNov 11, 2009
  3. Dmitry SmirnovNov 11, 2009
  4. Tor Arvid LundNov 11, 2009
  5. Dmitry SmirnovNov 11, 2009
  6. Tor Arvid LundNov 11, 2009
  7. Dmitry SmirnovNov 11, 2009
  8. masonkJul 22, 2010
  9. Pete WyckoffNov 15, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.