MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - vcs rollback
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

vcs rollback

 Post Reply Post Reply
Author
Message
edward22243 View Drop Down
Major Contributor
Major Contributor
Avatar

Joined: 19.Apr.2019
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote edward22243 Quote  Post ReplyReply Direct Link To This Post Topic: vcs rollback
    Posted: 08.Apr.2022 at 08:02
I have a repository in vcs. I want to do a rollback to a previous transaction. I see all the changes in the "Changes & Versions" window, but how to rollback to a previous transaction?

I only see 'commit' and 'abandon' button, it is also not (extra VCS commands-dropdown) init or sync or checkout

?


Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 641
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 08.Apr.2022 at 09:57
The repository is saved to the VCS each time you press Save Version. As the tree view in the Changes & Versions tool shows, a Version thus consists of multiple Transactions. You can go back in single Transactions if you do Save Version for each Transaction.

To go back to the most recently saved Version, use Extra VCS Commands | Checkout - it gives you a separate repository at the point in time that you pressed Save Version. (If you want to continue work in the checked out old repository, rather than just look at it, you'll need to give your VCS the appropriate commands to make it roll back to that state too.)

Edited by stevek - 08.Apr.2022 at 10:01
Back to Top
edward22243 View Drop Down
Major Contributor
Major Contributor
Avatar

Joined: 19.Apr.2019
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote edward22243 Quote  Post ReplyReply Direct Link To This Post Posted: 08.Apr.2022 at 11:14
I just commit to the repository every time, I never used the 'Save Version' button in the Changes & Versions window.
I have now only one version: Working Version with 450 transactions. 

Can I go back to transaction 433 ?

When I press the Checkout button I get an error window 'The VCS directory in _vcsWorkingDir was not valid/writable X:\git\BehaviourTree does not exist. Check VCS Settings | Path ($vcs and $svn/getBueDir in Graph generator _vcsPaths).

When I stand on transcation 433 and press 'Save Version' (I assumes it saves that transaction, but I dont know) I get the following 'The following problems were found in the version tags: Version comment is blank. Version number is blank. Do you want to proceed?' . I answered 'no'.

Please advice.


Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 641
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 08.Apr.2022 at 11:59
In that case you have nothing in your VCS Cry. You have presumably never set it up (it's still using the initial default of X:, chosen to most likely not match any existing directory by accident), and as you said, you have never versioned anything there. If you don't set it up and don't version to it, you have no way of using it to go back to a previous version.

With no VCS, you can still use the Changes & Versions tool to see which graphs and objects changed in a given transaction (look at the tree), and what their values were before and after the change (choose Compare from the popup menu for that transaction in the tree). That should help you manually change the values back to match the old state - the best you can do in this situation.

To set up VCS for the future, please see the MetaEdit+ User's Guide, 3.5 Version control integration
Back to Top
edward22243 View Drop Down
Major Contributor
Major Contributor
Avatar

Joined: 19.Apr.2019
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote edward22243 Quote  Post ReplyReply Direct Link To This Post Posted: 20.May.2022 at 08:12
I set up an empty repository in bitbucket and cloned it locally in D:\MetaEditRepo\projectname.

Now I have in _vcsPaths:
$dbBaseDir = 'D:\MetaEditRepo'
$gitBaseDir = 'D:\MetaEditRepo'

I do get updates in bitbucket when I press "Save" but the repo stored there looks different than the 'old' repos which did not use git.  I get a lot of txt-files in the projectname root-directory and get the directories metamodel and versionedDB.

While the non-git has directories areas, backup and users.

Is this correct?

I don't see the reason to have different directories for $dbBaseDir and $GitBaseDir, should there be?
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 641
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 20.May.2022 at 10:37
If we look at the relevant section 3.5 Version Control Integration in the manual, the overview states:
"The VCS working directory is kept separate from the MetaEdit+ directory, because VCSs cannot work sensibly with a live set of database files." 

That section's 3.5.2 also shows how to set up the integration: the minimum would be to set $gitBaseDir to point to an empty directory, under which each subdirectory will be a Git repository to hold the version info for a corresponding MetaEdit+ repository. If you also want a remote repository like Bitbucket or GitHub, set $gitBaseURL too. 

You don't normally need to change the default $dbBaseDir='.' — assuming you have a normal single user installation where all MetaEdit+ repositories are under the working directory that MetaEdit+ starts in.

It's wise to change the default $dbName to be an explicit string rather than programmatically built. This is the name of the MetaEdit+ repository directory under $dbBaseDir, and is used as the name of the repository's directory under $gitBaseDir.

If you've changed other variables in _vcsPaths, you may want to compare with the original version (e.g. in demo or in a newly created MetaEdit+ repository).
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.05
Copyright ©2001-2022 Web Wiz Ltd.

This page was generated in 0.063 seconds.