git and bzr

Jakub Narebski jnareb at gmail.com
Tue Nov 28 12:37:17 GMT 2006


Erik B?gfors wrote:

>> Next question ... one of the reasons I started seriously thinking about
>> git was that in the VCS comparison discussion, it was noted that git is
>> a lot more flexible than bzr in terms of how it can track data (e.g. the
>> git pickaxe command, although I understand that's not in the released
>> version [1.4.4.1] yet?).
> 
> If this is blame/annotate,  this exists in bzr as well...
> 
> : [bagfors at zyrgelkwyt]$ ; bzr help blame
> usage: bzr annotate FILENAME
> aliases: ann, blame, praise
> 
> Show the origin of each line in a file.

That doesn't change the fact that "git pickaxe" abilities in "git blame"
is more than just equivalent of "cvs annotate".

----
bzr annotate FILENAME
    Show the origin of each line in a file.

----
git-blame [-c] [-l] [-t] [-f] [-n] [-p] [-L n,m] [-S <revs-file>]
          [-M] [-C] [-C] [--since=<date>] [<rev>] [--] <file>

Annotates each line in the given file with information from the revision
which last modified the line. Optionally, start annotating from the given
revision.

Also it can limit the range of lines annotated.
[...]
Also you can use regular expression to specify the line range.
  git blame -L '/^sub hello {/,/^}$/' foo
would limit the annotation to the body of hello subroutine.

When you are not interested in changes older than the version v2.6.18, or
changes older than 3 weeks, you can use revision range specifiers similar
to git-rev-list:
  git blame v2.6.18.. -- foo
  git blame --since=3.weeks -- foo

http://kernel.org/pub/software/scm/git/docs/git-blame.html
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git






More information about the bazaar mailing list