All of lore.kernel.org
 help / color / mirror / Atom feed
* git-p4 Question
@ 2015-04-20 16:29 Fusion Xavier
  0 siblings, 0 replies; 16+ messages in thread
From: Fusion Xavier @ 2015-04-20 16:29 UTC (permalink / raw)
  To: git

Hello,

Hopefully this is an appropriate place to ask questions about git-p4.

I started at a company that wants to migrate from Perforce to Git. I'm new
to Perforce and have been trying to learn just enough about it to get
through this migration. Anyway, I've been playing with git-p4 and have run
into something with it I don't understand.

After setting up the p4 cli client I can 'p4 sync' some //depot/main/app1
depot/folder which pulls down the files I would expect from the Perforce
server. If I use 'git p4 clone //depot/main/app1', I get:

"Doing initial import of //depot/main/app1/ from revision #head into
refs/remotes/p4/master"

But I don't get any files from that depot/folder pulled down. I can git p4
clone other depot/folders though and get some files. I suspect that I'm just
not understanding how the git-p4 module works.

Basically, I'm hoping to setup a live sync of Perforce to Git of certain
depots in preparation for the migration. Also, if anyone has pointers or
guides for this type of migration, any help is appreciated.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-24 14:36           ` FusionX86
@ 2015-04-26 22:27             ` Luke Diamand
  0 siblings, 0 replies; 16+ messages in thread
From: Luke Diamand @ 2015-04-26 22:27 UTC (permalink / raw)
  To: FusionX86; +Cc: Git Users

On 24/04/15 15:36, FusionX86 wrote:
> I get an error if I misspell part of the path. For example, if I type
> //depot/maain instead of //depot/main I will get the "no such files"
> message you indicated. BUT using incorrect case like //depot/main
> instead of //depot/Main doesn't return any error, but still completes
> and creates an empty repo. If it does require correct case, then it
> should throw an error for //depot/main as well.

Thanks, that's a somewhat subtle bug....!

Luke

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-24  9:20         ` Luke Diamand
@ 2015-04-24 14:36           ` FusionX86
  2015-04-26 22:27             ` Luke Diamand
  0 siblings, 1 reply; 16+ messages in thread
From: FusionX86 @ 2015-04-24 14:36 UTC (permalink / raw)
  To: Luke Diamand; +Cc: Git Users

I get an error if I misspell part of the path. For example, if I type
//depot/maain instead of //depot/main I will get the "no such files"
message you indicated. BUT using incorrect case like //depot/main
instead of //depot/Main doesn't return any error, but still completes
and creates an empty repo. If it does require correct case, then it
should throw an error for //depot/main as well.

Let me know if you need any additional information.

On Fri, Apr 24, 2015 at 3:20 AM, Luke Diamand <luke@diamand.org> wrote:
> On 23/04/15 14:42, FusionX86 wrote:
>>
>> Hi Luke,
>>
>> I found a silly mistake I was making in the command I've been using.
>> The folder under the depot should have been capitalized, but it
>> wasn't. Also, I expected that if there was a problem with the command,
>> it would fail with some message instead of creating an empty local git
>> repo.
>
>
> I would expect that as well - it will usually create the empty git repo, but
> it should then fail with an error message, like this:
>
> $ git p4 clone //depot/main/nosuchpath
> Importing from //depot/main/nosuchpath into nosuchpath
> Initialized empty Git repository in
> /home/lgd/p4-hacking/git/nosuchpath/.git/
> Doing initial import of //depot/main/nosuchpath/ from revision #head into
> refs/remotes/p4/master
> p4 returned an error: //depot/main/nosuchpath/...#head - no such file(s).
>
> $ echo $?
> 1
>
> If you get a moment can you send your command output; if it's not doing
> something like the above, then it's a bug.
>
> Thanks!
>
> Luke
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-23 13:42       ` FusionX86
@ 2015-04-24  9:20         ` Luke Diamand
  2015-04-24 14:36           ` FusionX86
  0 siblings, 1 reply; 16+ messages in thread
