Skip to content

How To Test Patches

regmi edited this page · 6 revisions

** How to test patches posted by someone somewhere**

Let say that David asks you to pull the branch called exodus-II from git://github.com/andrsd/hermes2d.git and review.

First, add the remote link to David's repo by typing:

    git remote add david git://github.com/andrsd/hermes2d.git

Then, create in your repo a new local branch where the patches will be tested.

Assuming that you are in your master branch, type:

    git co -b test-david

Then, fetch David's repo by typing:

    git fetch david

How to push into the repository on spilka

  git remote add write spilka.math.unr.edu:/home/git/repos/hermes2d.git
  git push --d write local_branch:master
  check that all is ok and then:
  git push write local_branch:master

How to add a new Git repository to spilka

0) add the git repo (just the bare git repo) into /home/git/repos: git clone --bare name_of_the_new_git_repo.git

1) visudo # edit the visudo file, add there two more lines for the new # git repo, just copy and adapt the lines already there

2) copy and adapt the hooks/post-update hook. For example: cp ../libfemhub.git/hooks/post_update hooks/ vim hooks/post-update

and adapt the file to the new repo

3) touch git-daemon-export-ok sh hooks/post-update (not as root)

if this does not work, then run it as sudo

4) add a link to /var/cache/git/ ln -s /home/git/repos/name_of_the_new_repo.git .

If you want to push in there from any computer, do: git remote add write spilka.math.unr.edu:/home/git/repos/name_of_the_new_repo.git

Next, merge the branch of interest into your local branch: git merge david/exodus-II

That's it. You can now type "cmake .", "make", and test if everything works.

Something went wrong with that request. Please try again.