jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Release Plugin
  • MRELEASE-530

Git provider does 'git push' during 'mvn release:prepare' which causes unwanted problems (scm 1.4 upgrade)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.1
  • Component/s: scm
  • Labels:
    None

Description

When doing 'mvn release:prepare' with a Git provider, a 'git push' command is executed. This is not ideal because the push command can fail or push things from the local repository that are not needed/wanted in the remote repository. Some examples are:

1. The local repository has two branches: master (tracking origin/master) and dummy (tracking origin/dummy). The release is being made on the master branch, and the dummy and origin/dummy branches have diverged. Running 'release:prepare' causes a 'git push', which will succeed for the master branch (assuming that the release preparation has been made correctly) and fail for the dummy branch (the two branches have diverged and need to be merged or rebased). The release preparation aborts and the directory is left in a somewhat inconsistent state where manual cleaning up is needed (removing pom.xml.next files, changing versions to <new>-SNAPSHOT, etc.)

2. The local repository has two branches: master (tracking origin/master) and localtest (not in the origin repository). The localtest branch shouldn't be published because it is just used for some temporary testing and doesn't even work. It will be pushed during 'release:prepare'.

Suggested behaviour: use 'git push origin <currentbranch>:<currentbranch>', or even better, query for which remote repository to push to (found in .git/config) and which branch to push from and to. For me, it would be great to have a 'confirm push' before doing it so as to keep things clean, but maybe that is quite complex.

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. SCM-444 Git provider does 'git push' during 'mvn release:prepare' which causes unwanted problems

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Olivier Lamy added a comment - 11/Mar/10 5:37 PM

fixed in rev 922071

Show
Olivier Lamy added a comment - 11/Mar/10 5:37 PM fixed in rev 922071
Hide
Permalink
Brett Porter added a comment - 29/Jul/10 6:48 PM

with the latest SCM snapshots and this commit, I get 101 test failures in maven-release-manager on Mac. Another user reported the same thing yesterday.

Caused by: org.codehaus.plexus.component.repository.exception.ComponentRepositoryException: Component descriptor role: 'org.apache.maven.scm.manager.ScmManager', implementation: 'org.apache.maven.scm.manager.plexus.DefaultScmManager', role hint: 'default' has a hint, but there are other implementations that don't

I need to do more investigation, but do you have any ideas what this might be?

Show
Brett Porter added a comment - 29/Jul/10 6:48 PM with the latest SCM snapshots and this commit, I get 101 test failures in maven-release-manager on Mac. Another user reported the same thing yesterday.
Caused by: org.codehaus.plexus.component.repository.exception.ComponentRepositoryException: Component descriptor role: 'org.apache.maven.scm.manager.ScmManager', implementation: 'org.apache.maven.scm.manager.plexus.DefaultScmManager', role hint: 'default' has a hint, but there are other implementations that don't
I need to do more investigation, but do you have any ideas what this might be?
Hide
Permalink
Olivier Lamy added a comment - 30/Jul/10 10:34 AM

Ok I reproduce. I will investigate.

Show
Olivier Lamy added a comment - 30/Jul/10 10:34 AM Ok I reproduce. I will investigate.

People

  • Assignee:
    Olivier Lamy
    Reporter:
    Olivier Lamy
Vote (0)
Watch (0)

Dates

  • Created:
    11/Mar/10 4:32 PM
    Updated:
    30/Jul/10 10:34 AM
    Resolved:
    11/Mar/10 5:37 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.