<div><span class="gmail_quote">On 3/18/08, <b class="gmail_sendername">Riccardo Iaconelli</b> <<a href="mailto:riccardo@kde.org">riccardo@kde.org</a>> wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
2008/3/18 Sebastian Kuegler <<a href="mailto:sebas@kde.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">sebas@kde.org</a>>:<br><div class="gmail_quote"><span class="q"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<div>On Tuesday 18 March 2008 15:45:27 Marijn Kruisselbrink wrote:<br>
> Sebastian Kuegler wrote:<br>
> > I can imagine that this forms a real barrier for some (me), but maybe<br>
> > someone has already solved that?<br>
><br>
> I'm using this small shell-script to generate a diff between the current<br>
> working copy and HEAD that <span id="st" name="st" class="st">review</span>-<span id="st" name="st" class="st">board</span> will accept with <span id="st" name="st" class="st">git</span>-<span id="st" name="st" class="st">svn</span>. This<br>
> does assume that HEAD is actually an <span id="st" name="st" class="st">svn</span> revision, I don't think it will<br>
> work when you have already comitted changes locally.<br>
><br>
> #!/bin/sh<br>
> REV=`<span id="st" name="st" class="st">git</span>-<span id="st" name="st" class="st">svn</span> find-rev HEAD`<br>
> <span id="st" name="st" class="st">git</span>-diff --no-prefix $* HEAD | sed -e 's/^+++ .*/& (working copy)/' -e<br>
> "s/^--- .*/& (revision $REV)/"<br>
<br>
</div>My preferred workflow would be:<br>
<br>
- Have master branch up to date from <span id="st" name="st" class="st">SVN</span><br>
- Work on stuff in branches<br>
- Merge changes from master into those branches as I see fit</blockquote></span><div><br>You should rebase, not merge. ;-)<br> </div><span class="q"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
- When something in a branch should be committed, I'd merge this commit into<br>
master and dcommit it (possibly after going through RB)<br>
- When a branch is done, I'd merge the whole branch into master and dcommit<br>
that<br>
<br>
So that involves committing locally. Changing you scriptlet to find the latest<br>
<span id="st" name="st" class="st">SVN</span> revision would be necessary in that case, no?<br>
<div><br></div></blockquote></span></div><br>the script looks good, you probably have to add<br><span id="st" name="st" class="st">git</span>-rev-list --date-order --max-count=1 <<span id="st" name="st" class="st">git</span>-<span id="st" name="st" class="st">svn</span>><br clear="all">
<br>where <<span id="st" name="st" class="st">git</span>-<span id="st" name="st" class="st">svn</span>> is the name of the remote branch (<span id="st" name="st" class="st">git</span> branch -r)<br>
which maps the <span id="st" name="st" class="st">svn</span> repo. that gives you the other argument for <span id="st" name="st" class="st">git</span> diff.</blockquote><div> </div>To bring this topic back, the shell script becomes:<br>
</div><div></div>#!/bin/sh<br>REV=`<span id="st" name="st" class="st">git </span><span id="st" name="st" class="st">svn</span> find-rev $(git-rev-list --date-order --max-count=1 git-svn)`<br><span id="st" name="st" class="st">git </span>diff --no-prefix $* HEAD | sed -e 's/^+++ .*/& (working copy)/' -e "s/^--- .*/& (revision $REV)/"<br clear="all">
<p>Where the lastest 'git-svn' in line 2 (the one just under #!/bin/sh) is the name of the remote branch which tracks svn.<br></p><p>And it's named 'git-svn' by default...</p><p>Hope this helps... here works like a charm.</p>
<p>-Riccardo</p>-- <br>GPG key:<br>3D0F6376<br>When encrypting, please encrypt also for this subkey:<br>9EBD7FE1<br>-----<br>Pace Peace Paix Paz Frieden Pax Pokój Friður Fred Béke 和平<br>Hasiti Lapé Hetep Malu Mир Wolakota Santiphap Irini Peoch שלום<br>
Shanti Vrede Baris Rój Mír Taika Rongo Sulh Mir Py'guapy 평화