Re: P4 Sync problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]