Giter Club home page Giter Club logo

sync2git's Introduction


1. Set up directories and permissions:

   mkdir -p /etc/sync2git/projects
   mkdir -p /var/lib/sync2git

   chown sync2git /var/lib/sync2git

2. Create a project:

   mkdir -p /etc/sync2git/projects/myproject
   cat > /etc/sync2git/projects/myproject/config << EOF
   SVN_REPO=http://myproject.googlecode.com/svn
   [email protected]:myprofile/myproject.git
   EOF 

3. Set up the authors.txt file:

   cd /etc/sync2git/projects/myproject
   svn-authors-extract http://myproject.googlecode.com/svn
   vi authors.txt

   When editing the authors.txt file, please remember that you
   won't be able to amend the mappings again after people start
   using your git repository to create forks or branches.  It
   is essential to put the full names and email addresses correctly
   before you make the git mirror available publicly.

   It is OK to go and add extra records to the file later, for example,
   if new users are added to SVN.

   Also, if uploading to a service like github, please use the
   email addresses that the committers use for their github accounts.
   This way, the contributors will be recognised properly for their
   work, as github will convert the name next to each commit to a
   hyperlink going to the corresponding github user page.

4. Run it manually (optional)

   sync2git

5. Run it from cron

   Set up a sync2git user and group on the system to own everything:

   groupadd -r sync2git
   useradd -d /var/lib/sync2git -g sync2git -r -s /bin/false sync2git
   chown -R sync2git.sync2git /var/lib/sync2git

   Set up a cron job:

   cat >> /etc/crontab << EOF
   0 * * * * sync2git /usr/local/bin/sync2git > /dev/null
   EOF

SVN repository changes URL
--------------------------

Disable the cron job before making this change.

This only works if there is at least one new commit in SVN.

su - sync2git
cd /var/lib/sync2git/$PROJECT/svn-clone
vi .git/config       - comment out old URL, add new URL
git svn fetch
vi .git/config       - uncomment old URL, comment out new URL
git svn rebase -l
vi .git/config       - comment out old URL, uncomment new URL
git svn rebase

Noew enable the cron job again.

sync2git's People

Contributors

dpocock avatar sunghyuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.