mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-12-03 17:41:33 +00:00
GP-5123 Corrected versioning update bug. Checked-out version recorded
on server was not properly updated.
This commit is contained in:
parent
95016eb143
commit
86517c6ac3
@ -1522,6 +1522,8 @@ public class GhidraFileData {
|
||||
monitor.setMessage("Updating local checkout file...");
|
||||
}
|
||||
folderItem.updateCheckout(versionedFolderItem, !quickCheckin, monitor);
|
||||
versionedFolderItem.updateCheckoutVersion(folderItem.getCheckoutId(),
|
||||
folderItem.getCheckoutVersion(), ClientUtil.getUserName());
|
||||
success = true;
|
||||
}
|
||||
finally {
|
||||
@ -1929,11 +1931,14 @@ public class GhidraFileData {
|
||||
|
||||
ContentHandler<?> contentHandler = getContentHandler();
|
||||
|
||||
long checkoutId = folderItem.getCheckoutId();
|
||||
|
||||
if (!modifiedSinceCheckout()) {
|
||||
// Quick merge
|
||||
// Quick database update of local folder item
|
||||
folderItem.updateCheckout(versionedFolderItem, true, monitor);
|
||||
}
|
||||
else {
|
||||
// Perform interactive merge
|
||||
|
||||
if (SystemUtilities.isInHeadlessMode()) {
|
||||
throw new IOException("Merge failed, merge is not supported in headless mode");
|
||||
@ -1966,7 +1971,6 @@ public class GhidraFileData {
|
||||
bufferFile.dispose();
|
||||
}
|
||||
int coVer = folderItem.getCheckoutVersion();
|
||||
long checkoutId = folderItem.getCheckoutId();
|
||||
|
||||
tmpItem.setCheckout(checkoutId, folderItem.isCheckedOutExclusive(), mergeVer, 0);
|
||||
|
||||
@ -2002,13 +2006,15 @@ public class GhidraFileData {
|
||||
release(latestObj);
|
||||
}
|
||||
|
||||
// Update folder item
|
||||
// Update local folder item using temporary file content
|
||||
folderItem.updateCheckout(tmpItem, mergeVer);
|
||||
versionedFolderItem.updateCheckoutVersion(checkoutId, mergeVer,
|
||||
ClientUtil.getUserName());
|
||||
tmpItem = null;
|
||||
tmpItem = null; // update removes temporary file if successful
|
||||
}
|
||||
|
||||
// update checkout data within versioned repository
|
||||
versionedFolderItem.updateCheckoutVersion(checkoutId,
|
||||
folderItem.getCheckoutVersion(), ClientUtil.getUserName());
|
||||
|
||||
Msg.info(this, "Updated checkout completed for " + name);
|
||||
|
||||
if (inUseDomainObj != null) {
|
||||
@ -2023,6 +2029,7 @@ public class GhidraFileData {
|
||||
mergeInProgress = false;
|
||||
try {
|
||||
if (tmpItem != null) {
|
||||
// remove temporary merge file if error occured
|
||||
try {
|
||||
tmpItem.delete(-1, ClientUtil.getUserName());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user