1

Currently we have a big project, about 10GB (including dlls), probably around 5GB without dlls, in Accurev and it is really slow to get / up / promote etc...

We are thinking of migrating to GIT, but biggest problem is it is a big monolith plus the way it is structured, we have one DEPOT for all projects. We have a LIBRARY folder where all the projects are built to, instead of the bin folder, so libraries references could be shared. Every library is built to that LIBRARY folder, and all inter project references are referencing the dlls in the LIBRARY folder.

How can we start to chunk out the project and migrate to GIT? I was thinking of setting up an internal NUGET SERVER and NUGET-ting the current common libraries first, put them on GIT...then slowly migrate others over, splitting projects per repo, not a single repo (depot) like now.

Any suggestions?

Joshscorp
  • 1,832
  • 4
  • 22
  • 42
  • Could you describe your project structure in a little more detail? I'm interested in this problem, but more information would help. When you create a new stream in your depot, and a workspace based on the stream, I assume you have a lot of parallel directories, one project per directory? How many projects are there? The tricky part, of course will be the inter-dependencies. Is there a core set of 'common' libs that other projects use, or is there a web of dependencies across all the projects? – Number8 Jun 16 '15 at 18:20
  • Streams are used for different environments. Like dev..qa..release etc...all projects are in one folder...like source...then under source there is library, project a, project b, project c...project a might have a further 20 vs projects under a solution file. All projects build to library instead of bin. In library there is .net 2, 3.5, 4 folders for the diff dlls. – Joshscorp Jun 16 '15 at 21:34
  • Hello @Joshscorp, I know it's been years since you've posted this question.. but I was just wondering to what AccuRev command did you use to check the size of your project residing within it? I'm trying to check the size of our depot since we're planning to migrate to git as well. Although I can't find any commands for it. Thanks! – Rocky Jun 23 '21 at 07:29

1 Answers1

2

You could use the script I wrote, ac2git, to convert your repo to git but it might take a while.

After the conversion you could use the git filter-branch --subdirectory-filter to separate the converted monolith git repo into per project git repos.

It should work but it will probably be slow.

Alternatively, if you're up for it, you could modify my script to do what you want. You would just need to make sure that it runs the accurev pop command only on the directories that you're interested in while it is converting the repo which would make it quicker per project but the same speed over all.

Edit:

If you decide that you want to only convert a single folder at a time it would be trivial for you to hard code the script to do what you want. All you need to do is modify all the calls to accurev.pop() (of which there is only one in the AccuRev2Git.TryPop() function) and add another argument to the call specifying which folder you wish to populate.

def TryPop(self, streamName, transaction, overwrite=False):
    for i in xrange(0, AccuRev2Git.commandFailureRetryCount):
        # --- Remove this line --- #
        #popResult = accurev.pop(verSpec=streamName, location=self.gitRepo.path, isRecursive=True, isOverride=overwrite, timeSpec=transaction.id, elementList='.')
        # --- And add this instead --- #
        popResult = accurev.pop(verSpec=streamName, location=self.gitRepo.path, isRecursive=True, isOverride=overwrite, timeSpec=transaction.id, elementList='/./<your project folder>')
        # --- End hardcoding hack --- #
        if popResult:
            break
        else:
            self.config.logger.error("accurev pop failed:")
            for message in popResult.messages:
                if message.error is not None and message.error:
                    self.config.logger.error("  {0}".format(message.text))
                else:
                    self.config.logger.info("  {0}".format(message.text))

    return popResult
nonsensickle
  • 4,438
  • 2
  • 34
  • 61
  • Zdravo Lazare, da li molim te mogu da te zamolim za pomoc oko Issue-a za Projekat na kom si bio Contributor? Pokusavam razlicite nacine ali dobijam gresku koju ne mogu nikako da resim. Mnogo bih ti bio zahvalan! https://github.com/NavicoOS/ac2git/issues/122 – vel Feb 24 '22 at 14:53