Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a big repository and git svn dcommit takes pretty big time.

Will my repo be in consistent state if I'll modify sources (without any git operations) while dcommit is in progress?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I'd advise against making changes while a dcommit is in progress, although that may work if you're always pushing out your HEAD commit and it goes cleanly.

When HEAD is being dcommitd, the process ends with doing git reset --mixed against the new commit which reflects the current state of the svn repository. If you'd instead push some older commit, the process would end by attempting to rebase your current branch on top of the new commit that was fetched from svn; this would abort if there are uncommitted changes.

You're also likely to have problems if dcommit would run into a conflict while pushing the changes to svn, which you would then need to resolve manually. Having unrelated changes in the working tree is likely to mess this up.

You could create a separate clone of your git svn repository, do all your actual work there, and use the git svn repository only for interacting with the svn repository. Then it would of course be safe to make any changes in your working repository while the other one was processing a dcommit operation. But you would, of course, need to be pushing and/or pulling commits between those repositories.

share|improve this answer
    
Well, copying isn't an option since the initial problem of big repository means I'll have to wait an hour or so for copying to compelete :) –  Michael Pankov Dec 4 '12 at 14:15
    
I highly doubt that doing a local clone would take anywhere near that long. If you're using a filesystem that supports hard links it wouldn't even copy much of the repository data, just create hard links to the pack files. –  qqx Dec 4 '12 at 15:13
    
It's Windows. Also, it's 30k files, so it takes maybe even more time to copy. –  Michael Pankov Dec 4 '12 at 18:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.