Git (and "git trac") in the developer guide heads up

92 views
Skip to first unread message

Volker Braun

unread,
Apr 6, 2014, 5:17:12 PM4/6/14
to sage-...@googlegroups.com
I'm changing the developer guide to push people towards git + my "git trac" subcommand instead of the "sage -dev" scripts. Nothing actually changes as far as functionality goes, you can still use the dev scripts or just 100% plain git. 

As Karl-Dieter pointed out, the updated developer guide not a fair and balanced review of all possible ways to interact with git. Rather, I want to clearly steer people in a particular direction. I did a lot of work on the dev scripts myself, so I'm not trying to diss anybody's work. But it hasn't really attracted a big following or any further development. 


Corresponding trac ticket is http://trac.sagemath.org/16030 (not finished)

William Stein

unread,
Apr 6, 2014, 7:33:49 PM4/6/14
to sage-devel
On Sun, Apr 6, 2014 at 2:17 PM, Volker Braun <vbrau...@gmail.com> wrote:
> I'm changing the developer guide to push people towards git + my "git trac"
> subcommand instead of the "sage -dev" scripts. Nothing actually changes as
> far as functionality goes, you can still use the dev scripts or just 100%
> plain git.

Awesome! I was looking at the dev guide, since I'm going to teach
Sage+Git dev in my Sage class this quarter, and quickly wished that it
was more oriented toward your 'git + my "git trac"' instead of "sage
-dev" scripts.

William

>
> As Karl-Dieter pointed out, the updated developer guide not a fair and
> balanced review of all possible ways to interact with git. Rather, I want to
> clearly steer people in a particular direction. I did a lot of work on the
> dev scripts myself, so I'm not trying to diss anybody's work. But it hasn't
> really attracted a big following or any further development.
>
> Git cheat sheet:
> http://boxen.math.washington.edu/home/vbraun/doc/git-cheat-sheet.pdf
>
> Corresponding trac ticket is http://trac.sagemath.org/16030 (not finished)
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Ralf Stephan

unread,
Apr 7, 2014, 2:43:57 AM4/7/14
to sage-...@googlegroups.com
On Sunday, April 6, 2014 11:17:12 PM UTC+2, Volker Braun wrote:

$ git trac checkout 13853
Loading ticket #13853...
Checking out Trac #13853 remote branch public/13853 -> local branch t/13853/public/13853...
Traceback (most recent call last):
...
git_trac.git_error.GitError: git returned with non-zero exit code (128) when executing "git branch --set-upstream-to remotes/trac/public/13853"
    STDERR: fatal: Not a valid object name: 'remotes/trac/public/13853'.

 remotes/trac?

Volker Braun

unread,
Apr 7, 2014, 3:10:26 AM4/7/14
to sage-...@googlegroups.com
Interesting, which git version is that? Also, whats the output of git show-ref?

The refs/remotes/ are supposed to be symbolic names for the remote...

Volker Braun

unread,
Apr 7, 2014, 3:21:42 AM4/7/14
to sage-...@googlegroups.com
Ah I see you have configured the "trac" remote to only track the master branch...  Will fix that.

Ralf Stephan

unread,
Apr 7, 2014, 3:36:01 AM4/7/14
to sage-...@googlegroups.com
git version is 1.8.1.4
show-ref includes 

8be52e678f5af0e62794959b70b7cb8babe0a488 refs/remotes/origin/HEAD
12bbca024b3a3728e35c76e1e11be08138d17370 refs/remotes/origin/develop
8be52e678f5af0e62794959b70b7cb8babe0a488 refs/remotes/origin/master
6452f9d3e447f683b98387807b1f737a62ef4119 refs/remotes/upstream/develop
8be52e678f5af0e62794959b70b7cb8babe0a488 refs/remotes/upstream/master

which are the same I get with git branch -r

I also changed the sage/.git/config line
[remote "trac"]
url = g...@trac.sagemath.org:sage.git
fetch = +refs/heads/master:refs/remotes/trac/master
to
fetch = +refs/heads/*:refs/remotes/trac/*

without any difference.


--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/arhblO0MX7g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.

Ralf Stephan

unread,
Apr 7, 2014, 4:04:02 AM4/7/14
to sage-...@googlegroups.com
Although both origin and trac are set in .git/config as remotes, and git config -l show both equally set, this behaves dfifferent:

ralf@ark:~/sage> git branch --set-upstream-to remotes/origin/master
Branch tmp set up to track remote branch master from origin.
ralf@ark:~/sage> git branch --set-upstream-to remotes/trac/master
fatal: Not a valid object name: 'remotes/trac/master'.

Ralf Stephan

unread,
Apr 7, 2014, 4:42:29 AM4/7/14
to sage-...@googlegroups.com
OK, the problem was apparently that my origin was set to github and the trac fetch config setting somehow only included master. Only after I changed that to * and I manually did a full git fetch trac, the trac branches were made known to my git.

Probably many other problems I had with trac came from this.

Volker Braun

unread,
Apr 7, 2014, 4:49:04 AM4/7/14
to sage-...@googlegroups.com
No, the issue is that the refspec for your origin (github) and trac was set different. The developer guide tells you to 

git remote add trac g...@trac.sagemath.org:sage.git -t master

The "-t master" tells it to not look at other remote branches unless you explicitly specify it. The intended effect is that you don't download branches that you don't want, but it is sometimes confusing too.

In any case, I fixed the "git trac" command to handle that case. 

Volker Braun

unread,
Apr 7, 2014, 2:54:52 PM4/7/14
to sage-...@googlegroups.com
This is now finished as far as I'm concerned and ready for review.

Output is here if you want to sneak a peek: http://boxen.math.washington.edu/home/vbraun/doc/developer/

Reply all
Reply to author
Forward
0 new messages