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)
Signup
Maven SCM
  • Maven SCM
  • SCM-230

mercurial plugin

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.0-rc1
  • Component/s: maven-scm-provider-mercurial (hg)
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    12

Description

it would be nice to have a mercurial source provider. and if not, it would be nice to update the documentation on http://maven.apache.org/scm/ so that anybody could just copy the bzr provider and make a mercurial provider out of it. it should be nearly the same implementation.

mercurial is (currently) much faster than bzr and therefor really useable.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. GZip Archive
    maven-scm-hg.tar.gz
    12/Oct/06 4:55 PM
    20 kB
    Alain Hoang
  2. GZip Archive
    maven-scm-provider-hg.diff.gz
    17/Sep/06 2:20 AM
    16 kB
    THURNER rupert
  3. GZip Archive
    maven-scm-provider-hg.tar.gz
    27/Oct/06 5:03 PM
    19 kB
    Ryan Daum
  4. File
    maven-scm-provider-hg.tgz
    17/Sep/06 2:20 AM
    18 kB
    THURNER rupert
  5. File
    maven-scm-provider-hg-0.09.tbz
    22/Oct/06 3:32 AM
    67 kB
    THURNER rupert
  6. File
    maven-scm-provider-hg-0.8.tbz
    05/Oct/06 6:30 PM
    19 kB
    THURNER rupert
  7. File
    maven-scm-provider-hg-0.8.tbz
    05/Oct/06 6:28 PM
    46 kB
    THURNER rupert
  8. File
    maven-scm-provider-hg-0.8.tbz
    05/Oct/06 6:27 PM
    46 kB
    THURNER rupert
  9. GZip Archive
    maven-scm-provider-hg-1.0-SNAPSHOT.tar.gz
    12/Apr/07 10:30 AM
    19 kB
    Ryan Daum
  10. File
    scm-230-patch-1.svndiff
    13/Apr/07 9:19 AM
    7 kB
    Ryan Daum
  11. File
    site-patch
    12/Apr/07 1:06 PM
    4 kB
    Ryan Daum
  12. File
    site-patch-2
    12/Apr/07 1:14 PM
    3 kB
    Ryan Daum

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. SCM-244 In maven-scm-test, ChangeLogCommandTckTest relies on unreliable timing and fails for some SCM systems

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. SCM-154 Bazaar tests should not assume bzr is installed

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
  • Options
    • Show All
    • Show Open

Sub-Tasks

1.
Maven Mercurial SCM Provider is missing "tag" command Sub-task Closed Closed Emmanuel Venisse
 

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Emmanuel Venisse added a comment - 12/Sep/06 3:18 AM

Do you want to implement it?

Show
Emmanuel Venisse added a comment - 12/Sep/06 3:18 AM Do you want to implement it?
Hide
Permalink
solo turn added a comment - 12/Sep/06 8:40 AM

if you would be so kind to point me to the bzr provider source code, i'll have a look.

Show
solo turn added a comment - 12/Sep/06 8:40 AM if you would be so kind to point me to the bzr provider source code, i'll have a look.
Hide
Permalink
solo turn added a comment - 12/Sep/06 8:46 AM

found it in the maven faq and with a little clicking up and down in the svn tree:
http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/

it would be nice if the maven scm project site would state this more prominently

Show
solo turn added a comment - 12/Sep/06 8:46 AM found it in the maven faq and with a little clicking up and down in the svn tree: http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/ it would be nice if the maven scm project site would state this more prominently
Hide
Permalink
THURNER rupert added a comment - 17/Sep/06 2:20 AM

first implementation try - svn diff file. created in mvn-scm toplevel dir.

Show
THURNER rupert added a comment - 17/Sep/06 2:20 AM first implementation try - svn diff file. created in mvn-scm toplevel dir.
Hide
Permalink
THURNER rupert added a comment - 17/Sep/06 2:20 AM

hg-scm provider, the files tared.

