-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
Platform: All, OS: Linux
Two bugs when working with branches:
1. Hudson thinks there are changes, even when there aren't any.
2. Workspaces are not the proper checkout.
Here are two patches for src/main/java/hudson/plugins/mercurial/MercurialSCM.java:
For issue #1:
// Get the list of changed files.
+ ArgumentListBuilder args = new ArgumentListBuilder();
+ args.add(getDescriptor().getHgExe(), "incoming", "--style",
tmpFile.getCanonicalPath());
+ if (branch != null)
+
launcher.launch(
- new String[]
{getDescriptor().getHgExe(), "incoming", "--style",
tmpFile.getCanonicalPath()}
,
+ args.toCommandArray(),
EnvVars.masterEnvVars, new ForkOutputStream(baos, output),
workspace).join();
For issue #2:
- if(branch!=null) args.add("-r",branch);
- args.add(source,workspace.getRemote());
+ if(branch!=null) { + args.add(source + "#" + branch,workspace.getRemote()); + }else
{ + args.add(source,workspace.getRemote()); + }
- duplicates
-
JENKINS-4281 Better handling of Mercurial branches
- Closed