However, I am still having some issues with my local updater script: For git and git-svn, I wrote some simple commands that would show the latest remote commit (so that I can see whether I missed something) and my local commits on top of the latest remote commit (because I don't want to get too far away from master). For git-svn, it looks like this:
- Code: Select all
git log git-svn^..git-svn --pretty=format:"Latest remote commit: %ad, by %an: %s" --date=local
git log HEAD...git-svn --pretty=format:"+ Locally added patch: %s" --date=local --reverse
Which was rather straight-forward after I figured out the formatting.
For hg, my code currently looks like this:
- Code: Select all
local=`hg outgoing -q -l1 --template {rev}`
if [[ $local =~ [0-9]+ ]]; then
hg log -r $(($local-1)) --template 'Latest remote commit: {date|date}, by {author}: {desc}\n'
hg outgoing -q --template '+ Locally added patch: {desc}\n'
else
hg log -r tip --template 'Latest remote commit: {date|date}, by {author}: {desc}\n'
fi
And the 2nd issue: After I figured out how to do the rebase, I wanted to get rid of the topmost commit (or, to be more precise, move tip one commit "down"). That would have been really simple with git: "git reset --hard HEAD^". I googled and tried for half an hour, but I absolutely couldn't figure it out. I ended up removing my local copy of the repo, checking it out again and applying only the patch I need, which can't really be the best way to do this. Anyone having some tips, please?