{"thread":{"id":"11373","subject":"Commit a series of patches to SVN without rebase","startedAt":"2007-12-20T16:40:45Z","lastAt":"2008-01-02T03:11:02Z","messageCount":4,"participants":["Jörg Sommer","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"63870","messageId":"20071220164044.GA22683@alea.gnuu.de","threadId":"11373","inReplyTo":null,"subject":"Commit a series of patches to SVN without rebase","fromName":"Jörg Sommer","fromEmail":"joerg@alea.gnuu.de","sentAt":"2007-12-20T16:40:45Z","receivedAt":"2007-12-20T16:40:45Z","isPatch":false,"sender":{"key":"joerg@alea.gnuu.de","avatar":null},"body":"Hi,\n\nI've a number of patches in git I want to send to a SVN repository. git\nsvn dcommit does a rebase after each commit which makes the whole commit\ntakes very long. Is it possible to skip the rebase? All patches are in\none branch without merges, a simple chain. Is it save to use --no-rebase\nin this case?\n\nBye, Jörg\n-- \nDer Klügere gibt so lange nach bis er der Dumme ist.\n"},{"id":"63980","messageId":"20071222045340.GA21524@soma","threadId":"11373","inReplyTo":"20071220164044.GA22683@alea.gnuu.de","subject":"Re: Commit a series of patches to SVN without rebase","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-12-22T04:53:40Z","receivedAt":"2007-12-22T04:53:40Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jörg Sommer <joerg@alea.gnuu.de> wrote:\n> Hi,\n> \n> I've a number of patches in git I want to send to a SVN repository. git\n> svn dcommit does a rebase after each commit which makes the whole commit\n> takes very long. Is it possible to skip the rebase? All patches are in\n> one branch without merges, a simple chain. Is it save to use --no-rebase\n> in this case?\n\nRight now, only if the changes don't depend on each other (they all\nmodify different files).\n\nThe following patch should allow dcommit of multiple changes that depend\non each other with --no-rebase.  --no-rebase was Karl's idea, and I've\nnever used it myself so I don't know how it works.\n\nI don't have time to write a test case for --no-rebase at the\nmoment, but any reports/feedback would be helpful.  Thanks.\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex c51f1e7..9b1113a 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -418,7 +418,7 @@ sub cmd_dcommit {\n \t\twarn \"Attempting to commit more than one change while \",\n \t\t     \"--no-rebase is enabled.\\n\",\n \t\t     \"If these changes depend on each other, re-running \",\n-\t\t     \"without --no-rebase will be required.\"\n+\t\t     \"without --no-rebase may be required.\"\n \t}\n \twhile (1) {\n \t\tmy $d = shift @$linear_refs or last;\n@@ -453,6 +453,7 @@ sub cmd_dcommit {\n \t\t\t\t                               $parents->{$d};\n \t\t\t}\n \t\t\t$_fetch_all ? $gs->fetch_all : $gs->fetch;\n+\t\t\t$last_rev = $cmt_rev;\n \t\t\tnext if $_no_rebase;\n \n \t\t\t# we always want to rebase against the current HEAD,\n@@ -512,7 +513,6 @@ sub cmd_dcommit {\n \t\t\t\t$parents = \\%p;\n \t\t\t\t$linear_refs = \\@l;\n \t\t\t}\n-\t\t\t$last_rev = $cmt_rev;\n \t\t}\n \t}\n \tunlink $gs->{index};\n\n-- \nEric Wong\n"},{"id":"64059","messageId":"slrnfmttoo.28m.joerg@alea.gnuu.de","threadId":"11373","inReplyTo":"20071222045340.GA21524@soma","subject":"Re: Commit a series of patches to SVN without rebase","fromName":"Jörg Sommer","fromEmail":"joerg@alea.gnuu.de","sentAt":"2007-12-23T23:59:13Z","receivedAt":"2007-12-23T23:59:13Z","isPatch":false,"sender":{"key":"joerg@alea.gnuu.de","avatar":null},"body":"Hi Eric,\n\nEric Wong <normalperson@yhbt.net> wrote:\n> Jörg Sommer <joerg@alea.gnuu.de> wrote:\n>> I've a number of patches in git I want to send to a SVN repository. git\n>> svn dcommit does a rebase after each commit which makes the whole commit\n>> takes very long. Is it possible to skip the rebase? All patches are in\n>> one branch without merges, a simple chain. Is it save to use --no-rebase\n>> in this case?\n>\n> Right now, only if the changes don't depend on each other (they all\n> modify different files).\n\nMay I ask you what the rational behind doing a rebase every time is? Is\nit needed? Why is it not possible to send all commits and do one rebase\nafter the last one?\n\nBye, Jörg.\n-- \nWer A sagt, muß nicht B sagen. Er kann auch erkennen, daß A falsch war.\n      \t    \t      \t       \t       \t    \t(Erich Kästner)\n"},{"id":"64311","messageId":"20080102031102.GA11711@untitled","threadId":"11373","inReplyTo":"slrnfmttoo.28m.joerg@alea.gnuu.de","subject":"Re: Commit a series of patches to SVN without rebase","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-01-02T03:11:02Z","receivedAt":"2008-01-02T03:11:02Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jörg Sommer <joerg@alea.gnuu.de> wrote:\n> Hi Eric,\n> \n> Eric Wong <normalperson@yhbt.net> wrote:\n> > Jörg Sommer <joerg@alea.gnuu.de> wrote:\n> >> I've a number of patches in git I want to send to a SVN repository. git\n> >> svn dcommit does a rebase after each commit which makes the whole commit\n> >> takes very long. Is it possible to skip the rebase? All patches are in\n> >> one branch without merges, a simple chain. Is it save to use --no-rebase\n> >> in this case?\n> >\n> > Right now, only if the changes don't depend on each other (they all\n> > modify different files).\n> \n> May I ask you what the rational behind doing a rebase every time is? Is\n> it needed? Why is it not possible to send all commits and do one rebase\n> after the last one?\n\nRebase is done to alert the user of potential conflicts before\nattempting to commit them to a remote repository.  Formerly it was\ndone to prevent potential clobbering of upstream changes if\nthere were conflicts, but I think that's been rectified in recent\nmonths.\n\n-- \nEric Wong\n"}]}