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.

Bug 123361 - Revert modifications creates *.orig and starts update
Summary: Revert modifications creates *.orig and starts update
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@versioncontrol
Keywords: RELNOTE
Depends on:
Reported: 2007-12-04 14:46 UTC by Jiri Skrivanek
Modified: 2008-01-03 09:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Proposed patch (2.16 KB, text/plain)
2007-12-06 18:48 UTC, John Rice

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2007-12-04 14:46:02 UTC
If you call Revert modification, it takes long time on big repository because it calls update afterwards. Also there are
*.orig files left and visible in Projects view. To reproduce:

- take repository from
- open o.o.util project in IDE
- modify e.g.
- call 'Mercurial|Revert Modifications'. You can see 'Update' progress bar at the bottom which takes some time. Also
there is in Projects view.

Mercurial plugin, Mercurial runtime 0.9.5, NetBeans IDE Dev (Build 20071204063712), WindowsXP.
Comment 1 John Rice 2007-12-05 16:39:51 UTC
Refer to 121715: Added to Mercurial Global Options checkbox to determine if backups of Locally Modified files are made
on Revert Modifications. Default setting is to make backups, which seems sensible given the comments on Local History.

This will allow you to turn off backups and stop the .orig files appearing.

I'll look into the Update issue.
Comment 2 John Rice 2007-12-06 14:12:05 UTC
I have looked into this, it appears to be a Hg issue due to the size of your repository with over 67k files. I run the
following revert command from the command line against your repository, having modified and saved to disc the file, this is the exact same command we are running from within the IDE:

$ time hg revert --repository /export/home/jr140578/work/main --rev 0

real    0m59.899s
user    0m27.126s
sys     0m3.109s
bash-3.2$ ls

So this is pretty close to the profile timings I see in the IDE:
performRevert: 70 sec
  doRevert:    67 sec
  scanFolder:   3 sec

There are a number of hg status commands being run that could be optimized, but this accounts for only 3sec of the
overall 70 sec for the performRevert call. Also would like to know why in the IDE doing an exec it seems to take an
extra 7 sec.

We'll log a bug against Mercurial and see what comes of it.

Comment 3 John Rice 2007-12-06 14:24:20 UTC
Bug logged:

Will release note the issue.
Comment 4 Jiri Skrivanek 2007-12-06 14:54:42 UTC
Thank you for the evaluation. I thought it is problem of plugin but you are right it takes about 50s from command line
as well.
Comment 5 John Rice 2007-12-06 18:03:52 UTC
Changed the status bar text to Reverting... and removed a redundant refresh cache call.
Comment 6 John Rice 2007-12-06 18:06:04 UTC
Changed the status bar text to Reverting... and removed a redundant refresh cache call.
Comment 7 John Rice 2007-12-06 18:48:55 UTC
Created attachment 53960 [details]
Proposed patch
Comment 8 John Rice 2007-12-06 18:52:25 UTC
IDE: [06/12/07 18:50] Committing started
Checking in ui/update/;
new revision: 1.5; previous revision: 1.4
Checking in ui/update/;
new revision: 1.7; previous revision: 1.6
Checking in util/;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/,v  <--
new revision: 1.23; previous revision: 1.22
IDE: [06/12/07 18:50] Committing finished
Comment 9 Jiri Skrivanek 2007-12-07 13:54:35 UTC