From: Luke Diamand @ 2015-04-24  9:20 UTC (permalink / raw)
  To: FusionX86; +Cc: Git Users

On 23/04/15 14:42, FusionX86 wrote:
> Hi Luke,
>
> I found a silly mistake I was making in the command I've been using.
> The folder under the depot should have been capitalized, but it
> wasn't. Also, I expected that if there was a problem with the command,
> it would fail with some message instead of creating an empty local git
> repo.

I would expect that as well - it will usually create the empty git repo, 
but it should then fail with an error message, like this:

$ git p4 clone //depot/main/nosuchpath
Importing from //depot/main/nosuchpath into nosuchpath
Initialized empty Git repository in 
/home/lgd/p4-hacking/git/nosuchpath/.git/
Doing initial import of //depot/main/nosuchpath/ from revision #head 
into refs/remotes/p4/master
p4 returned an error: //depot/main/nosuchpath/...#head - no such file(s).

$ echo $?
1

If you get a moment can you send your command output; if it's not doing 
something like the above, then it's a bug.

Thanks!

Luke

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-21 16:53     ` Luke Diamand
@ 2015-04-23 13:42       ` FusionX86
  2015-04-24  9:20         ` Luke Diamand
  0 siblings, 1 reply; 16+ messages in thread
From: FusionX86 @ 2015-04-23 13:42 UTC (permalink / raw)
  To: Luke Diamand; +Cc: Git Users

Hi Luke,

I found a silly mistake I was making in the command I've been using.
The folder under the depot should have been capitalized, but it
wasn't. Also, I expected that if there was a problem with the command,
it would fail with some message instead of creating an empty local git
repo.

Now I'll move forward with setting up an automated and periodic sync
of P4 to Git in preparation for the migration. Thanks Luke, your
suggestions prompted me to look in the right location for the problem.


On Tue, Apr 21, 2015 at 10:53 AM, Luke Diamand <luke@diamand.org> wrote:
> Can you post up the output from 'git p4 clone', and also see what the
> output from doing this is:
>
> $ p4 print //depot/some/branch/missingfile.c
>
>
>
> On 21 April 2015 at 14:33, FusionX86 <fusionx86@gmail.com> wrote:
>> Hi Luke,
>>
>> Using -v was a good suggestion. Unfortunately I still don't see what
>> the problem is. I'm starting to think that maybe I should just create
>> the client views I need and setup a cron job that p4 syncs and then
>> git commits/pushes.
>>
>> The --preserve-user option is for submitting back to Perforce correct?
>> I'm hoping to get away with a one-way sync from Perforce to Git...and
>> then eventually just cut over to Git.
>>
>> I also looked at git fusion, but unfortunately the version of Perforce
>> we're running (2012.1) doesn't meet the requirements for fusion. I
>> wish it did.
>>
>> Good point on developer mindset. I think we definitely have some
>> training and habit changing in the future.
>>
>> Thanks for the suggestions and pointers, it's much appreciated.
>>
>> On Mon, Apr 20, 2015 at 1:26 PM, Luke Diamand <luke@diamand.org> wrote:
>>> On 20/04/15 17:41, FusionX86 wrote:
>>>>
>>>> Hello,
>>>>
>>>> Hopefully this is an appropriate place to ask questions about git-p4.
>>>>
>>>> I started at a company that wants to migrate from Perforce to Git. I'm
>>>> new to Perforce and have been trying to learn just enough about it to
>>>> get through this migration. Anyway, I've been playing with git-p4 and
>>>> have one question/problem to discuss.
>>>>
>>>> After setting up the p4 cli client I can 'p4 sync' some
>>>> //depot/main/app1 which pulls down the files I would expect from the
>>>> Perforce server. If I use 'git p4 clone //depot/main/app1', I get:
>>>>
>>>> "Doing initial import of //depot/main/app1/ from revision #head into
>>>> refs/remotes/p4/master"
>>>>
>>>> But I don't get any files from that depot/folder pulled down. I can
>>>> git p4 clone other depot/folders though and get some files. I suspect
>>>> that I'm just not understanding how the git-p4 module works.
>>>
>>>
>>> You could try doing the clone with '-v' to get a bit more information.
>>>
>>>>
>>>> Basically, I'm hoping to setup a live sync of Perforce to Git of
>>>> certain depots in preparation for the migration. Also, if anyone has
>>>> pointers or guides for this type of migration, any help is
>>>> appreciated.
>>>
>>>
>>> I've done something similar in the past. You'll want to enable the
>>> --preserve-user option, for which you will need admin rights.
>>>
>>> If it's a one-way mirror (p4-to-git) then just run git-p4 periodically (if
>>> you use cron, then try to avoid having two or more instances running at the
>>> same time).
>>>
>>> If you want it to be two-way then it gets a bit more complicated.
>>>
>>> You might also want to consider using git fusion, which is Perforce's take
>>> on this problem. I've not used it myself.
>>>
>>> From past experience though I would say the biggest problem is getting
>>> developers to switch from the P4 mindset (centralized; code review hard to
>>> do or ignored) to the git mindset (decentralized; code review actively
>>> supported by the version control system).
>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe git" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>
>>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-21 13:33   ` FusionX86
@ 2015-04-21 16:53     ` Luke Diamand
  2015-04-23 13:42       ` FusionX86
  0 siblings, 1 reply; 16+ messages in thread
