Boost logo

Boost :

Subject: Re: [boost] [git] neglected aspects
From: Steven Samuel Cole (steven.samuel.cole_at_[hidden])
Date: 2012-02-11 22:13:16

Rene Rivera wrote:
> But if that's the only advantage.

Next advantages: user interface. and network latency. and color.

I happen to come across this just now, that's why I mention it:
Situation is I want to figure out what has been going on in the boost
trunk recently. I am working in the shell.

host:boost-trunk user$ svn log
--> takes about 10s before anything happens at all (I timed it).
--> every single commit to the repo flies past me in the terminal

admittedly, the boost trunk has a long history and there are many
commits; as they need to be fetched over the network, this takes a
little. (as mentioned, if you're offline, getting the log isn't possible
at all.)

ok, so don't give me all the history, just show me what happened
recently, let's say last 10 commits or since first of february.

host:boost-trunk user$ svn help log
--> -r parameter plus something '{' DATE '}'. oh yeah, i remember now,
i'd figured out some time ago how to specify an svn revision range by
date. took me a little back then, so i wrote it down in some file for
next time i need it. where is that file now ? no idea. let's try:

host:boost-trunk user$ svn log -r { 20120212 }
svn: Syntax error in revision argument '{'
host:boost-trunk user$ svn log -r '{ 20120212 }'
svn: Syntax error in revision argument '{ 20120212 }'
host:boost-trunk user$ svn log -r '{20120212}'
--> wait 10 seconds
r76973 | danieljames | 2012-02-11 23:34:30 +1100 (Sat, 11 Feb 2012) | 1 line

Iostreams: Fix test for latest Boost.Test changes.
host:boost-trunk user$ svn log -r '{20120201}'

hmm, so that's the changes on that date. seems like i have to specify
two dates to get the revisions i want to see. ok, never mind. i could
probably google it, but why does the svn online help not tell me what to
do straight away ?

hmmm. so revision by date range isn't immediately obvious. how about
'last 10 revisions' ?

host:boost-trunk user$ svn help log
--> yeah, thanks but no thanks.

at this stage, I could probably compensate svn's failure to provide a
proper user interface by piping all output from svn log into less or so.
i could google it. but why do i have to ?


hmmm, no idea how to get git history, maybe just try this:

host:some_branch user$ git log
--> zero delay. ZERO. git responds quicker than I can type the command.
--> displays commits in 'less' style, i.e. fills one screen, then stops
with : waits for q to quit, space for next screen, enter for next line.
--> works this way no matter how big the repo is, no matter if offline.

job done. every time you hit space, you go back in revision history one
screen at a time.

just for the sake of it: how to limit revision range ?
host:some_branch user$ git help log
            Limits the number of commits to show. ...


host:some_branch user$ git log -5
--> displays last 5 revisions.
done. took 5 seconds to figure out.

while we're at it: some of the changes I've done recently are in really
long lines; this makes it hard to spot the actual difference, see e.g.

host:boost-trunk user$ svn status
--> wait another 10 seconds
M tools/build/v2/user-config.jam

host:boost-trunk user$ svn diff --color tools/build/v2/user-config.jam
svn: invalid option: --color
Type 'svn help' for usage.

host:some_branch user$ git status
# modified: main.cpp

host:some_branch user$ git diff -color main.cpp
--> works in full color in the terminal

you can now choose to make a snide remark along the lines of 'yeah, you
have to know how to use your tools' or so. i say this is the 21st
century and if i need longer than a couple of seconds to figure out how
to use a tool, then the tool is not good enough.

fact is:
1. svn has a clumsy, non-intuitive user interface. q.e.d.
2. svn makes me wait with every command that requires the network.
3. svn fails to provide features i need every day work.

git fixes all that.

# ssc

Boost list run by bdawes at, gregod at, cpdaniel at, john at