{"thread":{"id":"9462","subject":"git-p4 question","startedAt":"2007-08-10T02:53:37Z","lastAt":"2007-08-10T16:25:46Z","messageCount":5,"participants":["Govind Salinas","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"50371","messageId":"69b0c0350708091953wdc9c22vd2b17b1edd1c5cd2@mail.gmail.com","threadId":"9462","inReplyTo":null,"subject":"git-p4 question","fromName":"Govind Salinas","fromEmail":"govindsalinas@gmail.com","sentAt":"2007-08-10T02:53:37Z","receivedAt":"2007-08-10T02:53:37Z","isPatch":false,"sender":{"key":"govindsalinas@gmail.com","avatar":null},"body":"Hi All,\n\nMe again with more dumb git-perforce questions.\n\nI have been toying with git-p4 and I think it does everything I want\nexcept the crazy client map support.  I figure I don't really need\nthis.  My client is something like this:\n\n//depot/sane/... //clientroot/crazy/...\n//depot/stuff/... //clientroot/dumb/...\n//depot/otherstuff/... //clientroot/dumb/...\n//depot/my/product/... //clientroot/src/realworkhere/...\n\nMy \"working directory\" looks something like this:\n\nc:\\path\\crazy\\xyz_from_perforce\nc:\\path\\crazy\\abc_from_huge_binary_fileshare_notinp4\nc:\\path\\dumb\\...\nc:\\path\\src\\realworkhere\\...\n\nIf I can just sync from p4 and then sync my binary share and THEN tell\ngit-p4 that //depot/my/product/... maps to c:\\path\\src\\realworkhere,\nget it to import history etc,  then I would be set.\n\nIs this at all possible to do with git-p4?\n\nIf not, what sort of work would be necessary to add that (considering\nthat I am a git noob).\n\nThanks for the help.\n\n-Govind\n"},{"id":"50391","messageId":"81b0412b0708100106m3123a504p16309b6e06cd9609@mail.gmail.com","threadId":"9462","inReplyTo":"69b0c0350708091953wdc9c22vd2b17b1edd1c5cd2@mail.gmail.com","subject":"Re: git-p4 question","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-08-10T08:06:15Z","receivedAt":"2007-08-10T08:06:15Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 8/10/07, Govind Salinas <govindsalinas@gmail.com> wrote:\n> If I can just sync from p4 and then sync my binary share and THEN tell\n> git-p4 that //depot/my/product/... maps to c:\\path\\src\\realworkhere,\n> get it to import history etc,  then I would be set.\n\ngit-p4-import.bat can import a state from the client have-list,\nbut it does not import the history. It can import the history\nseparately, so that you can stitch it into a merge which will be\nthe state imported from the client. Complicated, but I couldn't\nbring myself to figure out the history automatically.\n\nThe script attached (sorry for .gz, gmail wont let me send a .bat).\n"},{"id":"50392","messageId":"81b0412b0708100110w6ff90215gd5c367fb65e2ae21@mail.gmail.com","threadId":"9462","inReplyTo":"81b0412b0708100106m3123a504p16309b6e06cd9609@mail.gmail.com","subject":"Re: git-p4 question","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-08-10T08:10:59Z","receivedAt":"2007-08-10T08:10:59Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 8/10/07, Alex Riesen <raa.lkml@gmail.com> wrote:\n> On 8/10/07, Govind Salinas <govindsalinas@gmail.com> wrote:\n> > If I can just sync from p4 and then sync my binary share and THEN tell\n> > git-p4 that //depot/my/product/... maps to c:\\path\\src\\realworkhere,\n> > get it to import history etc,  then I would be set.\n>\n> git-p4-import.bat can import a state from the client have-list,\n> but it does not import the history. It can import the history\n> separately, so that you can stitch it into a merge which will be\n> the state imported from the client. Complicated, but I couldn't\n> bring myself to figure out the history automatically.\n\nErr, example:\n\nImport a state from p4 client:\n\n  git-p4-import -y -c client-name -e\n\nImport p4 history of a path mapping:\n\n  git-p4-import --p4-path //perforce/path \\\n    --local-path very-local-path \\\n    --p4-range '@1234,5678' \\\n    --start start-commit \\\n    --branch branch-name\n\nThe last argument (--branch) is optional, will just store the last imported\ncommit there. start-commit will be assumed current HEAD, if omitted.\n"},{"id":"50415","messageId":"69b0c0350708100817u58f74acbyed5c19830cb92ed7@mail.gmail.com","threadId":"9462","inReplyTo":"81b0412b0708100110w6ff90215gd5c367fb65e2ae21@mail.gmail.com","subject":"Re: git-p4 question","fromName":"Govind Salinas","fromEmail":"govindsalinas@gmail.com","sentAt":"2007-08-10T15:17:04Z","receivedAt":"2007-08-10T15:17:04Z","isPatch":false,"sender":{"key":"govindsalinas@gmail.com","avatar":null},"body":"I am having some problems running the script.  It seems that (line\n1425) $f->{sha1} is uninitialized and causing the import to fail (the\nperforce path is missing the leading \"//\" I don't know if that is\nintentional).  Let me know if you want to continue this off list since\nit isn't really a part of git.\n\nOn 8/10/07, Alex Riesen <raa.lkml@gmail.com> wrote:\n> On 8/10/07, Alex Riesen <raa.lkml@gmail.com> wrote:\n> > On 8/10/07, Govind Salinas <govindsalinas@gmail.com> wrote:\n> > > If I can just sync from p4 and then sync my binary share and THEN tell\n> > > git-p4 that //depot/my/product/... maps to c:\\path\\src\\realworkhere,\n> > > get it to import history etc,  then I would be set.\n> >\n> > git-p4-import.bat can import a state from the client have-list,\n> > but it does not import the history. It can import the history\n> > separately, so that you can stitch it into a merge which will be\n> > the state imported from the client. Complicated, but I couldn't\n> > bring myself to figure out the history automatically.\n>\n> Err, example:\n>\n> Import a state from p4 client:\n>\n>   git-p4-import -y -c client-name -e\n>\n> Import p4 history of a path mapping:\n>\n>   git-p4-import --p4-path //perforce/path \\\n>     --local-path very-local-path \\\n>     --p4-range '@1234,5678' \\\n>     --start start-commit \\\n>     --branch branch-name\n>\n> The last argument (--branch) is optional, will just store the last imported\n> commit there. start-commit will be assumed current HEAD, if omitted.\n>\n"},{"id":"50423","messageId":"81b0412b0708100925g45b5d3e7j19141374f7f57458@mail.gmail.com","threadId":"9462","inReplyTo":"69b0c0350708100817u58f74acbyed5c19830cb92ed7@mail.gmail.com","subject":"Re: git-p4 question","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-08-10T16:25:46Z","receivedAt":"2007-08-10T16:25:46Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 8/10/07, Govind Salinas <govindsalinas@gmail.com> wrote:\n> I am having some problems running the script.  It seems that (line\n> 1425) $f->{sha1} is uninitialized and causing the import to fail (the\n> perforce path is missing the leading \"//\" I don't know if that is\n> intentional).\n\nthe line in question deals with local pathnames, so it is expected.\nWhat i don't understand is how did you manage to have the file\nwithout sha1... Could you put a\n\n print \"$tmpfile\\n\";\n\nafter line 1400?\n open($ft,'>',$tmpfile) or die \"$tmpfile: $!\\n\";\n\nand run git-p4-import -v -v -v?\nThan it possible to compare lists of the files which is acquired\nthrough p4 change with the list of files output by p4 print.\n\nWhat perforce client version do you have, BTW?\n\n>  Let me know if you want to continue this off list since\n> it isn't really a part of git.\n\nIt isn't. We can continue privately\n"}]}