From: Luke Diamand @ 2015-04-21 16:53 UTC (permalink / raw)
  To: FusionX86; +Cc: Git Users

Can you post up the output from 'git p4 clone', and also see what the
output from doing this is:

$ p4 print //depot/some/branch/missingfile.c



On 21 April 2015 at 14:33, FusionX86 <fusionx86@gmail.com> wrote:
> Hi Luke,
>
> Using -v was a good suggestion. Unfortunately I still don't see what
> the problem is. I'm starting to think that maybe I should just create
> the client views I need and setup a cron job that p4 syncs and then
> git commits/pushes.
>
> The --preserve-user option is for submitting back to Perforce correct?
> I'm hoping to get away with a one-way sync from Perforce to Git...and
> then eventually just cut over to Git.
>
> I also looked at git fusion, but unfortunately the version of Perforce
> we're running (2012.1) doesn't meet the requirements for fusion. I
> wish it did.
>
> Good point on developer mindset. I think we definitely have some
> training and habit changing in the future.
>
> Thanks for the suggestions and pointers, it's much appreciated.
>
> On Mon, Apr 20, 2015 at 1:26 PM, Luke Diamand <luke@diamand.org> wrote:
>> On 20/04/15 17:41, FusionX86 wrote:
>>>
>>> Hello,
>>>
>>> Hopefully this is an appropriate place to ask questions about git-p4.
>>>
>>> I started at a company that wants to migrate from Perforce to Git. I'm
>>> new to Perforce and have been trying to learn just enough about it to
>>> get through this migration. Anyway, I've been playing with git-p4 and
>>> have one question/problem to discuss.
>>>
>>> After setting up the p4 cli client I can 'p4 sync' some
>>> //depot/main/app1 which pulls down the files I would expect from the
>>> Perforce server. If I use 'git p4 clone //depot/main/app1', I get:
>>>
>>> "Doing initial import of //depot/main/app1/ from revision #head into
>>> refs/remotes/p4/master"
>>>
>>> But I don't get any files from that depot/folder pulled down. I can
>>> git p4 clone other depot/folders though and get some files. I suspect
>>> that I'm just not understanding how the git-p4 module works.
>>
>>
>> You could try doing the clone with '-v' to get a bit more information.
>>
>>>
>>> Basically, I'm hoping to setup a live sync of Perforce to Git of
>>> certain depots in preparation for the migration. Also, if anyone has
>>> pointers or guides for this type of migration, any help is
>>> appreciated.
>>
>>
>> I've done something similar in the past. You'll want to enable the
>> --preserve-user option, for which you will need admin rights.
>>
>> If it's a one-way mirror (p4-to-git) then just run git-p4 periodically (if
>> you use cron, then try to avoid having two or more instances running at the
>> same time).
>>
>> If you want it to be two-way then it gets a bit more complicated.
>>
>> You might also want to consider using git fusion, which is Perforce's take
>> on this problem. I've not used it myself.
>>
>> From past experience though I would say the biggest problem is getting
>> developers to switch from the P4 mindset (centralized; code review hard to
>> do or ignored) to the git mindset (decentralized; code review actively
>> supported by the version control system).
>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe git" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-20 19:26 ` Luke Diamand
@ 2015-04-21 13:33   ` FusionX86
  2015-04-21 16:53     ` Luke Diamand
  0 siblings, 1 reply; 16+ messages in thread
