Skip to content
Permalink
Browse files

[JENKINS-11363] Only enable the share extension when it's both config…

…ured and actually needed by the command.
  • Loading branch information...
davidmc24 committed Oct 16, 2011
1 parent ef5b342 commit 24c3a797f2feb8d8e1f3994a04e7dd0eabaa9cad
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/main/java/hudson/plugins/mercurial/MercurialSCM.java
@@ -235,9 +235,6 @@ ArgumentListBuilder findHgExe(Node node, TaskListener listener, boolean allowDeb
b.add("--config", "extensions.forest=" + forestPy.getRemote());
}
}
if (inst.isUseSharing()) {

This comment has been minimized.

Copy link
@willemv

willemv Nov 3, 2011

Contributor

Don't you always need to enable the share extension, for every hg command ? Otherwise the other hg commands won't be able to find the store of the mercurial history.

This comment has been minimized.

Copy link
@davidmc24

davidmc24 Nov 3, 2011

Author Contributor

My reading of the share extension is that it being "active" is only relevant for the "share" and "unshare" commands. I could be mistaken, however. Do you have any examples where this code isn't working?

http://selenic.com/hg/file/c1eb8398fe82/hgext/share.py

b.add("--config", "extensions.share=");
}
if (allowDebug && inst.getDebug()) {
b.add("--debug");
}
@@ -566,6 +563,7 @@ private boolean clone(AbstractBuild<?,?> build, Launcher launcher, FilePath repo
PossiblyCachedRepo cachedSource = cachedSource(build.getBuiltOn(), launcher, listener, false);
if (cachedSource != null) {
if (cachedSource.isUseSharing()) {
args.add("--config", "extensions.share=");
args.add("share");
args.add("--noupdate");
args.add(cachedSource.getRepoLocation());

0 comments on commit 24c3a79

Please sign in to comment.
You can’t perform that action at this time.