Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

Error when attempting a second conflict resolution #64

Closed
samson8720 opened this issue Apr 21, 2017 · 6 comments
Closed

Error when attempting a second conflict resolution #64

samson8720 opened this issue Apr 21, 2017 · 6 comments

Comments

@samson8720
Copy link

I appreciate the patience and assistance with my inquiries.

The first time a conflict is detected between a working copy and the trunk revision head, all works well. After making an edit to create a conflict a second time with the same table, the following Python error is created

2017-04-20T21:00:19 1 Traceback (most recent call last):
File "C:/Users/GEOSYS/.qgis2/python/plugins\qgis_versioning\plugin.py", line 800, in update
versioning.pg_update( uri.connectionInfo(), uri.schema() )
File "C:/Users/GEOSYS/.qgis2/python/plugins\qgis_versioning\versioning.py", line 1630, in pg_update
pcur.execute("DROP TABLE IF EXISTS "+wcs+"."+table+"_cflt ")
File "C:/Users/GEOSYS/.qgis2/python/plugins\qgis_versioning\versioning.py", line 171, in execute
raise e
InternalError: cannot drop table wc2.parcels_cflt because other objects depend on it
DETAIL: view wc2.parcels_conflicts depends on table wc2.parcels_cflt
HINT: Use DROP ... CASCADE to drop the dependent objects too.

Do you have sufficient information in the error message to explain why the error occurs?

Thanks for the assistance.

@gignacnic
Copy link
Contributor

From what I understand, you have not committed after the first conflict? What have you done when you had to remove or keep mines vs theirs? Based on the documentation: http://www.oslandia.com/qgis-versioning-plugin-en.html
_To resolve conflicts, the user can open the conflict layer's attribute table. Selected entries are also selected on the map canvas and the user can decide which version, either his or the database's, he wants to keep. User version is tagged with 'mine' and database version with 'theirs'. The conflict is resolved by deleting the unwanted entry in the conflict layer.
Note:
On deletion of one conflict entry, both entries are removed (by a trigger) but the attribute table (and canvas) are not refreshed. As a workaround, the user can close and re-open the attribute table to see the actual state of the conflict table.

Once the conflict table is empty, the commit can be done._

@samson8720
Copy link
Author

samson8720 commented Apr 26, 2017

Here are the steps taken to generate the error message. The user has superuser privileges. Edits below are made on the same computer.

  1. Two working copies were created from the trunk_rev_head: working_copy_1 and working_copy_2.

  2. Working_copy_1 started an edit session, reshaped a polygon, saved edits and exits the edit session.

  3. Working_copy_1 commits the changes.

  4. Working_copy_2 started an edit session, reshaped the same polygon working_copy_1 had before editing, saved edits and exited the edit session.

  5. Working_copy_2 performs an update and is informed of a conflict.

  6. Working_copy_2 opens the attribute table of the _conflict layer, starts an edit session, deletes his edit ("mine") and exits from the edit session.

  7. Working_copy_2 executes an update again without a problem.

  8. Working_copy_1 reshapes a polygon different from the previous polygon. Working_copy_1 commits to the trunk_rev_head.

  9. Working_copy_2 reshapes the same polygon Working_copy_1 reshaped in the previous step.

  10. Working_copy_2 attempts to update with the trunk_rev_head but the error message is generated.

  11. Working_copy_2 cannot delete the layers created during the first update.

@gignacnic
Copy link
Contributor

Ok, have you done a commit of working copy 2 after step #7? After a commit, a new checkout should be done once again.

@samson8720
Copy link
Author

After working copy 2 does a commit, working copy 2 must be removed and another working copy created in place of the removed working copy 2?

@gignacnic
Copy link
Contributor

Yes

@samson8720
Copy link
Author

Thank you for your help. I understand the workflow much clearer now. Problem resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants