Re: git to p4 conversion

6 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: git to p4 conversion

From: Endre Czirbesz <hidden>
Date: 2016-06-15 22:50:30

Hi Vitor,

2011/2/4 Vitor Antunes [off-list ref]:
quoted
I dropped the whole directory, and then recreated it, I do not know
any better 'cleanup'. :)
Which directory did you drop? Was is the git repository or the P4 workspace?
You need to clean up the later. Basically, a "rm -rf
path/to/p4_workspace" and a "p4 sync -f" should do the trick :)
It is almost the same in my case. :)
My p4 client root is ~/work/, my project dir is ~/work/projdir (and at
the moment this is the only directory within ~/work/), and I dropped
the latter.
And then it was created again by git-p4 clone.

I can drop the workspace root, but I do not think it would help.

Regards,

Endre

Re: git to p4 conversion

From: Tor Arvid Lund <hidden>
Date: 2016-06-15 22:50:30

On Fri, Feb 4, 2011 at 5:52 PM, Endre Czirbesz [off-list ref] wrote:
Hi Vitor,

2011/2/4 Vitor Antunes [off-list ref]:
quoted
quoted
I dropped the whole directory, and then recreated it, I do not know
any better 'cleanup'. :)
Which directory did you drop? Was is the git repository or the P4 workspace?
You need to clean up the later. Basically, a "rm -rf
path/to/p4_workspace" and a "p4 sync -f" should do the trick :)
It is almost the same in my case. :)
My p4 client root is ~/work/, my project dir is ~/work/projdir (and at
the moment this is the only directory within ~/work/), and I dropped
the latter.
And then it was created again by git-p4 clone.
I... wonder if we're maybe talking past one another here...

Let's take a few things from the top, just in case... If we think
about the perforce setup (before we start doing any git stuff)... You
have a perforce workspace/client-spec, right? That is - a setup that
tells perforce where you want the files to be placed on your hard
drive when you do a standard "p4 sync". Let's call it ~/p4root/ and
let us say that your project will then be synced by perforce to
~/p4root/myproj/

When you want to do a git-p4 clone, you should definitely be *outside*
of ~/p4root/ . Let's say we have a ~/gitroot/ as well. So do cd
~/gitroot/ so that the git-p4 clone will be under ~/gitroot/myproj/ ;
and then do all the git-p4 stuff (clone, add remote, fetch, rebase,
sync, submit).

I think Vitors point was that before you do git-p4 submit, you should
clean - not ~/gitroot/myproj - but ~/p4root/myproj/.

This is probably not something that you need to do everytime you want
to submit back to perforce, but since we have had some rounds with
trial-and-error with this, we have probably placed some dirty files
inside the perforce folders... Make sure that you don't have files
opened in perforce before you sync.

Clearer? More confused? Best of luck anyway :)

    -- Tor Arvid

Re: git to p4 conversion

From: Vitor Antunes <hidden>
Date: 2016-06-15 22:50:30

Hi Tor,

On Sat, Feb 5, 2011 at 12:53 AM, Tor Arvid Lund [off-list ref] wrote:
I... wonder if we're maybe talking past one another here...

Let's take a few things from the top, just in case... If we think
about the perforce setup (before we start doing any git stuff)... You
have a perforce workspace/client-spec, right? That is - a setup that
tells perforce where you want the files to be placed on your hard
drive when you do a standard "p4 sync". Let's call it ~/p4root/ and
let us say that your project will then be synced by perforce to
~/p4root/myproj/

When you want to do a git-p4 clone, you should definitely be *outside*
of ~/p4root/ . Let's say we have a ~/gitroot/ as well. So do cd
~/gitroot/ so that the git-p4 clone will be under ~/gitroot/myproj/ ;
and then do all the git-p4 stuff (clone, add remote, fetch, rebase,
sync, submit).

I think Vitors point was that before you do git-p4 submit, you should
clean - not ~/gitroot/myproj - but ~/p4root/myproj/.

This is probably not something that you need to do everytime you want
to submit back to perforce, but since we have had some rounds with
trial-and-error with this, we have probably placed some dirty files
inside the perforce folders... Make sure that you don't have files
opened in perforce before you sync.

Clearer? More confused? Best of luck anyway :)

   -- Tor Arvid
Yeah, I think we're in sync here. I'm almost sure your (much more
detailed) instructions will solve Endre's problem :)

Kind regards,
-- 
Vitor Antunes

Re: git to p4 conversion

From: Endre Czirbesz <hidden>
Date: 2016-06-15 22:50:31

Hi,

Thanks for your patience and the detailed help.
I forgot only one thing, that I need two separate directories... :)

So, after some minor mods in git-p4 (I have some directories with
spaces, and some files with #@*% in their names), it seems as if it
worked, my files are in P4 depot, although I got an error message:

Failed to merge in the changes.
Patch failed at 0001 Initial commit

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

Exception: command failed: git rebase remotes/p4/master

Regards,

Endre

Re: git to p4 conversion

From: Tor Arvid Lund <hidden>
Date: 2016-06-15 22:50:31

On Mon, Feb 7, 2011 at 2:57 PM, Endre Czirbesz [off-list ref] wrote:
Hi,

Thanks for your patience and the detailed help.
I forgot only one thing, that I need two separate directories... :)

So, after some minor mods in git-p4 (I have some directories with
spaces, and some files with #@*% in their names), it seems as if it
worked, my files are in P4 depot, although I got an error message:

Failed to merge in the changes.
Patch failed at 0001 Initial commit

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

Exception: command failed: git rebase remotes/p4/master
Maybe you could run "git p4 submit --verbose"? (the 'verbose' option
might give you a clue as to what the underlying problem is)

    -- Tor Arvid
Regards,

Endre

Re: git to p4 conversion

From: Endre Czirbesz <hidden>
Date: 2016-06-15 22:50:31

2011/2/7 Tor Arvid Lund [off-list ref]:
Maybe you could run "git p4 submit --verbose"? (the 'verbose' option
might give you a clue as to what the underlying problem is)
I did that actually, just did not want to send the whole output. :)

I will investigate it further, but my boss gave a new highest priority
task for me... :(

Endre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help