Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn : How to split a large commit into several small commits?

I have created a new repository for a project and am adding some exisiting code base (llvm) to it. This code base is about 18,000 files which is making the my initial commit take lots of time. (read 5 hours)

Is there a way to split this HUGE commit into several smaller commits? So that it can complete faster?

like image 305
ConfusedAboutCPP Avatar asked Dec 26 '22 19:12

ConfusedAboutCPP


1 Answers

When seeding a new repository with a large number of files, I highly recommend using an svn import command from the server instead of committing the files from a remote machine. The easiest way to do this is:

  1. Bundle up the code into a single archive (using gzip, 7zip, etc)
  2. Transfer that archive to the server (using rsync, scp, etc)
  3. Log into the server remotely
  4. Decompress the archive into a temp directory
  5. Use svn import to seed the repository

This will prove to be significantly faster in most cases. Transferring a single large archive over the network is typically much faster than transferring many smaller files, even if you don't take compression into account. The performance difference is significantly larger using Windows. Certain versions of Subversion have a Windows bug that causes each file to open and close a separate network connection, which adds a significant amount of overhead compared to using a single network connection for the entire operation.

like image 183
bta Avatar answered Jan 04 '23 07:01

bta