working on (and converting) non-git tickets

41 views
Skip to first unread message

John Cremona

unread,
Dec 17, 2013, 3:29:05 PM12/17/13
to SAGE devel, sage...@googlegroups.com
Could someone point me to the instructions for converting an old
non-git ticket with mercurial patches to a new-style ticket where
there's a git branch instead? I am sure that I read it somewhere but
cannot find it.

John

Nathann Cohen

unread,
Dec 17, 2013, 5:13:24 PM12/17/13
to sage...@googlegroups.com, SAGE devel
Not sure it creates a branch and everything immediately, but I use "sage -dev import-path --url <url of a patch file>" that creates a git commit representing the patch. It's quite good and fills the "author" field as it should and everything !

Though if you have several patch files on a ticket you have to add them all manually.

Nathann



John

--
You received this message because you are subscribed to the Google Groups "sage-git" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-git+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Andrew

unread,
Dec 18, 2013, 1:31:42 AM12/18/13
to sage...@googlegroups.com, SAGE devel
You may have seen it on the TentativeConventions page put up by sage-ccmbinat after sage days 54.
Andrew

John Cremona

unread,
Dec 18, 2013, 5:29:05 AM12/18/13
to sage...@googlegroups.com
Update: thanks to all the suggestions I was able to do this
successfully. For the record, here is exactly what I did -- note that
this was a simple example since the ticket #10973 had only one patch
on it.

Starting in a freshly updated master branch:

# create new branch and check it out:
git checkout -b intpoints
# pull in the patch from the ticket:
./sage -dev import-patch --url
http://trac.sagemath.org/raw-attachment/ticket/10973/trac_10973_v8.patch
# look at the last commit message:
git log -1
# look at the diffs (i.e. the patch's contents):
git diff HEAD^
# push the new branch onto trac (creating a new branch name there
which is more informative than my local branch name):
git push --set-upstream trac intpoints:u/cremona/trac10973intpts

The last operation took quite a while (10 minutes?) That's all local
to my machine. On the trac ticket, I filled in the Branch field and
saved it and trac filled in the commit hash automatically. It also
now lists the "last 10 new commits" in a comment, only one of which is
relevant, but if you now click on the relvant hash (7f50362) it
displays beautifully all the changes introduced by the commit, looking
very much like and old-style view of a patch.

Now all I have to do is work on the code until I am satisfied that it
does what it should!

I guess there is no need for me to have listed all the above in
detail on sage-git. It might be helpful to others to forward to
sage-devel.

John

Peter Bruin

unread,
Dec 18, 2013, 5:41:26 PM12/18/13
to sage...@googlegroups.com
John Cremona wrote:

git push --set-upstream trac intpoints:u/cremona/trac10973intpts

The last operation took quite a while (10 minutes?)

I noticed this too; what is causing this?  Pushing one very small commit (669 bytes according to git push -v) took a comparable time for me.

Peter

Volker Braun

unread,
Dec 18, 2013, 5:56:11 PM12/18/13
to sage...@googlegroups.com
Pushing also makes the trac server read the changes from the git repo, which is kind of slow. But it doesn't have any excuse to be that slow. My record was about an hour, so far. But I haven't had time to debug this further, though. You can interrupt git when it is apparently hanging, though. The commit has already been recorded at that point.

We should probably have a look at alternatives for displaying git diffs, and possibly disable the git trac plugin. 
Reply all
Reply to author
Forward
0 new messages