Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Mercurial plugin 1.45 fails to clone by Tag
icon13.gif  Mercurial plugin 1.45 fails to clone by Tag [message #1707386] Fri, 04 September 2015 12:23 Go to next message
Vahe Hovhannisyan is currently offline Vahe HovhannisyanFriend
Messages: 7
Registered: September 2015
Junior Member
Using Mercurial Plugin 1.45-h-2 with Hudson 3.3.0.

Upon build it issues two hg commands:
1. hg clone --rev MyTag --noupdate .... successes
2. hg update --rev MyTag

2nd command fails with 'abort: unknown revision MyTag'

I used to use the older version of plugin which cloned using a single hg command and it worked well.

Why did they change the way of cloning and is there a workaround?
Re: Mercurial plugin 1.45 fails to clone by Tag [message #1707552 is a reply to message #1707386] Mon, 07 September 2015 09:57 Go to previous messageGo to next message
Kaz Nishimura is currently offline Kaz NishimuraFriend
Messages: 89
Registered: December 2014
Member
Probably that is because a Mercurial tag is not recorded at the tagged revision. If you clone a repository up to any tag, that tag is not yet tagged in your local copy! You would have to clone the whole repository if you would like to see tags correctly.

Vahe Hovhannisyan wrote on Fri, 04 September 2015 21:23
Using Mercurial Plugin 1.45-h-2 with Hudson 3.3.0.

Upon build it issues two hg commands:
1. hg clone --rev MyTag --noupdate .... successes
2. hg update --rev MyTag

2nd command fails with 'abort: unknown revision MyTag'

I used to use the older version of plugin which cloned using a single hg command and it worked well.

Why did they change the way of cloning and is there a workaround?



Kaz Nishimura
Re: Mercurial plugin 1.45 fails to clone by Tag [message #1707553 is a reply to message #1707552] Mon, 07 September 2015 10:00 Go to previous messageGo to next message
Vahe Hovhannisyan is currently offline Vahe HovhannisyanFriend
Messages: 7
Registered: September 2015
Junior Member
Exactly!
The problem is that Mercurial plugin clones repository without update (--noupdate) and then tries to update to the tag (which isn't available at that moment).
Re: Mercurial plugin 1.45 fails to clone by Tag [message #1707610 is a reply to message #1707553] Mon, 07 September 2015 23:04 Go to previous messageGo to next message
Kaz Nishimura is currently offline Kaz NishimuraFriend
Messages: 89
Registered: December 2014
Member
I don't know why that two phase update was implemented but it appears the implementer didn't think of tags. A simple workaround is to use bookmarks instead to tags in Hudson jobs.

Kaz Nishimura
Re: Mercurial plugin 1.45 fails to clone by Tag [message #1708486 is a reply to message #1707610] Thu, 17 September 2015 03:52 Go to previous messageGo to next message
Kaz Nishimura is currently offline Kaz NishimuraFriend
Messages: 89
Registered: December 2014
Member
For specifying a revision by a tag, I hacked the Mercurial plugin to add an option to pull all revisions before hg update. It is still in my repository but you can try it now.

To use it, install the plugin from the Advanced tab of the Plugin Manager, and in a job configuration, click 'Advanced' and check 'Pull all revisions'. If not checked (the default), the plugin works exactly as previously and don't waste disk space for non-interesting branches.


Kaz Nishimura

[Updated on: Thu, 17 September 2015 04:17]

Report message to a moderator

Re: Mercurial plugin 1.45 fails to clone by Tag [message #1708489 is a reply to message #1708486] Thu, 17 September 2015 06:57 Go to previous message
Vahe Hovhannisyan is currently offline Vahe HovhannisyanFriend
Messages: 7
Registered: September 2015
Junior Member
Thanks Kaz,
I decided to keep using version 1.35 until a new official fix released.
Initially, my only motivation for upgrade was newly added environment variable to get mercurial revision number. For old one I used "hg identify" command. It's not a big deal, so will wait for fix.
Previous Topic:Automatic min-length workspace root
Next Topic:Hudson 3.3.0 no longer supports Maven builds with Java 6?
Goto Forum:
  


Current Time: Wed Jun 28 14:22:45 GMT 2017

Powered by FUDForum. Page generated in 0.03905 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software