[Python-Dev] git repositories for trunk and py3k

Neil Schemenauer nas at arctrix.com
Fri Jul 18 08:54:30 CEST 2008

[back on the list]

On Thu, Jul 17, 2008 at 11:24:16PM -0700, Brett Cannon wrote:
> Turned out to be a rebuild::
> ....
> r65077 = 82d954e8c20c91562c4c660859d17756cba10992
> r65082 = 1c75cce93c2ef2ec87e801888638cfdf5d2ff29a
> r65085 = 3143c2fbe7315afd29496dc0cdac3122bed30536
> Done rebuilding .git/svn/git-svn/.rev_map.6015fed2-1504-0410-9fe1-9d1591cc4771
> How do I know what is going to be sent? ``git log`` seems to suggest
> something by not listing a git-svn-id for my last commit, but is that
> really the best I got?

The command

    git log git-svn..

will show you changes in your HEAD (by default "master") tree that
are not in the remote tree (git-svn).

> Is there some other way to see what will be pushed?

I like running "gitk" before I push something.

> And how do I diff easily between commits?

It depends on what you want, exactly.  Maybe you can describe some
use cases.  A DVCS can't use identify revisions like SVN does.
Generally I find myself using heads or tags to identify versions in
combination with the ^ operator.  For example,

    git diff HEAD^

would show the difference between the current working tree and the
commit before the head of the stored tree.  If you want the patch
for a single commit, use "git show <object>".  For example, "git
show" will display the last commit.  To see amk's typo fix:

    git show 6cadb9c1b7e30a8b66cdba01cd79aa6397a07080

You can also abbreviate the commit id, eg.

    git show 6cadb9

As I say in my guide, "git format-patch" and "git am" are very handy
when slinging patches around (e.g. to and from a bug tracker or
mailing list).



More information about the Python-Dev mailing list