From: FusionX86 @ 2015-04-21 13:33 UTC (permalink / raw)
  To: Luke Diamand; +Cc: git

Hi Luke,

Using -v was a good suggestion. Unfortunately I still don't see what
the problem is. I'm starting to think that maybe I should just create
the client views I need and setup a cron job that p4 syncs and then
git commits/pushes.

The --preserve-user option is for submitting back to Perforce correct?
I'm hoping to get away with a one-way sync from Perforce to Git...and
then eventually just cut over to Git.

I also looked at git fusion, but unfortunately the version of Perforce
we're running (2012.1) doesn't meet the requirements for fusion. I
wish it did.

Good point on developer mindset. I think we definitely have some
training and habit changing in the future.

Thanks for the suggestions and pointers, it's much appreciated.

On Mon, Apr 20, 2015 at 1:26 PM, Luke Diamand <luke@diamand.org> wrote:
> On 20/04/15 17:41, FusionX86 wrote:
>>
>> Hello,
>>
>> Hopefully this is an appropriate place to ask questions about git-p4.
>>
>> I started at a company that wants to migrate from Perforce to Git. I'm
>> new to Perforce and have been trying to learn just enough about it to
>> get through this migration. Anyway, I've been playing with git-p4 and
>> have one question/problem to discuss.
>>
>> After setting up the p4 cli client I can 'p4 sync' some
>> //depot/main/app1 which pulls down the files I would expect from the
>> Perforce server. If I use 'git p4 clone //depot/main/app1', I get:
>>
>> "Doing initial import of //depot/main/app1/ from revision #head into
>> refs/remotes/p4/master"
>>
>> But I don't get any files from that depot/folder pulled down. I can
>> git p4 clone other depot/folders though and get some files. I suspect
>> that I'm just not understanding how the git-p4 module works.
>
>
> You could try doing the clone with '-v' to get a bit more information.
>
>>
>> Basically, I'm hoping to setup a live sync of Perforce to Git of
>> certain depots in preparation for the migration. Also, if anyone has
>> pointers or guides for this type of migration, any help is
>> appreciated.
>
>
> I've done something similar in the past. You'll want to enable the
> --preserve-user option, for which you will need admin rights.
>
> If it's a one-way mirror (p4-to-git) then just run git-p4 periodically (if
> you use cron, then try to avoid having two or more instances running at the
> same time).
>
> If you want it to be two-way then it gets a bit more complicated.
>
> You might also want to consider using git fusion, which is Perforce's take
> on this problem. I've not used it myself.
>
> From past experience though I would say the biggest problem is getting
> developers to switch from the P4 mindset (centralized; code review hard to
> do or ignored) to the git mindset (decentralized; code review actively
> supported by the version control system).
>
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-20 18:23 ` Sam Vilain
@ 2015-04-21 13:23   ` FusionX86
  0 siblings, 0 replies; 16+ messages in thread
From: FusionX86 @ 2015-04-21 13:23 UTC (permalink / raw)
  To: Sam Vilain; +Cc: git

Thanks Sam, I'll check it out.

