-
Notifications
You must be signed in to change notification settings - Fork 49
Backporting Tutorial
stfx edited this page Mar 28, 2013
·
14 revisions
This tutorial was written by stfx for mangos-tbc and mangos-classic developers to correctly backport commits from master (wotlk).
- Clone mangos-tbc repo
- Add mangos-wotlk remote:
git remote add wotlk _url_
- Fetch from mangos-wotlk every time something changes there:
git fetch wotlk - Use backport tool in git bash:
contrib/backporting/mangos-backport.sh _commit_hash_ - Check and resolve conflicts if any exist
- If you had to resolve conflicts you still have to amend the commit and maybe change the commit message as well:
git commit -s --amend
- Fetch from mangos-wotlk (like before)
- Use backport tool (like before)
- Check and resolve conflicts (like before)
- Rename the sql updates in sql/updates directory by adding this commit's version number at the start of the filename like so: 11754_01_mangos_mangos_string.sql -> s1415_11754_01_mangos_mangos_string.sql
- Remove the lines related to db_version change (in the sql update file usually the first one and the empty line after that)
- Amend commit (like before)
- Build git_id tool in release mode if you did not already (located in contrib\git_id)
- Use git_id in git bash:
contrib/git_id/Release/git_id.exe- This only works if you push every time you commit something but it is also possible to use git_id.exe -l for local mode but then you can not use git_id.exe -s
- Use
contrib/git_id/Release/git_id.exe -sso that all db_version changes will be automatically written to mangos.sql and in the sql/updates/*.sql- You have to push every outstanding commit before that because git_id.exe -s does not work with git_id.exe -l
- Check correct authorship
- Check commit number
- Push to the mangos-tbc remote:
git push origin master(assuming you cloned from mangos-tbc or named the mangos-tbc remote "origin")