Cannot push to trac - some git issue

35 views
Skip to first unread message

Simon Brandhorst

unread,
Oct 17, 2017, 6:20:16 AM10/17/17
to sage-devel
Would you please help me with this? There seems to be some conflict but I am lost.
Git suggest to pull. But that does not change anything. After all that is what I just did.

[simon@Quadrator sage]$ git pull
Already up-to-date.
[simon@Quadrator sage]$ git status
On branch t/23978/rich_comparison_for_modules
Your branch is up-to-date with 'trac/u/pmenegat/rich_comparison_for_modules'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    Sage_crash_report.txt
    lattices_in_sage_sd91.ipynb
    my_lattice.sobj
    src/sage/libs/cypari2/

nothing added to commit but untracked files present (use "git add" to track)
[simon@Quadrator sage]$ git trac push
Pushing to Trac #23978...
Guessed remote branch: u/sbrandhorst/rich_comparison_for_modules
Traceback (most recent call last):
  File "/usr/bin/git-trac", line 18, in <module>
    cmdline.launch()
  File "/usr/lib/python2.7/site-packages/git_trac/cmdline.py", line 223, in launch
    app.push(ticket_number, remote=args.remote, force=args.force)
  File "/usr/lib/python2.7/site-packages/git_trac/app.py", line 216, in push
    self.repo.push(remote, force)
  File "/usr/lib/python2.7/site-packages/git_trac/git_repository.py", line 197, in push
    self.git.echo.push('trac', refspec)
  File "/usr/lib/python2.7/site-packages/git_trac/git_interface.py", line 341, in meth
    return self.execute(git_cmd, *args, **kwds)
  File "/usr/lib/python2.7/site-packages/git_trac/git_interface.py", line 98, in execute
    popen_stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/site-packages/git_trac/git_interface.py", line 263, in _run
    raise GitError(result)
git_trac.git_error.GitError: git returned with non-zero exit code (1) when executing "git push trac HEAD:refs/heads/u/sbrandhorst/rich_comparison_for_modules"
    STDERR: To g...@trac.sagemath.org:sage.git
    STDERR:  ! [rejected]        HEAD -> u/sbrandhorst/rich_comparison_for_modules (non-fast-forward)
    STDERR: error: failed to push some refs to 'g...@trac.sagemath.org:sage.git'
    STDERR: hint: Updates were rejected because a pushed branch tip is behind its remote
    STDERR: hint: counterpart. Check out this branch and integrate the remote changes
    STDERR: hint: (e.g. 'git pull ...') before pushing again.
    STDERR: hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Travis Scrimshaw

unread,
Oct 17, 2017, 1:47:58 PM10/17/17
to sage-devel
I would recommend not using "git trac" commands and just use git directly:

git push <trac_remote> <local_branch_name>:<target_branch_name>

Best,
Travis

David Roe

unread,
Oct 18, 2017, 12:44:19 AM10/18/17
to sage-devel
It looks like there are commits on the ticket that you don't have (thus the complaint about a non-fast-forward push).  Have you tried using git trac pull? Or, as Travis suggests, the plain git analogue?  I see that you did git pull, but maybe the tracking isn't set up correctly?
David

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Simon Brandhorst

unread,
Oct 18, 2017, 4:50:14 AM10/18/17
to sage-devel
Thank you guys for your help. It worked :)

What confused me was that there were two merge conflicts. One between the two branches  and one between them and the latest beta version.


Reply all
Reply to author
Forward
0 new messages