On Mon, Apr 20, 2015 at 12:23 PM, Sam Vilain <sam@vilain.net> wrote:
> On 04/20/2015 09:41 AM, FusionX86 wrote:
>>
>> Hopefully this is an appropriate place to ask questions about git-p4.
>>
>> I started at a company that wants to migrate from Perforce to Git. I'm
>> new to Perforce and have been trying to learn just enough about it to
>> get through this migration.
>
>
> You might also like to check out my git-p4raw project which imports directly
> from the raw repository files into a git repo using git fast-import
>
>     http://github.com/samv/git-p4raw
>
> Apparently it's my most popular github project :-).  YMMV.
>
> Sam.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-20 16:41 FusionX86
  2015-04-20 18:23 ` Sam Vilain
@ 2015-04-20 19:26 ` Luke Diamand
  2015-04-21 13:33   ` FusionX86
  1 sibling, 1 reply; 16+ messages in thread
From: Luke Diamand @ 2015-04-20 19:26 UTC (permalink / raw)
  To: FusionX86, git

On 20/04/15 17:41, FusionX86 wrote:
> Hello,
>
> Hopefully this is an appropriate place to ask questions about git-p4.
>
> I started at a company that wants to migrate from Perforce to Git. I'm
> new to Perforce and have been trying to learn just enough about it to
> get through this migration. Anyway, I've been playing with git-p4 and
> have one question/problem to discuss.
>
> After setting up the p4 cli client I can 'p4 sync' some
> //depot/main/app1 which pulls down the files I would expect from the
> Perforce server. If I use 'git p4 clone //depot/main/app1', I get:
>
> "Doing initial import of //depot/main/app1/ from revision #head into
> refs/remotes/p4/master"
>
> But I don't get any files from that depot/folder pulled down. I can
> git p4 clone other depot/folders though and get some files. I suspect
> that I'm just not understanding how the git-p4 module works.

You could try doing the clone with '-v' to get a bit more information.

>
> Basically, I'm hoping to setup a live sync of Perforce to Git of
> certain depots in preparation for the migration. Also, if anyone has
> pointers or guides for this type of migration, any help is
> appreciated.

I've done something similar in the past. You'll want to enable the 
--preserve-user option, for which you will need admin rights.

If it's a one-way mirror (p4-to-git) then just run git-p4 periodically 
(if you use cron, then try to avoid having two or more instances running 
at the same time).

If you want it to be two-way then it gets a bit more complicated.

You might also want to consider using git fusion, which is Perforce's 
take on this problem. I've not used it myself.

 From past experience though I would say the biggest problem is getting 
developers to switch from the P4 mindset (centralized; code review hard 
to do or ignored) to the git mindset (decentralized; code review 
actively supported by the version control system).

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 Question
  2015-04-20 16:41 FusionX86
@ 2015-04-20 18:23 ` Sam Vilain
  2015-04-21 13:23   ` FusionX86
  2015-04-20 19:26 ` Luke Diamand
  1 sibling, 1 reply; 16+ messages in thread
From: Sam Vilain @ 2015-04-20 18:23 UTC (permalink / raw)
  To: FusionX86, git

On 04/20/2015 09:41 AM, FusionX86 wrote:
> Hopefully this is an appropriate place to ask questions about git-p4.
>
> I started at a company that wants to migrate from Perforce to Git. I'm
> new to Perforce and have been trying to learn just enough about it to
> get through this migration.

You might also like to check out my git-p4raw project which imports 
directly from the raw repository files into a git repo using git fast-import

     http://github.com/samv/git-p4raw

Apparently it's my most popular github project :-).  YMMV.

Sam.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* git-p4 Question
@ 2015-04-20 16:41 FusionX86
  2015-04-20 18:23 ` Sam Vilain
  2015-04-20 19:26 ` Luke Diamand
  0 siblings, 2 replies; 16+ messages in thread
From: FusionX86 @ 2015-04-20 16:41 UTC (permalink / raw)
  To: git

Hello,

Hopefully this is an appropriate place to ask questions about git-p4.

I started at a company that wants to migrate from Perforce to Git. I'm
new to Perforce and have been trying to learn just enough about it to
get through this migration. Anyway, I've been playing with git-p4 and
have one question/problem to discuss.

