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 248811 - Need a way to determine if a FO is VCS modified
Summary: Need a way to determine if a FO is VCS modified
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks: 219850
  Show dependency tree
 
Reported: 2014-11-21 16:47 UTC by Ondrej Vrabec
Modified: 2015-01-23 17:37 UTC (History)
2 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Vrabec 2014-11-21 16:47:13 UTC
VCS subsystem needs to somehow return if a file is modified or up to date. We can use FO.getAttribute and every VCS responsible for a file should return a Boolean instance - TRUE file is modified, FALSE file is up to date (or not yet committed/ignored etc.), null if unknown or the file is not under the VCS's control.
Comment 1 Ondrej Vrabec 2014-11-21 17:36:18 UTC
Implementing in git and mercurial, you can do the same in Subversion. You may prepare a patch and i will integrate it.
One thing i was not sure about though: what is "modified" file? Should it also be a locally new/uncommitted file? At the moment true is returned only for: committed+modified or file in conflict. If you wanted a wider status set let me know.
Comment 2 Ondrej Vrabec 2014-11-21 17:36:51 UTC
fixed: core-main #607de149e5de
Comment 3 Quality Engineering 2014-11-23 04:35:50 UTC
Integrated into 'main-silver', will be available in build *201411230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/607de149e5de
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #248811 - Need a way to determine if a FO is VCS modified
Introducing an attribute ProvidedExtensions.IsVCSModified. FO.getAttribute returns TRUE
if a VCS managing the file marks it as modified, FALSE if it marks it as up to date or uncommitted
or null if not under VCS or the managing VCS does not know anything about it.

Implemented in Git and Mercurial.
Comment 4 Ondrej Vrabec 2014-11-24 11:12:59 UTC
After a discussion with Benno, we agreed that TRUE should be returned also for NEW + ADDED files: updating in Git + Hg...

fix: http://hg.netbeans.org/core-main/rev/1e0387eba602
Comment 5 Ondrej Vrabec 2014-11-24 11:30:29 UTC
fix: http://hg.netbeans.org/core-main/rev/7366c9a6c643
Comment 6 Quality Engineering 2014-11-25 04:31:21 UTC
Integrated into 'main-silver', will be available in build *201411250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1e0387eba602
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #248811 - Need a way to determine if a FO is VCS modified
Return TRUE also for new and added files.