Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-subtree like tool for exporting campaigns #4619

Open
wants to merge 1 commit into
base: master
from

Conversation

@stevecotton
Copy link
Contributor

stevecotton commented Dec 3, 2019

As with git-subtree, it creates reproducible SHA1 ids for the new branch, the
pre-removal history of An Orcish Incursion will appear as the branch with head
d45d9e7562e407d3b934c0eb88b40c891a963942.

Added to the utils directory rather than data/tools, as it makes no sense to have
without the full Git history.

As with git-subtree, it creates reproducible SHA1 ids for the new branch, the
pre-removal history of An Orcish Incursion will appear as the branch with head
d45d9e7562e407d3b934c0eb88b40c891a963942.
@stevecotton stevecotton requested a review from sigurdfdragon Dec 3, 2019
"""A command similar to git-subtree, for exporting the history of a campaign.
Hardcoded for the export of An Orcish Incursion, but added to the utils/ dir
as other campaigns will likely be removed before 1.16. The result is a Git

This comment has been minimized.

Copy link
@sigurdfdragon

sigurdfdragon Dec 3, 2019

Contributor

I'd prefer something less presumptive.

This comment has been minimized.

Copy link
@sigurdfdragon

sigurdfdragon Dec 5, 2019

Contributor

realized that my above comment might not have been clear enough, it's referring to "...as other campaigns will likely be removed before 1.16. " something like "in case other campaigns are removed." seems better.

@stevecotton

This comment has been minimized.

Copy link
Contributor Author

stevecotton commented Dec 3, 2019

Hmm - it's affected by git-replace, which means the commit message is inaccurate, so I'll push a correction to it.

Back in April 2008, an oops-and-revert meant 2000 files were deleted and re-added an hour later, and commands like git-blame will show anything older as added in that commit., You can tell git to pretend that never happened:

git replace --graft 28c669f48d61c00e5a57e21bda460b09641ebb97 c84109ca021af26bb1fe7d18b8140802c2a37e23

With that replace, the exported history of AOI is d45d9e7562e407d3b934c0eb88b40c891a963942. Without the replace, you'll have a few more commits and the rewritten history will be 5cdd8de96569940f1de2e1db112fe088a5cdae87 instead.

Edit: from the point of view of AOI, it doesn't make sense to put the graft point there, probably better to just leave the history without changes.

Edit2: will fix this way in the next push:

+    # Ignore any uses of git-replace, so that the generated history is based on the full history
+    os.environ['GIT_NO_REPLACE_OBJECTS'] = "1"
# This must have been a commit that deleted all of the campaign files
data_campaign_tree = b''

# In the newly created tree, add translations/CAMPAIGN_TEXTDOMAIN/*.po and the .pot

This comment has been minimized.

Copy link
@stevecotton

stevecotton Dec 7, 2019

Author Contributor

Need to handle the situation that both data/campaigns/.../translations and po/wesnoth-.../ exist, as happened in d524ef2. The low-level git commands being used allow that, but it means git fsck will complain afterwards.

@stevecotton

This comment has been minimized.

Copy link
Contributor Author

stevecotton commented Dec 11, 2019

There's already a UMC repo for AOI with voice acting, so maybe it would be better to join with that project instead of exporting the history.

https://r.wesnoth.org/t49268
https://github.com/FranPrin/An_Orcish_Incursion_voice_acting/tree/New-tree/An_Orcish_Incursion_Voice/scenarios

@AI0867

This comment has been minimized.

Copy link
Member

AI0867 commented Dec 11, 2019

But that repo is missing all the history. Unless you want to check the wesnoth repo every time you want to look at the history, it's probably best to export.

That repo is also only 17 commits large, so rebasing that on an export would not be much work.

@GregoryLundberg

This comment has been minimized.

Copy link
Contributor

GregoryLundberg commented Dec 11, 2019

And once the work is done on our end that repo probably needs to be rebased to our new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.