Show
THURNER rupert added a comment - 17/Sep/06 2:20 AM hg-scm provider, the files tared.
Hide
Permalink
THURNER rupert added a comment - 17/Sep/06 2:26 AM

current state is experimental. work is derived from the bzr provider.

half of the tests fail. i guess the main reason is that the tests try to get an "inventory", and i don't know how to get that with mercurial ... as i always use it the other way round: what is NOT in the inventory. everything else would be.

you have a hint how to solve / avoid this issue?

Show
THURNER rupert added a comment - 17/Sep/06 2:26 AM current state is experimental. work is derived from the bzr provider. half of the tests fail. i guess the main reason is that the tests try to get an "inventory", and i don't know how to get that with mercurial ... as i always use it the other way round: what is NOT in the inventory. everything else would be. you have a hint how to solve / avoid this issue?
Hide
Permalink
solo turn added a comment - 04/Oct/06 3:14 AM

from the mailing list:

revno is either id or parents or tip
inventory is either manifest or locate

Show
solo turn added a comment - 04/Oct/06 3:14 AM from the mailing list: revno is either id or parents or tip inventory is either manifest or locate
Hide
Permalink
Alain Hoang added a comment - 05/Oct/06 1:20 PM

I've been hacking on the 'experimental' tarball for a week or so now. I've been able to get more tests to pass however there are actually some semantic differences between bzr and mercurial that make this not as simple as find and replace on the class names to get running.

Just fixing 'inventory' won't fix all of the problems. (I already did with locate)

In terms of functionality, I think it works mostly but the unit tests are failing due to different semantics between mercurial and bzr. Noteably:
1. Mercurial's understanding of URLs is not the same as bzr's. For example you don't specify file:/// to reference repositories on the local filesystem.
2. The diff format is closer to subversion's diff format than the one that bzr spits out.
3. The log format is not the same

I've been trying to get these to pass the unit tests but it requires rewriting quite a few of the unit tests so that it passes mercurial's notions of the tests. I'll try to post an updated tarball as soon as I can.

Show
Alain Hoang added a comment - 05/Oct/06 1:20 PM I've been hacking on the 'experimental' tarball for a week or so now. I've been able to get more tests to pass however there are actually some semantic differences between bzr and mercurial that make this not as simple as find and replace on the class names to get running. Just fixing 'inventory' won't fix all of the problems. (I already did with locate) In terms of functionality, I think it works mostly but the unit tests are failing due to different semantics between mercurial and bzr. Noteably: 1. Mercurial's understanding of URLs is not the same as bzr's. For example you don't specify file:/// to reference repositories on the local filesystem. 2. The diff format is closer to subversion's diff format than the one that bzr spits out. 3. The log format is not the same I've been trying to get these to pass the unit tests but it requires rewriting quite a few of the unit tests so that it passes mercurial's notions of the tests. I'll try to post an updated tarball as soon as I can.
Hide
Permalink
solo turn added a comment - 05/Oct/06 6:08 PM

for a log output similar to bzr one could use

hg log --style changelog.tmpl -l 1

with changelog.tmpl:

changeset = 'rev:

{rev}

\nchangeset:

{node}

\n

{tags}

author:

{author|escape|addbreaks|tabindent}

\ndate:

{date|isodate}

\ndesc:\n

{desc|strip|escape|addbreaks|tabindent}

\n

{files} {file_adds} {file_dels}

\n'
start_tags = 'tags:'
tag = '\t

{tag}

\n'
start_files = 'modified:\n'
file = '

{file}

\n'
start_file_adds = 'added:\n'
file_add = '

{file_add}

\n'
start_file_adds = 'removed:\n'
file_del = '

{file_del}

\n'

