Commit Graph

12 Commits

Author SHA1 Message Date
Tad Hardesty
93f8650d7a Add .dmm merge driver (#55699)
This is kind of a prototype. It only fully handles a few situations, 
and doesn't produce particularly easy-to-read conflict markers when it 
fails. I hope that it can be useful at least some of the time, can be 
improved over time, and that the lessons learned can influence a future 
interactive GUI conflict resolver (integrated into StrongDMM?). In the 
worst case, one can fall back to the tried and true "manually re-do one 
side's changes" strategy. 

**Automatic use**: In `tools/hooks/`, run `Install.bat`

**Manual use**, for Git GUIs that don't run merge drivers: while a 
merge is in progress, in `tools/mapmerge2/`, double-click `Resolve Map 
Conflicts.bat`

This PR also removes the error-prone "Prepare Maps.bat" / 
"mapmerge.bat" workflow. Those who aren't using the hooks should 
instead use `Run Before Committing.bat` before committing. First-time 
contributors who opened a PR without map merging can be advised to run 
`I Forgot To Map Merge.bat`.
2021-01-01 17:05:43 -08:00
Tad Hardesty
67b4aa190e Use portable Python for map merge hooks, other tools (#55658)
* Add tools/bootstrap/python

* Add dependencies.sh entry for Python

* Use bootstrapped Python for HitboxExpander

* Use bootstrapped Python when installing hooks

Also:
- Adds tools/hooks/Uninstall.bat
- Removes the need to re-run Install.bat when a .hook file changes

Python path temporarily includes tools/mapmerge2 as before:
- PYTHONPATH in tools/hooks/python.sh handles Linux/virtualenv
- python36._pth handles Windows portable

* Move DMI merge driver to its own directory

* Use bootstrapped Python for makeChangelog.bat

* Set window title in bootstrap PS scripts

* Use slashes in hook paths

* Use relative imports in mapmerge2

* Use bootstrapped Python for mapmerge

* Update mapmerge2 readme

* Skip non-3way conflicts

* Fix relative path issue in posthoc merger

* Add missing call and %* to .bat files

* When installing hooks, don't uninstall them all first

* Make dependencies.sh POSIX

* Move update_paths.py to its own folder

* Use line buffering for Python stdout/stderr

It was switching to fully-buffered mode due to being piped, meaning we
wouldn't see output until the script ended. This is undesirable.

* Use new path to dmi.test in CI suite

* Validate system Python version in bootstrap script

* Add install advice to bootstrap script

* Update path to requirements.txt in CI

* Add upgrader for existing installations
2020-12-22 22:22:15 +01:00
Tad Hardesty
016d8e77fa Skip app execution aliases when searching for Python (#53569) 2020-09-16 18:45:12 -07:00
Tad Hardesty
17348c3f99 Update precommit hooks to work in GitHub Desktop (#51404)
Turns out GitHub Desktop actually does bundle a sh.exe, just not a bash.

Also tries to look for the py launcher to help people who didn't check 
the "Add Python to PATH" option.
2020-06-03 10:17:38 -07:00
Aleksej Komarov
baf9bd2f95 REMOVES TGUI (#49330)
* Removes tgui

* Make tgui script executable again

* Set version of packages to 2.0.0

* Update copypasta docs to match the current best practice

* Rebuild tgui

* Update .github/CONTRIBUTING.md

Co-Authored-By: BadSS13Player <58376109+BadSS13Player@users.noreply.github.com>

* Remove holy bible by Arcane

* rebuild

Co-authored-by: BadSS13Player <58376109+BadSS13Player@users.noreply.github.com>
Co-authored-by: Rob Bailey <actioninja@gmail.com>
2020-02-17 04:51:56 -08:00
Aleksej Komarov
133076afb0 Validate committed tgui build in Travis (#47427)
* Validate committed build in Travis

* Something different

* Document installation of git hooks

* Grammar perhaps

* Call tgui hook installer from tools/hooks/install.sh
2019-11-02 21:06:54 -07:00
Tad Hardesty
8a365096bd Convert icons to RGBA in the icon merger (#44890)
* Mark dmi.merge and pre-commit.hook executable

* Convert icons to RGBA when merging
2019-07-03 19:38:09 +12:00
Tad Hardesty
186baea09a Update hooks readme, install dependencies automatically 2018-05-22 00:26:15 -07:00
Tad Hardesty
2106e3a1b2 Add a Python script to fix DMI conflicts
It hooks into git as a merge driver and automatically runs with merges.
It prints a log of what it did, and if any specific states are
conflicted it indicates them and does not mark the merge as successful.
The conflicting icon can then be opened in DreamMaker and the
conflicting states resolved there.
2018-05-21 15:37:52 -07:00
Tad Hardesty
b4c330c24c Fix hook installation on Linux
Marks the shell scripts executable and sets nullglob so that the lack of
merge drivers doesn't cause shenanigans.
2018-01-30 16:55:37 -08:00
Tad Hardesty
60b39f9e39 Add READMEs to hooks and mapmerge2 directories (#34511) 2018-01-18 22:26:36 -05:00
Tad Hardesty
9639061433 Add a new and improved mapmerge (#33869)
Key benefits of the new mapmerge include: multi-Z support, effective
reuse of deleted keys, automatic handling of key overflow, and utilizing
a git pre-commit hook to eliminate the need to run batch files manually.
2017-12-28 16:01:34 -05:00