This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans' Mercurial "diff" command diffs against the tip revision, not the parent of the current revision. This means that if the workspace is in a branch, the diffs will be wrong. Steps to reproduce: hg init echo "AAA" > A hg addremove hg ci -m "1" hg branch X echo "BBB" >> A hg ci -m "2" hg up -r default echo "CCC" >> A hg ci -m "3" hg up -r X echo "DDD" >> A Now, create a project from this directory. "hg diff" will show the correct diff: 1132 % hg diff diff -r 2706f3fba91b A --- a/A Thu May 28 08:59:27 2009 -0400 +++ b/A Thu May 28 08:59:32 2009 -0400 @@ -1,2 +1,3 @@ AAA BBB +DDD But in Netbeans, the diff will show the changes compared to the tip of the "default" branch, which matches what it exports when you choose "export uncommitted changes": # This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /home/ser/Temp # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: A --- A Base (BASE) +++ A Locally Modified (Based On LOCAL) @@ -1,2 +1,3 @@ AAA -CCC +BBB +DDD This is wrong, since it does not agree with "hg diff." Netbeans should always compare against the parent (which is where any commit will occur), not against some other branch tip.
fix: cdev #219edc21a4fd We used tip as the requested revision, now we use the default value - which should select parent
Integrated into 'main-golden', will be available in build *200905300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/219edc21a4fd User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #166178 - Mercurial diff uses wrong "base" do not set tip for the requested revision, but rather use the default one - parent
Thanks. It looks like it is working correctly now.
The fix has been ported into the release67_fixes repository. http://hg.netbeans.org/release67_fixes/rev/6c83006dc19b