Book a Demo

Author Topic: Connect to a Version-controlled Repository  (Read 3516 times)

pm_vancouver

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Connect to a Version-controlled Repository
« on: March 15, 2013, 03:59:55 am »
Hi,

I'm trying to connect to a version-controlled repository but I can't find any references on how to do that, and there are no methods in the EA.Repository object that seem related.

Can I use EA.Repository.openFile to open a version-controlled repository or is there another method I can use?

Thanks!

Phillip

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Connect to a Version-controlled Repository
« Reply #1 on: March 15, 2013, 07:04:26 am »
VC is just related to packages, not so far a repository. So, "open" is the right method. Once you have it opened a couple of VC related methods apply to lock/check out/in packages.

q.

pm_vancouver

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Connect to a Version-controlled Repository
« Reply #2 on: March 15, 2013, 07:09:10 am »
Okay but I'm not sure what filepath to use to direct it to a database stored repository. Could you give me an example? I currently have something like this:
ea_Repository.OpenFile ("A:\project.eap")

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Connect to a Version-controlled Repository
« Reply #3 on: March 15, 2013, 08:31:05 am »
Quote
bool OpenFile (string Filename) — This method opens a repository and returns True if the repository was opened successfully. Returns False otherwise.
Filename is interpreted in various ways by EA.
• A file name pointing to an .EAP file: This will simply open the repository.
• A file name to a shortcut .EAP file: This will open the repository stored in the shortcut.
• A connection string: This will try to connect to the according RDBMS to open the repository. A valid connection string can be obtained from the Open Project dialog via context Edit Connection String for any stored recent repository.
From my book Scripting EA.

q.

pm_vancouver

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Connect to a Version-controlled Repository
« Reply #4 on: March 15, 2013, 08:34:21 am »
Thank you Q! That worked perfectly.