After setting up the p4 cli client I can 'p4 sync' some
//depot/main/app1 which pulls down the files I would expect from the
Perforce server. If I use 'git p4 clone //depot/main/app1', I get:

"Doing initial import of //depot/main/app1/ from revision #head into
refs/remotes/p4/master"

But I don't get any files from that depot/folder pulled down. I can
git p4 clone other depot/folders though and get some files. I suspect
that I'm just not understanding how the git-p4 module works.

Basically, I'm hoping to setup a live sync of Perforce to Git of
certain depots in preparation for the migration. Also, if anyone has
pointers or guides for this type of migration, any help is
appreciated.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 question
  2007-08-10 15:17     ` Govind Salinas
@ 2007-08-10 16:25       ` Alex Riesen
  0 siblings, 0 replies; 16+ messages in thread
From: Alex Riesen @ 2007-08-10 16:25 UTC (permalink / raw)
  To: Govind Salinas; +Cc: git

On 8/10/07, Govind Salinas <govindsalinas@gmail.com> wrote:
> I am having some problems running the script.  It seems that (line
> 1425) $f->{sha1} is uninitialized and causing the import to fail (the
> perforce path is missing the leading "//" I don't know if that is
> intentional).

the line in question deals with local pathnames, so it is expected.
What i don't understand is how did you manage to have the file
without sha1... Could you put a

 print "$tmpfile\n";

after line 1400?
 open($ft,'>',$tmpfile) or die "$tmpfile: $!\n";

and run git-p4-import -v -v -v?
Than it possible to compare lists of the files which is acquired
through p4 change with the list of files output by p4 print.

What perforce client version do you have, BTW?

>  Let me know if you want to continue this off list since
> it isn't really a part of git.

It isn't. We can continue privately

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 question
  2007-08-10  8:10   ` Alex Riesen
@ 2007-08-10 15:17     ` Govind Salinas
  2007-08-10 16:25       ` Alex Riesen
  0 siblings, 1 reply; 16+ messages in thread
From: Govind Salinas @ 2007-08-10 15:17 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

I am having some problems running the script.  It seems that (line
1425) $f->{sha1} is uninitialized and causing the import to fail (the
perforce path is missing the leading "//" I don't know if that is
intentional).  Let me know if you want to continue this off list since
it isn't really a part of git.

On 8/10/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> On 8/10/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> > On 8/10/07, Govind Salinas <govindsalinas@gmail.com> wrote:
> > > If I can just sync from p4 and then sync my binary share and THEN tell
> > > git-p4 that //depot/my/product/... maps to c:\path\src\realworkhere,
> > > get it to import history etc,  then I would be set.
> >
> > git-p4-import.bat can import a state from the client have-list,
> > but it does not import the history. It can import the history
> > separately, so that you can stitch it into a merge which will be
> > the state imported from the client. Complicated, but I couldn't
> > bring myself to figure out the history automatically.
>
> Err, example:
>
> Import a state from p4 client:
>
>   git-p4-import -y -c client-name -e
>
> Import p4 history of a path mapping:
>
>   git-p4-import --p4-path //perforce/path \
>     --local-path very-local-path \
>     --p4-range '@1234,5678' \
>     --start start-commit \
>     --branch branch-name
>
> The last argument (--branch) is optional, will just store the last imported
> commit there. start-commit will be assumed current HEAD, if omitted.
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 question
  2007-08-10  8:06 ` Alex Riesen
@ 2007-08-10  8:10   ` Alex Riesen
  2007-08-10 15:17     ` Govind Salinas
  0 siblings, 1 reply; 16+ messages in thread
From: Alex Riesen @ 2007-08-10  8:10 UTC (permalink / raw)
  To: Govind Salinas; +Cc: git

