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 179412 - Cannot commit when working copy has tree-conflicts
Summary: Cannot commit when working copy has tree-conflicts
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 04:46 UTC by Eduardo.m Costa
Modified: 2011-11-13 20:09 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo.m Costa 2010-01-12 04:46:13 UTC
When trying to commit a working copy with tree conflicts, I get this error:

org.tigris.subversion.javahl.ClientException: A conflict in the working copy obstructs the current operation
Commit failed (details follow):
Aborting commit: '<path-to-my-folder>' remains in tree-conflict

This conflict seems ignored and unresolvable by Netbeans (I could only find it externally, with TortoiseSVN).

And it is easy to reproduce: it happens when I delete a folder (using Files TC)!
Comment 1 i30817 2010-03-02 05:39:05 UTC
Happening to me too.
Comment 2 maxo 2010-03-31 14:11:46 UTC
Confirmed, I'm also having this problem. When I delete a folder, Netbeans is unable to commit this to SVN.
Comment 3 saxman 2010-04-01 07:02:33 UTC
i have the same problem using Netbeans 6.8 and SVN Client.
Comment 4 Ondrej Vrabec 2010-04-22 15:17:17 UTC
partial fix: http://hg.netbeans.org/cdev/rev/730263455024
detecting tree conflicts with javahl
Comment 5 Quality Engineering 2010-04-23 04:34:05 UTC
Integrated into 'main-golden', will be available in build *201004230200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/730263455024
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #179412 - Cannot commit when working copy has tree-conflicts
Comment 6 Ondrej Vrabec 2010-04-29 15:01:55 UTC
conflicts detection for commandline client: http://hg.netbeans.org/cdev/rev/337ba1ebb1ed
Comment 7 Ondrej Vrabec 2010-04-29 15:19:17 UTC
NetBeans should now be able to recognize tree conflicts. There's currently no UI which would help you with resolving the conflict, so you have to do it manually (use revert, delete, etc.) and when you're satisfied with the WC's state, run Resolve Conflicts from the popup menu.
Changing to enhancement, we should probably provide some UI for resolving conflicts.
Comment 8 marcusson 2011-11-13 20:07:41 UTC
This last note is not true. There IS an UI that resolves tree-conflicts: Tortoise SVN does.

There are two ways a tree-conflict might occur: A) a file/directory is locally deleted but exists and is modified in the repository B) a file/directory was locally modified but is deleted in the repository.
(We don't care for local delete + remote delete.)

Tortoise thus brings up a dialog giving you two options: (1) keep local copy, (2) use copy from repository.

Option (1) resolves the conflict by marking your changes as "added", allowing a clean check-in of your modifications, while option (2) forfeits your changes (possibly deleting files) and does a clean check-out from the repository.

Thus what needs to be done is:
- update SVN-cache of corrupted local file/directory to HEAD-revision
- Option A1) mark the file/directory as "deleted"
- Option A2) revert the deleted file/directory
- Option B1) mark local file/directory as "added"
- Option B2) delete local file/directory
- mark conflict as "resolved"

Tortoise is Open-Source. You may want to check how they are doing it. The source is right here: http://www.google.com/codesearch#XJa9F1p-bAg/trunk/src/TortoiseProc/TreeConflictEditorDlg.cpp

After all this problem seems to be easier to solve than it appeared to be in the first place. You may want to give it a try.
Comment 9 Ondrej Vrabec 2011-11-13 20:09:30 UTC
> This last note is not true. There IS an UI that resolves tree-conflicts: Tortoise SVN does.
What i meant by my comment was: There is no UI in NetBeans letting you resolve the conflicts