{"thread":{"id":"15385","subject":"git-p4 and changing p4 depot path","startedAt":"2008-09-05T16:47:25Z","lastAt":"2008-09-05T18:54:34Z","messageCount":3,"participants":["Kevin Williams","Tor Arvid Lund"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89854","messageId":"683a886f0809050947k3b461495u459607dccf891698@mail.gmail.com","threadId":"15385","inReplyTo":null,"subject":"git-p4 and changing p4 depot path","fromName":"Kevin Williams","fromEmail":"kevwil@gmail.com","sentAt":"2008-09-05T16:47:25Z","receivedAt":"2008-09-05T16:47:25Z","isPatch":false,"sender":{"key":"kevwil@gmail.com","avatar":"https://gravatar.com/avatar/a5087ab27d9fbcda120c6bdfa737a4b7c81172f98eb1c1774e9c96514f570fbd?d=mp&s=160"},"body":"I've got some code I've been working on in a local git repository that\nI cloned from Perforce using git-p4. Now, I need to commit my changes\nto a *different depot path* within Perforce. Since the p4 depot path\nis stored in the logs rather than config, and logs are immutable\nbecause commits are immutable, it seems I cannot do this. Is there any\nway to do this? Why isn't the depot path stored in config? Please\nhelp!\n\n-- \nCheers,\n\nKevin Williams\nhttp://kevwil.com/\n"},{"id":"89858","messageId":"1a6be5fa0809051104g59e08b2dya37add721483d390@mail.gmail.com","threadId":"15385","inReplyTo":"683a886f0809050947k3b461495u459607dccf891698@mail.gmail.com","subject":"Re: git-p4 and changing p4 depot path","fromName":"Tor Arvid Lund","fromEmail":"torarvid@gmail.com","sentAt":"2008-09-05T18:04:10Z","receivedAt":"2008-09-05T18:04:10Z","isPatch":false,"sender":{"key":"torarvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/439758?v=4"},"body":"Hi,\n\nOn Fri, Sep 5, 2008 at 6:47 PM, Kevin Williams <kevwil@gmail.com> wrote:\n> I've got some code I've been working on in a local git repository that\n> I cloned from Perforce using git-p4. Now, I need to commit my changes\n> to a *different depot path* within Perforce. Since the p4 depot path\n> is stored in the logs rather than config, and logs are immutable\n> because commits are immutable, it seems I cannot do this. Is there any\n> way to do this? Why isn't the depot path stored in config? Please\n> help!\n\nI'm not sure I understand why you want to commit to a different\npath... Is is just another branch in p4?\n\nIn that case, git-p4 already has some support for working with all\nbranches of a project, given that they all reside under a common path,\nlike:\n\n//depot/path/to/project/MAIN\n//depot/path/to/project/REL_1_4\n\n... where MAIN and REL_1_4 are branches of 'project'. This can be\ncloned by invoking\n\ngit p4 clone --detect-branches //depot/path/to/project@all\n\nWhen you are ready to push your git commits to p4, git-p4 will use the\nlog message of the nearest parent commit from p4 to determine which\ndepot path (branch) to use. In this way, you can commit your work to\ndifferent p4 branches.\n\n-Tor Arvid Lund-\n"},{"id":"89862","messageId":"683a886f0809051154r4b8a8121j7e0b7694ad728661@mail.gmail.com","threadId":"15385","inReplyTo":"1a6be5fa0809051104g59e08b2dya37add721483d390@mail.gmail.com","subject":"Re: git-p4 and changing p4 depot path","fromName":"Kevin Williams","fromEmail":"kevwil@gmail.com","sentAt":"2008-09-05T18:54:34Z","receivedAt":"2008-09-05T18:54:34Z","isPatch":false,"sender":{"key":"kevwil@gmail.com","avatar":"https://gravatar.com/avatar/a5087ab27d9fbcda120c6bdfa737a4b7c81172f98eb1c1774e9c96514f570fbd?d=mp&s=160"},"body":"Thanks for the detailed explanation. That will definitely come in\nhandy next time.\n\nI was working against one path, then was told to commit to a p4 branch location.\n\nI ended up copying my files in the git-p4 working dir over to the p4\nworking dir and committing from there, so not a problem anymore, but\nI'm impressed that there's a way to do it right from git-p4.\n\nNow if I could just convince IT to switch to git .... :)\n\nOn Fri, Sep 5, 2008 at 12:04 PM, Tor Arvid Lund <torarvid@gmail.com> wrote:\n> Hi,\n>\n> On Fri, Sep 5, 2008 at 6:47 PM, Kevin Williams <kevwil@gmail.com> wrote:\n>> I've got some code I've been working on in a local git repository that\n>> I cloned from Perforce using git-p4. Now, I need to commit my changes\n>> to a *different depot path* within Perforce. Since the p4 depot path\n>> is stored in the logs rather than config, and logs are immutable\n>> because commits are immutable, it seems I cannot do this. Is there any\n>> way to do this? Why isn't the depot path stored in config? Please\n>> help!\n>\n> I'm not sure I understand why you want to commit to a different\n> path... Is is just another branch in p4?\n>\n> In that case, git-p4 already has some support for working with all\n> branches of a project, given that they all reside under a common path,\n> like:\n>\n> //depot/path/to/project/MAIN\n> //depot/path/to/project/REL_1_4\n>\n> ... where MAIN and REL_1_4 are branches of 'project'. This can be\n> cloned by invoking\n>\n> git p4 clone --detect-branches //depot/path/to/project@all\n>\n> When you are ready to push your git commits to p4, git-p4 will use the\n> log message of the nearest parent commit from p4 to determine which\n> depot path (branch) to use. In this way, you can commit your work to\n> different p4 branches.\n>\n> -Tor Arvid Lund-\n>\n\n\n\n-- \nCheers,\n\nKevin Williams\nhttp://kevwil.com/\n"}]}