netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

The mercurial `evolve` subsystem isn't well handled

Open errael opened this issue 2 years ago • 0 comments

Apache NetBeans version

Apache NetBeans 18

What happened

With mercurial editor change bars dont' go away after hg amend

  1. Make code changes, see change bars.
  2. Manuall do hg amend in a system console
  3. The change bars don't go away.
  4. Click on Refresh status in mercurial output window and the status updates and the change bars go away.

Manually doing hg ci and it works as expected.

Another failure mode

  1. Make code changes, see change bars.
  2. Manuall do hg amend.
  3. Make some trivial change, just a few lines.

Observe the change bars both from step 1 changes and step 3 changes.

  1. Click on Refresh status in mercurial output window. Only want to see the actual pending changes.

Expect: only change bars for step 3, none for changes in step 1. Observe: still see change bars for both step 1 and step 3 changes.

  1. Manually did hg amend so no changes in working directory and then doing Refresh status worked to clear all change bars.

In mercurial window clicked Update All, in messages.log

INFO [org.netbeans.ui.metrics.vcs]: USG_VCS_REPOSITORY
WARNING [org.netbeans.modules.mercurial]: command: [hg, log, -v, -l, 7, --repository, /ref/tools/astrolog.d/castro/AstroComp, --debug, --rev, tip:0, --style=/tmp/vcs-1687118197615/vcs-1687132109249/log.style]
WARNING [org.netbeans.modules.mercurial]: output: [abort: hidden revision '0' was rewritten as: 65ae058ee044, (use --hidden to access hidden revisions)]

Mercurial's evolve is a feature, evolve, which allows changsets/history to be rewritten without losing anything. Changesets that are superceded become hidden and are not normally seen. They can be seen by using the --hidden option to several commands.

I've never look at the NetBeans VCS/Mercurial subsystems. I'm wondering how things are detected. Why would NetBeans hg ci changes be detected, but not 'hg amend' changes. Not sure when I'll get time; maybe there's debug logging that can be turned on? Any suggestions on what to look at?

How to reproduce

See above

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux harmony 6.0.6-76060006-generic #202210290932~1667401208~22.04~d2df702 SMP PREEMPT_DYNAMIC Wed N x86_64 x86_64 x86_64 GNU/Linux

JDK

java version "17.0.6" 2023-01-17 LTS Java(TM) SE Runtime Environment (build 17.0.6+9-LTS-190) Java HotSpot(TM) 64-Bit Server VM (build 17.0.6+9-LTS-190, mixed mode, sharing)

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

errael avatar Jun 19 '23 15:06 errael