On 8/10/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> On 8/10/07, Govind Salinas <govindsalinas@gmail.com> wrote:
> > If I can just sync from p4 and then sync my binary share and THEN tell
> > git-p4 that //depot/my/product/... maps to c:\path\src\realworkhere,
> > get it to import history etc,  then I would be set.
>
> git-p4-import.bat can import a state from the client have-list,
> but it does not import the history. It can import the history
> separately, so that you can stitch it into a merge which will be
> the state imported from the client. Complicated, but I couldn't
> bring myself to figure out the history automatically.

Err, example:

Import a state from p4 client:

  git-p4-import -y -c client-name -e

Import p4 history of a path mapping:

  git-p4-import --p4-path //perforce/path \
    --local-path very-local-path \
    --p4-range '@1234,5678' \
    --start start-commit \
    --branch branch-name

The last argument (--branch) is optional, will just store the last imported
commit there. start-commit will be assumed current HEAD, if omitted.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: git-p4 question
  2007-08-10  2:53 git-p4 question Govind Salinas
@ 2007-08-10  8:06 ` Alex Riesen
  2007-08-10  8:10   ` Alex Riesen
  0 siblings, 1 reply; 16+ messages in thread
From: Alex Riesen @ 2007-08-10  8:06 UTC (permalink / raw)
  To: Govind Salinas; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

On 8/10/07, Govind Salinas <govindsalinas@gmail.com> wrote:
> If I can just sync from p4 and then sync my binary share and THEN tell
> git-p4 that //depot/my/product/... maps to c:\path\src\realworkhere,
> get it to import history etc,  then I would be set.

git-p4-import.bat can import a state from the client have-list,
but it does not import the history. It can import the history
separately, so that you can stitch it into a merge which will be
the state imported from the client. Complicated, but I couldn't
bring myself to figure out the history automatically.

The script attached (sorry for .gz, gmail wont let me send a .bat).

[-- Attachment #2: git-p4-import.gz --]
[-- Type: application/x-gzip, Size: 15646 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* git-p4 question
@ 2007-08-10  2:53 Govind Salinas
  2007-08-10  8:06 ` Alex Riesen
  0 siblings, 1 reply; 16+ messages in thread
From: Govind Salinas @ 2007-08-10  2:53 UTC (permalink / raw)
  To: git

Hi All,

Me again with more dumb git-perforce questions.

I have been toying with git-p4 and I think it does everything I want
except the crazy client map support.  I figure I don't really need
this.  My client is something like this:

//depot/sane/... //clientroot/crazy/...
//depot/stuff/... //clientroot/dumb/...
//depot/otherstuff/... //clientroot/dumb/...
//depot/my/product/... //clientroot/src/realworkhere/...

My "working directory" looks something like this:

c:\path\crazy\xyz_from_perforce
c:\path\crazy\abc_from_huge_binary_fileshare_notinp4
c:\path\dumb\...
c:\path\src\realworkhere\...

If I can just sync from p4 and then sync my binary share and THEN tell
git-p4 that //depot/my/product/... maps to c:\path\src\realworkhere,
get it to import history etc,  then I would be set.

Is this at all possible to do with git-p4?

If not, what sort of work would be necessary to add that (considering
that I am a git noob).

Thanks for the help.

-Govind

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-04-26 22:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 16:29 git-p4 Question Fusion Xavier
  -- strict thread matches above, loose matches on Subject: below --
2015-04-20 16:41 FusionX86
2015-04-20 18:23 ` Sam Vilain
2015-04-21 13:23   ` FusionX86
2015-04-20 19:26 ` Luke Diamand
2015-04-21 13:33   ` FusionX86
2015-04-21 16:53     ` Luke Diamand
2015-04-23 13:42       ` FusionX86
2015-04-24  9:20         ` Luke Diamand
2015-04-24 14:36           ` FusionX86
2015-04-26 22:27             ` Luke Diamand
2007-08-10  2:53 git-p4 question Govind Salinas
2007-08-10  8:06 ` Alex Riesen
2007-08-10  8:10   ` Alex Riesen
2007-08-10 15:17     ` Govind Salinas
2007-08-10 16:25       ` Alex Riesen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.