Opened 5 years ago

Closed 5 years ago

#40 closed task (fixed)

git repos for OpenWorkouts development

Reported by: borja Owned by: borja
Priority: major Milestone: OpenWorkouts 0.2
Component: infraestructure Keywords:
Cc:

Description

Create a clone of the darcs repos, but in git, so more developers could be involved in the development.

Steps:

  1. create git repos from darcs repos (more info here: http://darcs.net/Using/Convert)
  1. integrate git repos into trac
  1. create scripts to make maintainers life easier to merge changes from darcs to git and vice-versa
  1. maybe add hooks to automatically merge changes darcs<->git on push?

Change History (4)

comment:1 Changed 5 years ago by borja

  • Owner set to borja
  • Status changed from new to accepted

comment:2 Changed 5 years ago by borja

So, we have a git repo now (source:OpenWorkouts-git)

Instructions to work with git:

  1. Grab a copy of the repo. Given you have the proper setup for ssh access to the server already:
git clone ssh://openworkouts/home/repos/git/OpenWorkouts-current
  1. Create a branch to work on whatever feature you want to work in. For example, to work on the task #8 (Galleries for workouts):
git branch 8-galleries-for-workouts
git checkout 8-galleries-for-workouts
  1. Work on your branch, push to the server whenever you feel like it (please try to commit and push only more or less finished code, no WIP or temporary code). Once you are done working on that branch, update the ticket with a comment pointing to the branch in the repo (see TracLinks to see how to automatically reference a git branch in your comments) and send an email to the mailing list asking for review.

Once your contribution has been reviewed and accepted, a committer will merge the changes back to the master branch and then to the main darcs repo.

comment:3 Changed 5 years ago by borja

For admins, this is the workflow to sync changes from darcs to git:

  1. Setup git repos. We need to clone the source:OpenWorkouts-git repo and create an empty repo for syncing:
cd repos/git
git clone ssh://openworkouts/home/repos/git/OpenWorkouts-current
git init OpenWorkouts-darcs2git
touch git.marks
  1. Export patches from darcs:
cd repos/OpenWorkouts-current
darcs convert export --read-marks ../darcs.marks --write-marks ../darcs.marks > ../darcs.export
  1. Import changes in git (do it every time you do export from darcs):
cd repos/git/OpenWorkouts-darcs2git
git fast-import --import-marks=../git.marks --export-marks=../git.marks < ../../darcs.export
git checkout master .
  1. Merge changes into the main repo
cd repos/git/OpenWorkouts-current
git pull ../OpenWorkouts-darcs2git

The pull will make a merge commit, as changes coming from that repo will be treated as pull from a different branch. Once that is commited:

git push

comment:4 Changed 5 years ago by borja

  • Resolution set to fixed
  • Status changed from accepted to closed

We haven't imported changes from git into darcs (yet). I'll update this ticket when that happens, but for now we can close it.

Note: See TracTickets for help on using tickets.