michael nesterenko
michael nesterenko

Reputation: 14439

concurrent access to git repository

There is a git repository which is updated from svn (git svn fetch) in fixed periods of time (1 hour for example). After fetch is finished every branch from refs/heads is updated with its corresponding branch from refs/remotes. Svn branches in refs/heads are only updated during this update process and nobody else has write access to them.

I wonder if it is possible to corrupt repository accessing it during svn update process? For example cloning whole repository, fetching from it latest changes or pushing (not to svn branches).

Upvotes: 2

Views: 318

Answers (1)

scalopus
scalopus

Reputation: 2710

Based on personal experience, my company use SVN repository as major repository and new revisions produce to SVN repository every 20 minutes.

When run git-svn command, it will remember the last revision at the script that the git-svn beginning to run. For Example, if there are new revision produce to the svn repository, the new revision will not be fetch to the Git repository. it will fetch to the git repository on the next time you run git svn fetch command.

The most problem I face are that, I turn off the laptop which the git svn fetch still running but I won't notice about it because it is background process in the task scheduler. So, in this case, it may have lock file in the git repository. if the lock file happened, it will not be able to run git svn fetch until you delete the lock file in the git repository as the error message may show up.

Upvotes: 1

Related Questions