* git-p4 and changing p4 depot path @ 2008-09-05 16:47 Kevin Williams 2008-09-05 18:04 ` Tor Arvid Lund 0 siblings, 1 reply; 3+ messages in thread From: Kevin Williams @ 2008-09-05 16:47 UTC (permalink / raw) To: git I've got some code I've been working on in a local git repository that I cloned from Perforce using git-p4. Now, I need to commit my changes to a *different depot path* within Perforce. Since the p4 depot path is stored in the logs rather than config, and logs are immutable because commits are immutable, it seems I cannot do this. Is there any way to do this? Why isn't the depot path stored in config? Please help! -- Cheers, Kevin Williams http://kevwil.com/ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-p4 and changing p4 depot path 2008-09-05 16:47 git-p4 and changing p4 depot path Kevin Williams @ 2008-09-05 18:04 ` Tor Arvid Lund 2008-09-05 18:54 ` Kevin Williams 0 siblings, 1 reply; 3+ messages in thread From: Tor Arvid Lund @ 2008-09-05 18:04 UTC (permalink / raw) To: Kevin Williams; +Cc: git Hi, On Fri, Sep 5, 2008 at 6:47 PM, Kevin Williams <kevwil@gmail.com> wrote: > I've got some code I've been working on in a local git repository that > I cloned from Perforce using git-p4. Now, I need to commit my changes > to a *different depot path* within Perforce. Since the p4 depot path > is stored in the logs rather than config, and logs are immutable > because commits are immutable, it seems I cannot do this. Is there any > way to do this? Why isn't the depot path stored in config? Please > help! I'm not sure I understand why you want to commit to a different path... Is is just another branch in p4? In that case, git-p4 already has some support for working with all branches of a project, given that they all reside under a common path, like: //depot/path/to/project/MAIN //depot/path/to/project/REL_1_4 ... where MAIN and REL_1_4 are branches of 'project'. This can be cloned by invoking git p4 clone --detect-branches //depot/path/to/project@all When you are ready to push your git commits to p4, git-p4 will use the log message of the nearest parent commit from p4 to determine which depot path (branch) to use. In this way, you can commit your work to different p4 branches. -Tor Arvid Lund- ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-p4 and changing p4 depot path 2008-09-05 18:04 ` Tor Arvid Lund @ 2008-09-05 18:54 ` Kevin Williams 0 siblings, 0 replies; 3+ messages in thread From: Kevin Williams @ 2008-09-05 18:54 UTC (permalink / raw) To: Tor Arvid Lund; +Cc: git Thanks for the detailed explanation. That will definitely come in handy next time. I was working against one path, then was told to commit to a p4 branch location. I ended up copying my files in the git-p4 working dir over to the p4 working dir and committing from there, so not a problem anymore, but I'm impressed that there's a way to do it right from git-p4. Now if I could just convince IT to switch to git .... :) On Fri, Sep 5, 2008 at 12:04 PM, Tor Arvid Lund <torarvid@gmail.com> wrote: > Hi, > > On Fri, Sep 5, 2008 at 6:47 PM, Kevin Williams <kevwil@gmail.com> wrote: >> I've got some code I've been working on in a local git repository that >> I cloned from Perforce using git-p4. Now, I need to commit my changes >> to a *different depot path* within Perforce. Since the p4 depot path >> is stored in the logs rather than config, and logs are immutable >> because commits are immutable, it seems I cannot do this. Is there any >> way to do this? Why isn't the depot path stored in config? Please >> help! > > I'm not sure I understand why you want to commit to a different > path... Is is just another branch in p4? > > In that case, git-p4 already has some support for working with all > branches of a project, given that they all reside under a common path, > like: > > //depot/path/to/project/MAIN > //depot/path/to/project/REL_1_4 > > ... where MAIN and REL_1_4 are branches of 'project'. This can be > cloned by invoking > > git p4 clone --detect-branches //depot/path/to/project@all > > When you are ready to push your git commits to p4, git-p4 will use the > log message of the nearest parent commit from p4 to determine which > depot path (branch) to use. In this way, you can commit your work to > different p4 branches. > > -Tor Arvid Lund- > -- Cheers, Kevin Williams http://kevwil.com/ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-05 18:55 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-09-05 16:47 git-p4 and changing p4 depot path Kevin Williams 2008-09-05 18:04 ` Tor Arvid Lund 2008-09-05 18:54 ` Kevin Williams
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).