Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share #7

Merged
merged 10 commits into from Oct 17, 2011
Merged

Share #7

merged 10 commits into from Oct 17, 2011

Conversation

willemv
Copy link
Contributor

@willemv willemv commented Oct 11, 2011

Added support for the Mercurial's ShareExtension to reduce disk usage.

To get there, I switched polling and changelog calculation to a 'hg log' based technique, added an extra share checkbox in the installation configuration and updated the MercurialSCM implementation.

The changes are covered by tests.

There are still some serious opportunities for refactoring.

-The pull request for [JENKINS-10255] has not been incorporated into this yet. Since the polling and changelog calculation in this pull request is already based on hg log iso hg incoming, it should be possible to incorporate a fix for [JENKINS-10255] in this pull request.-

EDIT : JENKINS-10255 has been fixed in the meantime

willemv and others added 7 commits September 11, 2011 21:42
This the first step towards using the share extension to reduce disk usage. In that scenario multiple jobs will share and update the same mercurial data store, i.e. the same history DAG, so 'hg incoming' loses its meaning.

TODO : see how compatible this is with the forest extension
…ing option

TODO: transition between caching and sharing
@willemv
Copy link
Contributor Author

willemv commented Oct 11, 2011

I've just found an issue with this pull request : it uses 'hg tip' to determine the current state of the repository, which is wrong. The tip in Mercurial is the changeset that was added last to the history, no matter what branch, so it's basically nearly always useless. You want to use 'hg parent' to get the revision to which you just updated

EDIT : never mind, hg.tip() does not use 'hg tip', but 'hg log --rev .', which is correct

Willem Verstraeten added 3 commits October 12, 2011 13:42
…he previous build, rather than the changes since the latest build on this slave, which can be quite different.
@davidmc24
Copy link
Contributor

I'm working on testing this pull request. Assuming that I don't find any problems, I'll commit it.

@@ -67,6 +65,22 @@ public class MercurialChangeLogParser extends ChangeLogParser {
}
}

//sort the changes from oldest to newest, this gives the best result in the Jenkins changes view,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this part needed? Did the rev specification in determineChanges not give the right ordering, or was this to handle backwards compatibility with previous versions of the plugin that may have persisted change log files with incorrect ordering?

@davidmc24 davidmc24 merged commit 31b6963 into jenkinsci:master Oct 17, 2011
@jglick
Copy link
Member

jglick commented Oct 17, 2011

Have yet to understand the purpose of this feature. If you simply use caching, then the repo in a workspace will already be hard-linked to the (local) cache repo, so all "similar" repos on a given node should be sharing data store files at the inode level even without the Share extension. (Assuming your Mercurial is new enough to have the Relink extension, this should also be true after repeated updates: the workspace repos are periodically relinked against the cache.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants