Modify

Ticket #302 (reopened defect)

Opened 5 years ago

Last modified 4 years ago

changelog prepare fails with git

Reported by: murrayc Owned by: thomas
Priority: major Milestone: 0.2.7
Component: moap Version: TRUNK
Keywords: Cc:

Description

For instance, after doing a checkout (clone) of cairomm, and making some changes, I get the following error. Maybe moap should default to mentioning "origin" or some other obscure git thing.

murrayc@murrayc-x61:~/checkouts/gnome224/cairomm$ moap changelog prepare Updating ChangeLog? from Git repository. Could not update ChangeLog?: You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your configuration file does not tell me either. Please name which branch you want to merge on the command line and try again (e.g. 'git pull <repository> <refspec>'). See git-pull(1) for details on the refspec.

If you often merge with the same branch, you may want to configure the following variables in your configuration file:

branch.master.remote = <nickname> branch.master.merge = <remote-ref> remote.<nickname>.url = <url> remote.<nickname>.fetch = <refspec>

See git-config(1) for details.

Attachments

Change History

comment:1 Changed 5 years ago by murrayc@…

Here is that error message without trac doing its special wiki formatting magic:

murrayc@murrayc-desktop:~/svn/gnome220/telepathy-doc$ moap changelog prepare
Updating ChangeLog from Git repository.
Could not update ChangeLog:
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either.  Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.

If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:

    branch.master.remote = <nickname>
    branch.master.merge = <remote-ref>
    remote.<nickname>.url = <url>
    remote.<nickname>.fetch = <refspec>

See git-config(1) for details.

comment:2 Changed 4 years ago by murrayc@…

I still have this problem, now using git.gnome.org.

 http://git.gnome.org/cgit/releng/plain/tools/prepare-ChangeLog.pl works without this error, but it doesn't give me the function names.

comment:3 Changed 4 years ago by thomas

  • Status changed from new to closed
  • Resolution set to fixed

(In [386]) * moap/vcs/git.py:

When updating, git behaves differently between git pull (base path) and cd (base path); git pull So use the latter. Fixes #302.

comment:4 Changed 4 years ago by murrayc@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

I now get "no changes detected", though "git diff" gives me output:

$ moap changelog prepare
Updating ChangeLog from Git repository.
Finding changes.
No changes detected.

Does git maybe assume that I have done a local commit first?

By the way, the trac ticket emails no longer contain the full URL, so it's really hard to get back here.

comment:5 Changed 4 years ago by anonymous

Murray, moap runs git diff --cached, which means you should first stage your commits with git add.

It might be desirable to make this configurable. Unfortunately, common denominator makes tools less powerful, I am not sure how it should be solved.

comment:6 Changed 4 years ago by murrayc

I think it makes sense to assume that all changes should be staged when generating the ChangeLog?, as with other SVNs that moap supports, though I wonder if you can do that without leaving them staged afterwards.

comment:7 Changed 4 years ago by anonymous

murrayc@murrayc-desktop:~/svn/gnome220/telepathy-doc$ moap changelog prepare Updating ChangeLog? from Git repository. Could not update ChangeLog?: You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your configuration file does not tell me either. Please name which branch you want to merge on the command line and try again (e.g. 'git pull <repository> <refspec>'). See git-pull(1) for details on the refspec.

If you often merge with the same branch, you may want to configure the following variables in your configuration file:

branch.master.remote = <nickname> branch.master.merge = <remote-ref> remote.<nickname>.url = <url> remote.<nickname>.fetch = <refspec>

See git-config(1) for details. I'm closing it according to the last comment.
----------
 nike air yeeze

comment:8 Changed 4 years ago by anonymous

Thomas, how about not allowing anonymous comments? That might help against the spam slightly. Or you could just not use nasty trac, of course.

comment:9 Changed 4 years ago by murrayc@…

That last comment was from me, by the way.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as reopened
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from thomas. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.