{"thread":{"id":"30441","subject":"git svn dcommit <branch> committed to trunk anyway","startedAt":"2012-05-06T13:00:53Z","lastAt":"2012-05-07T14:17:22Z","messageCount":5,"participants":["Jon Seymour","Thomas Rast"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"190908","messageId":"CAH3AnroP+ckzgijibPDEupBCfUFu5Bwsq8YP58h+igXoJyJEyg@mail.gmail.com","threadId":"30441","inReplyTo":null,"subject":"git svn dcommit <branch> committed to trunk anyway","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2012-05-06T13:00:53Z","receivedAt":"2012-05-06T13:00:53Z","isPatch":false,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"I expected git svn dcommit <branch> to push commits into the svn\nbranch called <branch> (a repo relative URL of\n/branches/foobar1/foobar2/<branch>)\n\nHowever, it decided to push into trunk instead, which was not the\nintended effect.\n\nWhat have I misunderstood about how git svn dcommit is supposed to work?\n\njon.\n"},{"id":"190977","messageId":"87txzsba0o.fsf@thomas.inf.ethz.ch","threadId":"30441","inReplyTo":"CAH3AnroP+ckzgijibPDEupBCfUFu5Bwsq8YP58h+igXoJyJEyg@mail.gmail.com","subject":"Re: git svn dcommit <branch> committed to trunk anyway","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2012-05-07T09:44:39Z","receivedAt":"2012-05-07T09:44:39Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Jon Seymour <jon.seymour@gmail.com> writes:\n\n> I expected git svn dcommit <branch> to push commits into the svn\n> branch called <branch> (a repo relative URL of\n> /branches/foobar1/foobar2/<branch>)\n>\n> However, it decided to push into trunk instead, which was not the\n> intended effect.\n>\n> What have I misunderstood about how git svn dcommit is supposed to work?\n\nDid the commits you dcommitted have any git-svn-id lines?  It dcommits\n(or at least it's supposed to :-) in the directory listed in the\ngit-svn-id line found by (roughly)\n\n  git log --first-parent -1 --grep=^git-svn-id:\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"190988","messageId":"CAH3Anrq5SGZZsTpKd1MFBRVD8xzsUvckt6d-BxtTYYce--F1+g@mail.gmail.com","threadId":"30441","inReplyTo":"87txzsba0o.fsf@thomas.inf.ethz.ch","subject":"Re: git svn dcommit <branch> committed to trunk anyway","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2012-05-07T11:38:56Z","receivedAt":"2012-05-07T11:38:56Z","isPatch":false,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"On Mon, May 7, 2012 at 3:14 PM, Thomas Rast <trast@student.ethz.ch> wrote:\n> Jon Seymour <jon.seymour@gmail.com> writes:\n>\n>> I expected git svn dcommit <branch> to push commits into the svn\n>> branch called <branch> (a repo relative URL of\n>> /branches/foobar1/foobar2/<branch>)\n>>\n>> However, it decided to push into trunk instead, which was not the\n>> intended effect.\n>>\n>> What have I misunderstood about how git svn dcommit is supposed to work?\n>\n> Did the commits you dcommitted have any git-svn-id lines?  It dcommits\n> (or at least it's supposed to :-) in the directory listed in the\n> git-svn-id line found by (roughly)\n>\n>  git log --first-parent -1 --grep=^git-svn-id:\n>\n\nNone of the commits that dcommit committed to svn had such lines, but\nthe immediately preceding commit did, and that commit referred to the\ntrunk URL, rather than the branch URL.\n\nI guess I am confused by this guidance in git-svn(1) in the section on dcommit:\n\n    \"An optional revision or branch argument may be specified, and\ncauses git svn to do all work on that revision/branch instead of\nHEAD\":\n\nI had assumed that dcommit would respect the optional (SVN branch)\nargument that I had specified, but it seems that this is not the case.\nWhat do the words in the man page actually mean, if they don't mean\nwhat I thought they meant.  Do the words \"optional revision or branch\"\nactually refer to the git commit/branch rather than the SVN\nrevision/branch?\n\nRegards,\n\njlon.\n\n\n> --\n> Thomas Rast\n> trast@{inf,student}.ethz.ch\n"},{"id":"190989","messageId":"87havs6v9s.fsf@thomas.inf.ethz.ch","threadId":"30441","inReplyTo":"CAH3Anrq5SGZZsTpKd1MFBRVD8xzsUvckt6d-BxtTYYce--F1+g@mail.gmail.com","subject":"Re: git svn dcommit <branch> committed to trunk anyway","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2012-05-07T12:16:47Z","receivedAt":"2012-05-07T12:16:47Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Jon Seymour <jon.seymour@gmail.com> writes:\n\n> I guess I am confused by this guidance in git-svn(1) in the section on dcommit:\n>\n>     \"An optional revision or branch argument may be specified, and\n> causes git svn to do all work on that revision/branch instead of\n> HEAD\":\n>\n> I had assumed that dcommit would respect the optional (SVN branch)\n> argument that I had specified, but it seems that this is not the case.\n> What do the words in the man page actually mean, if they don't mean\n> what I thought they meant.  Do the words \"optional revision or branch\"\n> actually refer to the git commit/branch rather than the SVN\n> revision/branch?\n\nOh, now I understand.  Yes, specifying a revision C there acts mostly as\nif you said\n\n  git checkout C^0\n  git svn dcommit\n  git checkout -\n\n(IIRC, I haven't used it in a while).\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"191001","messageId":"CAH3Anroub3a1+Nsj5C-ecTqaX9riUG7T27bHZYJOHiPJbeVCTQ@mail.gmail.com","threadId":"30441","inReplyTo":"87havs6v9s.fsf@thomas.inf.ethz.ch","subject":"Re: git svn dcommit <branch> committed to trunk anyway","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2012-05-07T14:17:22Z","receivedAt":"2012-05-07T14:17:22Z","isPatch":false,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"On Mon, May 7, 2012 at 5:46 PM, Thomas Rast <trast@student.ethz.ch> wrote:\n> Jon Seymour <jon.seymour@gmail.com> writes:\n> Oh, now I understand.  Yes, specifying a revision C there acts mostly as\n> if you said\n>\n>  git checkout C^0\n>  git svn dcommit\n>  git checkout -\n>\n\nOk, I see my mistake - I had created the branch in SVN (using external\nmeans, since git svn branch doesn't use an HTTP proxy), had failed to\nfetch and then rebase my work onto remotes/<branch> and do the commit\nfrom there. If I had done that, it would have worked as expected.\n\nThanks for your help.\n"}]}