3

Here's the steps I take:

  1. Clone mercurial project at the head.
  2. On local repository, perform hg status (no results), then hg in (no changes).
  3. mvn clean install. Build is successful.
  4. mvn release:prepare.

Get's to the point where it's excuting a push

[INFO] EXECUTING: cmd.exe /X /C "hg push http://remoterepo/hg.project"
[ERROR]
EXECUTION FAILED
   Execution of cmd : push failed with exit code: -1
   Your Hg installation seems to be valid and complete. Hg version: 1.8.4 (OK)

Doing a hg status I now have:

? pom.xml.releaseBackup
? release.properties

From my understanding is that this happens when it could be creating a branch on the remote repo and the fix is to make sure I'm on the head. I'm on the head.

I've done this several times before and now this happens. Let me reiterate, I cloned the head and I couldn't clone a branch if I wanted to as none exist.

Now what? How do I fix this?

Thanks for any suggestions.

Joe

krtek
  • 26,334
  • 5
  • 56
  • 84
user1042520
  • 51
  • 1
  • 3

2 Answers2

2

I figured it out. It was a authentication thing. The Maven release plugin does not use the authentication details in <project>/.hg/hgrc but it DOES in /<Users>/<UserName>/.hgrc. After I updated my password everything worked just fine.

user1042520
  • 51
  • 1
  • 3
0

First of all what happens when you try to do an hg push yourself on the command line ? If everything's fine you definitively have a problem, otherwise the error message should help you determine what is going wrong.

If I were you, I would check if I have the right to push to the remote destination.

Is http://remoterepo/hg.project the real output or did you changed it for confidentiality reason ? If it's the real output, you should check your Maven configuration to put the real repository path.

Concerning the output of hg status after the steps, it's totally normal, Maven creates some file in the directory. You can add them to your .hgignore file so Mercurial won't show them to you. More information about that in the documentation.

krtek
  • 26,334
  • 5
  • 56
  • 84
  • Thanks krtek for the response. Yes I can do a hg push at the command line without issue. Yes the URL to the project is changed ;-) – user1042520 Nov 11 '11 at 22:47
  • I tried using -Dusername and -Dpassword in hopes that might help. Nope. – user1042520 Nov 11 '11 at 23:12
  • @user1042520 Sorry, I don't know what other things it can be apart from a right problems. – krtek Nov 11 '11 at 23:17
  • Thanks Krtek. Wish there was a way to know what was causing the push to fail otherwise it's just a guess. Guess that's a downfall of hg. – user1042520 Nov 11 '11 at 23:36
  • 1
    More a downfall of Maven which isn't showing the entire error message ;) Usually command line errors are pretty good. – krtek Nov 11 '11 at 23:38