Revision 8892
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
148 | 148 |
_Revision_number_field=Campo n\u00famero de revisi\u00f3n |
149 | 149 |
_VCS_Import_history=Importar historial |
150 | 150 |
_Import_history=Importar historial |
151 |
_The_process_has_created_local_changes_that_would_need_to_be_committed_to_the_repository=El proceso ha creado cambios locales que ser\u00eda necesario "confirmar" en el repositorio
|
|
151 |
_The_process_has_modified_local_changes_that_would_need_to_be_committed_to_the_repository=El proceso ha modificado cambios locales que podr\u00eda ser necesario "confirmar" en el repositorio
|
|
152 | 152 |
_VCSGis_Merge=VCSGis mezcla |
153 | 153 |
_User=Usuario |
154 | 154 |
_Password=Contrase\u00f1a |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
136 | 136 |
_Revision_number_field=Revision number field |
137 | 137 |
_VCS_Import_history=Import history |
138 | 138 |
_Import_history=Import history |
139 |
_The_process_has_created_local_changes_that_would_need_to_be_committed_to_the_repository=The process has created local changes that would need to be committed to the repository
|
|
139 |
_The_process_has_modified_local_changes_that_would_need_to_be_committed_to_the_repository=The process has modified local changes that would need to be committed to the repository
|
|
140 | 140 |
_VCSGis_Merge=VCSGis merge |
141 | 141 |
_User=User |
142 | 142 |
_Password=Password |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspaceImpl.java | ||
---|---|---|
3468 | 3468 |
return update(tableName, prepare, merge, null, status); |
3469 | 3469 |
} |
3470 | 3470 |
|
3471 |
public int update(String tableName, boolean prepare, boolean merge, MutableLong localChangesCreated, SimpleTaskStatus status) {
|
|
3471 |
public int update(String tableName, boolean prepare, boolean merge, MutableLong localChangesModifieds, SimpleTaskStatus status) {
|
|
3472 | 3472 |
if( this.isOffline() ) { |
3473 | 3473 |
return ERR_OFFLINE; |
3474 | 3474 |
} |
3475 |
if(localChangesCreated == null){
|
|
3476 |
localChangesCreated = new MutableLong(0);
|
|
3475 |
if(localChangesModifieds == null){
|
|
3476 |
localChangesModifieds = new MutableLong(0);
|
|
3477 | 3477 |
} |
3478 | 3478 |
int errcode = ERR_NO_ERROR; |
3479 | 3479 |
if (status == null) { |
... | ... | |
3689 | 3689 |
LOGGER.debug("===: UPDATE: add update operation to RelatedFeatureCode "+remoteChangeRow.getRelatedFeatureCode()); |
3690 | 3690 |
this.addChange(null, lentity, OP_UPDATE, workspaceChangesStore, f, feature, null); |
3691 | 3691 |
} |
3692 |
localChangesCreated.increment();
|
|
3692 |
localChangesModifieds.increment();
|
|
3693 | 3693 |
break; |
3694 | 3694 |
|
3695 | 3695 |
case OP_UPDATE: |
... | ... | |
3701 | 3701 |
LOGGER.debug("===: UPDATE: add update operation to RelatedFeatureCode "+remoteChangeRow.getRelatedFeatureCode()); |
3702 | 3702 |
this.addChange(null, lentity, OP_UPDATE, workspaceChangesStore, f, feature,null); |
3703 | 3703 |
} |
3704 |
localChangesCreated.increment();
|
|
3704 |
localChangesModifieds.increment();
|
|
3705 | 3705 |
break; |
3706 | 3706 |
case OP_DELETE: |
3707 | 3707 |
LOGGER.debug("===: UPDATE: delete"); |
... | ... | |
3716 | 3716 |
workspaceChangesStore.delete("\"" + WorkspaceChangesTable.FEATUREID + "\"='" + remoteChangeRow.getRelatedFeatureCode() + "'"); |
3717 | 3717 |
LOGGER.debug("===: UPDATE: add insert operation to RelatedFeatureCode "+newRelatedFeatureCode); |
3718 | 3718 |
this.addChange(null, lentity, OP_INSERT, workspaceChangesStore, ef, null, null); |
3719 |
localChangesCreated.increment(); |
|
3719 |
localChangesModifieds.increment(); |
|
3720 |
} else { |
|
3721 |
// Ha habido un delete remoto. Si habia tambien un |
|
3722 |
// delete en local del mismo elemento borramos el delete local. |
|
3723 |
this.removeLocalDeleteIfExists(remoteChangeRow.getRelatedFeatureCode(), workspaceChangesStore); |
|
3724 |
localChangesModifieds.increment(); |
|
3720 | 3725 |
} |
3721 | 3726 |
break; |
3722 | 3727 |
} |
... | ... | |
5462 | 5467 |
|
5463 | 5468 |
} |
5464 | 5469 |
|
5470 |
private void removeLocalDeleteIfExists(String relatedFeatureCode, FeatureStore changesStore) { |
|
5471 |
try { |
|
5472 |
// El store esta en modo PASS-THROUGH, asi que lanzamos el delete directamente. |
|
5473 |
changesStore.delete( |
|
5474 |
"\""+WorkspaceChangesTable.FEATUREID + "\" = '" + relatedFeatureCode + "' AND "+ |
|
5475 |
"\""+WorkspaceChangesTable.OPERATION + "\" = "+OP_DELETE |
|
5476 |
); |
|
5477 |
} catch(Exception e) { |
|
5478 |
throw new RuntimeException("Can't delete local-delete if exists", e); |
|
5479 |
} |
|
5480 |
} |
|
5481 |
|
|
5465 | 5482 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/changes/RemoteChangesController.java | ||
---|---|---|
820 | 820 |
ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
821 | 821 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
822 | 822 |
dialogsManager.messageDialog( |
823 |
i18n.getTranslation("_The_process_has_created_local_changes_that_would_need_to_be_committed_to_the_repository"),
|
|
823 |
i18n.getTranslation("_The_process_has_modified_local_changes_that_would_need_to_be_committed_to_the_repository"),
|
|
824 | 824 |
null, |
825 | 825 |
i18n.getTranslation("_VCSGis_Merge"), |
826 | 826 |
JOptionPane.INFORMATION_MESSAGE, |
Also available in: Unified diff