Skip to content

Release 2.6.1

Amenel Voglozin requested to merge bitbucket/merged-pr-119 into branch/default

Was already merged in Bitbucket before import, marked as merged by the import user

  • Remove obsolete class ActionCompareWithParent

    It appears that this class became OBE in version 2.5.0 with the action-to-command refactoring. There may be more OBE classes in the com.vectrace.MercurialEclipse.team package, but I have not confirmed this.

  • Fix method name typo

    This typo was found after my previous PR was submitted

  • Add some javadoc and comments to MercurialStatusCache

  • Add javadoc to SafeUIJob and SafeWorkspaceJob

    The javadoc explains exactly what these classes do and why developers should generally avoid them and use the normal UIJob and WorkspaceJob classes instead.

  • Improve Compare With and Replace With commands to support folders and projects

    The Compare With commands required only relatively minor changes and were changed to use mostly pre-existing code. There are several utility methods in CompareUtils and a few of them do not support folders and projects. For the most part, I only needed to change the Compare With commands to use another method on CompareUtils that did support folders and projects.

    However, the Replace With commands required more significant refactoring. The existing code was not well suited for reverting folders and projects, especially when file additions and removals were involved. This is largely a result of the implementation of the revert dialog. It was cumbersome to try and retrofit proper support for reverting folders and projects into the existing code (ActionRevert and the classes it uses), so I opted to implement a new base class for the Replace WIth commands (BaseReplaceWithHandler) and a new general-purpose RevertJob class. These new classes borrow the relevant bits of code from ActionRevert, etc., but remain simple and easy to follow.

    The Replace With Another Changeset command now uses the ordinary revision chooser dialog, instead of the revert dialog. This is consistent with the Compare With Another Changeset command and enables greater flexibility when the revert is performed. Since the selected folder/project is used as the argument for the revert command, rather than enumerating all of the files within that folder/project, Mercurial is able to restore files that were removed. This is not possible with the current revert dialog, since the files to restore would need to be passed to the revert command, but the revert dialog doesn't know about files that are not present in the currently checked-out revision.

    For the Compare With Parent Changeset and Replace With Parent Changeset commands, I did need to adjust how the "previous" revision for a resource was being calculated. The hg parents command doesn't work on directories, so I implemented the getPreviousChangeset method on the HgLogClient, which uses a small revset query to figure out the most recent revision that modified the file.

    Refs #578 (closed)

  • Add Compare/Replace With Previous Changeset commands

    The behavior for the new commands was previously part of the existing Compare/Replace With Parent Changeset commands and was conditionally triggered based on whether the working directory was clean or dirty. The new "previous" commands always use the previous changeset, and the "parent" commands always use the parent changeset, regardless of working directory state. For example, when executing the Replace With Parent Changeset command, if the working directory is already clean, the command will never make the clean files dirty. Previous versions of MercurialEclipse would revert to the previous changeset in this situation, but now the user must explicitly choose the Replace With Previous Changeset command to get that behavior. This behavior is more intuitive and provides the user with better control over the operation to help prevent unexpected/confusing behavior.

    Also adjust HgLogClient.getPreviousChangeset to use existing variable instead of re-getting parent changeset object.

    Refs #578 (closed)

  • Closing branch: issue578-compare-and-replace-folders.

  • Release 2.6.1

  • Added tag RELEASE_2.6.1 for changeset 5dd43f1d475e

Merge request reports