(as suggested by http://www.selenic.com/pipermail/mercurial/2006-May/008349.html)

Show
solo turn added a comment - 05/Oct/06 6:08 PM for a log output similar to bzr one could use hg log --style changelog.tmpl -l 1 with changelog.tmpl: changeset = 'rev: {rev} \nchangeset: {node} \n {tags} author: {author|escape|addbreaks|tabindent} \ndate: {date|isodate} \ndesc:\n {desc|strip|escape|addbreaks|tabindent} \n {files} {file_adds} {file_dels} \n' start_tags = 'tags:' tag = '\t {tag} \n' start_files = 'modified:\n' file = ' {file} \n' start_file_adds = 'added:\n' file_add = ' {file_add} \n' start_file_adds = 'removed:\n' file_del = ' {file_del} \n' (as suggested by http://www.selenic.com/pipermail/mercurial/2006-May/008349.html )
Hide
Permalink
THURNER rupert added a comment - 05/Oct/06 6:27 PM

now less tests fail ... especially i threw out the "file:///".

the other two points mentioned by alan are still missing.

and i'm wondering if we should try to use source code control, so one gets the changes of the other?

emmanuel? are you reading this?

Show
THURNER rupert added a comment - 05/Oct/06 6:27 PM now less tests fail ... especially i threw out the "file:///". the other two points mentioned by alan are still missing. and i'm wondering if we should try to use source code control, so one gets the changes of the other? emmanuel? are you reading this?
Hide
Permalink
THURNER rupert added a comment - 05/Oct/06 6:30 PM

this time after doing a "mvn clean".

could somebody more powerful throw away all the other source files?

Show
THURNER rupert added a comment - 05/Oct/06 6:30 PM this time after doing a "mvn clean". could somebody more powerful throw away all the other source files?
Hide
Permalink
Alain Hoang added a comment - 12/Oct/06 4:55 PM

My current work in progress. Have not had time to continue working on this lately.

Show
Alain Hoang added a comment - 12/Oct/06 4:55 PM My current work in progress. Have not had time to continue working on this lately.
Hide
Permalink
Alain Hoang added a comment - 12/Oct/06 4:57 PM

I've uploaded my current work. I'm afraid I've not had time really work on it lately.

If people are interested I can try hosting the provider plugin in a hg repository to make colloboraton easier until this gets merged into the main svn tree

Show
Alain Hoang added a comment - 12/Oct/06 4:57 PM I've uploaded my current work. I'm afraid I've not had time really work on it lately. If people are interested I can try hosting the provider plugin in a hg repository to make colloboraton easier until this gets merged into the main svn tree
Hide
Permalink
THURNER rupert added a comment - 22/Oct/06 3:32 AM

1. created mercurial rep (so the zip contains a .hg as well)
2. applied (some of) alains patches
3. removed some of the assertions

Show
THURNER rupert added a comment - 22/Oct/06 3:32 AM 1. created mercurial rep (so the zip contains a .hg as well) 2. applied (some of) alains patches 3. removed some of the assertions
Hide
Permalink
Ryan Daum added a comment - 23/Oct/06 5:22 PM

I would like to assist with the development of this plugin. I've checked out all the source I need, and used thurner's 0.09 tbz (with its hg repos), but only 2 of the unit tests pass. Is all of Alain's work patched into that version? Can somebody host an hg repository somewhere that will hold the mainline of this work?

Show
Ryan Daum added a comment - 23/Oct/06 5:22 PM I would like to assist with the development of this plugin. I've checked out all the source I need, and used thurner's 0.09 tbz (with its hg repos), but only 2 of the unit tests pass. Is all of Alain's work patched into that version? Can somebody host an hg repository somewhere that will hold the mainline of this work?
Hide
Permalink
Ryan Daum added a comment - 23/Oct/06 9:41 PM

I have done some work and put a branch of thurner's repository up at:

http://darksleep.com/~ryan/maven-scm-provider-hg.cgi

I made changes so that all tests but 3 pass. One of these failures is related to the diff format as noted above.

The other one, I cannot see an easy way to resolve, as it is part of the Scm tests packaged with Maven SCM itself. Basically, the test tries to add an empty directory, then expects to see a status result saying "added" for the directory addition. Hg knows nothing of directories, just the files in them, so the hg command returns 0 for the # of files in the status results. The test then fails. The only thing I can think to do is make the add command "lie" for empty directory additions, but this is so hacky I fear it. Perhaps the CVS SCM plugin has some ideas I can pilfer.

Show
Ryan Daum added a comment - 23/Oct/06 9:41 PM I have done some work and put a branch of thurner's repository up at: http://darksleep.com/~ryan/maven-scm-provider-hg.cgi I made changes so that all tests but 3 pass. One of these failures is related to the diff format as noted above. The other one, I cannot see an easy way to resolve, as it is part of the Scm tests packaged with Maven SCM itself. Basically, the test tries to add an empty directory, then expects to see a status result saying "added" for the directory addition. Hg knows nothing of directories, just the files in them, so the hg command returns 0 for the # of files in the status results. The test then fails. The only thing I can think to do is make the add command "lie" for empty directory additions, but this is so hacky I fear it. Perhaps the CVS SCM plugin has some ideas I can pilfer.
Hide
Permalink
Ryan Daum added a comment - 23/Oct/06 10:09 PM

Sorry for being so spammy, but I just added the above kludge to fake addition for empty directories. Now the remaining problems are log and diff file format as mentioned by Alain above.

Show
Ryan Daum added a comment - 23/Oct/06 10:09 PM Sorry for being so spammy, but I just added the above kludge to fake addition for empty directories. Now the remaining problems are log and diff file format as mentioned by Alain above.
Hide
Permalink
Ryan Daum added a comment - 25/Oct/06 3:32 PM

I have made all the unit tests pass, except one (HgCheckoutCommandTest), which has some heisenbug which causes it to fail inconsistently. Running it in the debugger and putting breakpoints in... causes it to pass. "mvn test" succeeds about 50% of the time.

Show
Ryan Daum added a comment - 25/Oct/06 3:32 PM I have made all the unit tests pass, except one (HgCheckoutCommandTest), which has some heisenbug which causes it to fail inconsistently. Running it in the debugger and putting breakpoints in... causes it to pass. "mvn test" succeeds about 50% of the time.
Hide
Permalink
Ryan Daum added a comment - 25/Oct/06 5:01 PM

Found the source of the problem. It is in HgChangeLogCommandTckTest, and is actually a problem in the last test in the base ChangeLogCommandTckTest. Basically it checks in two revisions then tries, using date/time filtering to retrieve only the later one. This may work fine for slow network based revision control systems, but for Mercurial, the creation of the file and its checkin happens within the same second, so the log reports the same time for creation of both revisions, and nothing fits within the date filter range. In some cases, if the checkin happens of the second file happens to occur after the second value of the date increments, the test passes.

I am unable to fix this, it is IMHO a defect in the base ChangeLogCommandTckTest.

Show
Ryan Daum added a comment - 25/Oct/06 5:01 PM Found the source of the problem. It is in HgChangeLogCommandTckTest, and is actually a problem in the last test in the base ChangeLogCommandTckTest. Basically it checks in two revisions then tries, using date/time filtering to retrieve only the later one. This may work fine for slow network based revision control systems, but for Mercurial, the creation of the file and its checkin happens within the same second, so the log reports the same time for creation of both revisions, and nothing fits within the date filter range. In some cases, if the checkin happens of the second file happens to occur after the second value of the date increments, the test passes. I am unable to fix this, it is IMHO a defect in the base ChangeLogCommandTckTest.
Hide
Permalink
Ryan Daum added a comment - 25/Oct/06 5:10 PM

Completion of the passing of all Hg SCM provider tests relies on a fix to SCM-244.

Show
Ryan Daum added a comment - 25/Oct/06 5:10 PM Completion of the passing of all Hg SCM provider tests relies on a fix to SCM-244 .
Hide
Permalink
Alain Hoang added a comment - 25/Oct/06 5:41 PM

If you want the test to pass now. It might be possible to override ChangeLongCommandTckTest to perform the behavior that you want with a huge caveat and link to the issues at hand. This should work as a workaround until upstream decides what they want to do with this test.

While working on the Mercurial plugin I found a couple of other crappy assumptions in the TckTest Suite which caused me some aggravation.

Show
Alain Hoang added a comment - 25/Oct/06 5:41 PM If you want the test to pass now. It might be possible to override ChangeLongCommandTckTest to perform the behavior that you want with a huge caveat and link to the issues at hand. This should work as a workaround until upstream decides what they want to do with this test. While working on the Mercurial plugin I found a couple of other crappy assumptions in the TckTest Suite which caused me some aggravation.
Hide
Permalink
Ryan Daum added a comment - 25/Oct/06 5:47 PM

I will give SCM-244 a few days to gel, and see if anybody looks like they'll move on it. If not, I may do as you say.

I am new to the Maven community, and do not know how I would go about getting the Mercurial plugin included in the Maven 2 distribution, and also if it's permissible to just get SVN access and fix the ChangeLongCommandTckTest base class myself. Any ideas? The company I work for is making use of Mercurial, as well as Maven, and I want to be able to use Continuum and other features of Maven that rely on SCM support.

Show
Ryan Daum added a comment - 25/Oct/06 5:47 PM I will give SCM-244 a few days to gel, and see if anybody looks like they'll move on it. If not, I may do as you say. I am new to the Maven community, and do not know how I would go about getting the Mercurial plugin included in the Maven 2 distribution, and also if it's permissible to just get SVN access and fix the ChangeLongCommandTckTest base class myself. Any ideas? The company I work for is making use of Mercurial, as well as Maven, and I want to be able to use Continuum and other features of Maven that rely on SCM support.
Hide
Permalink
THURNER rupert added a comment - 27/Oct/06 12:54 AM

upload a patch and mailbomb scm-dev@maven.apache.org mailing list

i wonder also if there is a place to document the testcases so that people need not to "reverse engineer" them by codereading. some poeple prefer a top-down approach ...

Show
THURNER rupert added a comment - 27/Oct/06 12:54 AM upload a patch and mailbomb scm-dev@maven.apache.org mailing list i wonder also if there is a place to document the testcases so that people need not to "reverse engineer" them by codereading. some poeple prefer a top-down approach ...
Hide
Permalink
THURNER rupert added a comment - 27/Oct/06 12:56 AM

btw, thanks a lot for the fixes! we also have this problem.

Show
THURNER rupert added a comment - 27/Oct/06 12:56 AM btw, thanks a lot for the fixes! we also have this problem.
Hide
Permalink
Ryan Daum added a comment - 27/Oct/06 5:03 PM

The latest maven-scm-provider-hg after all my recent work (all but 1 unit tests pass).

Show
Ryan Daum added a comment - 27/Oct/06 5:03 PM The latest maven-scm-provider-hg after all my recent work (all but 1 unit tests pass).
Hide
Permalink
Joakim Erdfelt added a comment - 27/Oct/06 6:02 PM

Initial version of the maven-scm-provider-hg has been commit'd to http://svn.apache.org/repos/asf/maven/scm/trunk/sandbox/maven-scm-provider-hg/

Show
Joakim Erdfelt added a comment - 27/Oct/06 6:02 PM Initial version of the maven-scm-provider-hg has been commit'd to http://svn.apache.org/repos/asf/maven/scm/trunk/sandbox/maven-scm-provider-hg/
Hide
Permalink
Ryan Daum added a comment - 23/Jan/07 12:38 PM

What happened to the above SVN repository? Where can I find the latest hg scm provider sources? Is there any chance that this will ever make it into the main Maven 2 build?

Show
Ryan Daum added a comment - 23/Jan/07 12:38 PM What happened to the above SVN repository? Where can I find the latest hg scm provider sources? Is there any chance that this will ever make it into the main Maven 2 build?
Hide
Permalink
Emmanuel Venisse added a comment - 23/Jan/07 12:51 PM

it is in maven sandbox : http://svn.apache.org/repos/asf/maven/sandbox/scm/maven-scm-provider-hg/
I'll look at it if we can move it in maven-scm trunk

Show
Emmanuel Venisse added a comment - 23/Jan/07 12:51 PM it is in maven sandbox : http://svn.apache.org/repos/asf/maven/sandbox/scm/maven-scm-provider-hg/ I'll look at it if we can move it in maven-scm trunk
Hide
Permalink
Ryan Daum added a comment - 23/Jan/07 1:18 PM

I've attached a patch to dependent issue SCM-244 which fixes the one remaining test that was failing maven-scm-provider-hg

Show
Ryan Daum added a comment - 23/Jan/07 1:18 PM I've attached a patch to dependent issue SCM-244 which fixes the one remaining test that was failing maven-scm-provider-hg
Hide
Permalink
Ryan Daum added a comment - 12/Apr/07 10:29 AM

Since I don't have check-in priviledges, and I've done work to bring this provider up to spec with the current 1.0-SNAPSHOT maven-scm API that is on trunk, I am attaching a tarball for someeone else (Emmanuel?) to check into Subversion.

Show
Ryan Daum added a comment - 12/Apr/07 10:29 AM Since I don't have check-in priviledges, and I've done work to bring this provider up to spec with the current 1.0-SNAPSHOT maven-scm API that is on trunk, I am attaching a tarball for someeone else (Emmanuel?) to check into Subversion.
Hide
Permalink
Ryan Daum added a comment - 12/Apr/07 10:30 AM

Please integrate this provider; passes all tests.

Show
Ryan Daum added a comment - 12/Apr/07 10:30 AM Please integrate this provider; passes all tests.
Hide
Permalink
Emmanuel Venisse added a comment - 12/Apr/07 11:17 AM

Can you provide a patch for the site?

Show
Emmanuel Venisse added a comment - 12/Apr/07 11:17 AM Can you provide a patch for the site?
Hide
Permalink
Ryan Daum added a comment - 12/Apr/07 1:06 PM

Sure. Attaching.

I also have a slight modification to the existing HgScmProvider which I will add as a patch once the initial version is checked in (so I have something to do the diff against.)

Show
Ryan Daum added a comment - 12/Apr/07 1:06 PM Sure. Attaching. I also have a slight modification to the existing HgScmProvider which I will add as a patch once the initial version is checked in (so I have something to do the diff against.)
Hide
Permalink
Ryan Daum added a comment - 12/Apr/07 1:14 PM

Oops, there was a problem with the last patch in the way it created the new mercurial.apt

Here's new and improved

Show
Ryan Daum added a comment - 12/Apr/07 1:14 PM Oops, there was a problem with the last patch in the way it created the new mercurial.apt Here's new and improved
Hide
Permalink
Emmanuel Venisse added a comment - 13/Apr/07 5:03 AM

Applied. Thanks

Show
Emmanuel Venisse added a comment - 13/Apr/07 5:03 AM Applied. Thanks
Hide
Permalink
Ryan Daum added a comment - 13/Apr/07 9:19 AM

Please find attached a patch which fixes the following issues:

1. Allow file/http/https URLs for checkout
2. Fix bug where checkout would only work while inside an existing repository
3. IntelliJ IDEA project file was accidently checked in.

Show
Ryan Daum added a comment - 13/Apr/07 9:19 AM Please find attached a patch which fixes the following issues: 1. Allow file/http/https URLs for checkout 2. Fix bug where checkout would only work while inside an existing repository 3. IntelliJ IDEA project file was accidently checked in.

People

  • Assignee:
    Emmanuel Venisse
    Reporter:
    solo turn
Vote (2)
Watch (3)

Dates

  • Created:
    11/Sep/06 3:06 PM
    Updated:
    13/Apr/07 9:19 AM
    Resolved:
    13/Apr/07 5:03 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.