Author Topic: Scripting: versioncontrolCheckout  (Read 3838 times)

bITs.EA

  • EA User
  • **
  • Posts: 80
  • Karma: +2/-0
    • View Profile
Scripting: versioncontrolCheckout
« on: April 13, 2016, 06:58:34 pm »
Hi

I'm trying to do a checkout (in batch) via a script. It seems to work, but I don't understand why the "Import package dialogue box is shown instead of the normal "checkout" dialogue box.

1) Is this normal behaviour?
2) how can I do a "undo checkout" via scripting? (I can't find a function in the manual...)


Helmut Ortmann

  • EA User
  • **
  • Posts: 967
  • Karma: +42/-1
    • View Profile
Re: Scripting: versioncontrolCheckout
« Reply #1 on: April 14, 2016, 02:45:19 pm »
Hi,

you can always execute a command for your Version Control system by script. Then with EA re-sync state of the package.

In the evening I'll look into my code. I think I have done some code for SVN and MKS around Version Control and some helpers to make work easy.

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Helmut Ortmann

  • EA User
  • **
  • Posts: 967
  • Karma: +42/-1
    • View Profile
Re: Scripting: versioncontrolCheckout
« Reply #2 on: April 18, 2016, 07:34:53 pm »
Hi,

you can do an undo Version Control checkout by calling the API of your Version Control system like SVN for the envolved package / xml files.

To update EA Package state and package content you can use EA API (see user guide, api for package):
- VersionControlResynchPkgStatus
- VersionControlGetLatest
- ScanXMIAndReconcile() (read the documentation of VersionControlGetLatest, there is additional advice)

As I remember that works quite well. But take in account: Version Control sometimes offers surprises.

Helmut


Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)