... | ... | @@ -11,13 +11,39 @@ Many thanks to [Octobus](https://octobus.net/) and [Clever Cloud](https://www.cl |
|
|
If you don't yet have a favourite Python editor, we recommend using [PyCharm community edition](https://www.jetbrains.com/pycharm/download/). PyCharm gives you easy code navigation and static checking. We've even added some PyCharm project settings to the Trosnoth repo so you can easily spin up a Trosnoth server, play a Trosnoth solo game, or run the test suite.
|
|
|
|
|
|
|
|
|
## Mercurial Workflow
|
|
|
|
|
|
We use Mercurial for version control. To contribute to Trosnoth, you'll need to follow these steps:
|
|
|
|
|
|
1. Ask for developer access to the Heptapod project. To do this, [create a ticket](https://foss.heptapod.net/games/trosnoth/-/issues/new) using the ‘discussion’ template, and say that you'd like to contribute.
|
|
|
|
|
|
2. Clone the Trosnoth repository: `hg clone ssh://hg@foss.heptapod.net/games/trosnoth`
|
|
|
|
|
|
3. Update to the branch or topic your changes will be based on (e.g., `hg update default`). As a general rule, most contributions should be based on `default`. Only start from a different branch or topic if you are certain your change depends on that branch or topic.
|
|
|
|
|
|
4. Create a _topic_ for your work. Mercurial topics allow you to create mutable draft changesets and safely rewrite (rebase, amend, etc.) them as needed even after you've pushed them. For more info on Mercurial topics, see [this tutorial](https://www.mercurial-scm.org/doc/evolution/tutorials/topic-tutorial.html). You should name your topic `<your-name>-<feature>`. For example, `hg topics talljosh-space-vampire-scenario`.
|
|
|
|
|
|
5. If there's already a ticket on the [issue tracker](https://foss.heptapod.net/games/trosnoth/-/issues) for the bug or feature you're working on, make sure you assign yourself to the issue. If there's not already a ticket, it's polite to create one and assign it to yourself, so that other people can see that you're working on it, and can use the ticket to communicate with you.
|
|
|
|
|
|
6. Once you've completed your work, [create a merge request](https://foss.heptapod.net/games/trosnoth/-/merge_requests/new). Reference the related ticket in your merge request.
|
|
|
|
|
|
|
|
|
Note: until your topic has been accepted and merged into one of the main branches, the changesets will be mutable. This means that you can safely use Mercurial's history-rewriting operations on it. For more information on history rewriting, see [this document](*https://www.mercurial-scm.org/doc/evolution/index.ht)https://www.mercurial-scm.org/doc/evolution/index.html).
|
|
|
|
|
|
While you're working, it's good practice to regularly pull and rebase your topic (`hg rebase`; merging is also acceptable: `hg merge`). This ensures that you're always working from the latest approved changesets.
|
|
|
|
|
|
Your changes will be easier to review (so probably accepted more quickly) if you separate distinct changes into distinct commits. For example, if you're writing a new scenario and you need to add a new `Event` to the `Player` class, you could have one commit which defines the new event and triggers the event, and a separate commit containing the new scenario class and adding it to the scenario registry.
|
|
|
|
|
|
Never commit changes to someone else's topic without their complete knowledge and consent—multiple people rewriting the history of the same topic can lead to situations that are complicated to resolve.
|
|
|
|
|
|
Please don't use history rewriting operations on changesets that someone else has authored, even if you're working on your own topic. Doing so would result in a changeset being attributed to someone else even though you have edited it. If you have an edit to make to someone else's draft work, either commit a new changeset with your work, or ask the original author to amend their work. If you want to rebase someone else's work, use a merge instead, or ask the original author to rebase it.
|
|
|
|
|
|
|
|
|
## Communication
|
|
|
|
|
|
* **Most communication** about Trosnoth development takes place on the [Trosnoth Slack](https://trosnothdevelopers.slack.com). *However*, you'll need an invitation to join. To request to join the Slack, send an email to the Trosnoth developers Google group and introduce yourself (see below).
|
|
|
* Before setting up Slack, we used to use the [Trosnoth developers Google group](https://groups.google.com/forum/#!forum/trosnoth-dev) to communicate. It doesn't see much traffic these days, but it's still a great way to introduce yourself to the community.
|
|
|
* **Bug reports** should go on the [issue tracker](https://foss.heptapod.net/games/trosnoth/issues)
|
|
|
* **Ideas, brainstorming and feature requests** are on [this page](Feature Brainstorm), and can also be sent to the [Trosnoth developers group](https://groups.google.com/forum/#!forum/trosnoth-dev). If you're new to Trosnoth development, you probably don't have write access to the wiki, so just send your idea to the Google group.
|
|
|
* **Work in progress** by regular Trosnoth devs can be seen on the [Trosnoth Trello board](https://trello.com/b/7gYJkwjT/current-trosnoth-development).
|
|
|
* All bugs, feature proposals, and development discussions should take place on the [issue tracker](https://foss.heptapod.net/games/trosnoth/-/issues) where possible. Please do your best to tag the ticket appropriately.
|
|
|
* Previously, **ideas, brainstorming and feature requests** were added to [this page](Feature Brainstorm).
|
|
|
* Previously, **work in progress** by regular Trosnoth devs could be seen on the [Trosnoth Trello board](https://trello.com/b/7gYJkwjT/current-trosnoth-development). At time of writing, not all of this has been transferred across to the Hetpapod issue tracker.
|
|
|
|
|
|
|
|
|
## Dependencies
|
... | ... | |