Forum Discussion

dicas's avatar
dicas
Occasional Contributor
4 years ago
Solved

Reload automatically files that are changed outside of TestComplete (e.g another code editor)

Hello,

I am working with Visual studio code as text editor for javascript to be able to use some powerful extensions there, but i am annoyed each time i switched to TestComplete i have to reload files.

is there a way to do it background ? ( see the pop up in attached i have to deal with everytime)

  • Hi,

     

    the latest version saved is the one to take

    Not sure I got your description... But in fact TestComplete now implements the 'last writer wins' strategy which effectively means that the one who did not save his/her changes and did not do manual merge in external merging tool loses his/her changes.

    With more details:

    a) Note, that project in TestComplete can be opened not only locally, but also over the network in the shared mode;

    b) Lets consider two users, A and B, (local or remote) who made concurrent change to the same file;

    c) Now user A saves his changes;

    d) User B gets a 'file has been changed' notification in TestComplete and now has two options: to reload the file or do not reload. (Notification dialog is modal one, so user B even has no option to copy the current content of the file to some merging tool for future comparison.);

    e) If user B reloads changed file, then his changes are lost;

    f) If user B does not reload file, but continues to edit and saves his changes later, this means that user A loses all his changes. (Again, due to the modal notification, user A will not be able to preserve his version of the file.)

     

    This was the scenario that I was thinking of when asked you about how do you expect the conflicts to be resolved.

    To my opinion both scenarios are bad and the only good option is do not change project files concurrently. By any means.

     

6 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    How do you expect to handle the case when the same file is changed both in TestComplete and in the external editor?

     

    • dicas's avatar
      dicas
      Occasional Contributor

      i would expect the last saved file in an editor or testcomplete the latest version. If both are changed, but not saved , the latest version saved is the one to take

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        the latest version saved is the one to take

        Not sure I got your description... But in fact TestComplete now implements the 'last writer wins' strategy which effectively means that the one who did not save his/her changes and did not do manual merge in external merging tool loses his/her changes.

        With more details:

        a) Note, that project in TestComplete can be opened not only locally, but also over the network in the shared mode;

        b) Lets consider two users, A and B, (local or remote) who made concurrent change to the same file;

        c) Now user A saves his changes;

        d) User B gets a 'file has been changed' notification in TestComplete and now has two options: to reload the file or do not reload. (Notification dialog is modal one, so user B even has no option to copy the current content of the file to some merging tool for future comparison.);

        e) If user B reloads changed file, then his changes are lost;

        f) If user B does not reload file, but continues to edit and saves his changes later, this means that user A loses all his changes. (Again, due to the modal notification, user A will not be able to preserve his version of the file.)

         

        This was the scenario that I was thinking of when asked you about how do you expect the conflicts to be resolved.

        To my opinion both scenarios are bad and the only good option is do not change project files concurrently. By any means.