Page MenuHomePhabricator

Experiment with rebasing wikitext
Closed, ResolvedPublic12 Estimated Story Points

Description

Pywikibot mailinglistor suggested trying Levitation which converts an XML dump to a git repository. (See also py3 fork which supports ipv6).

Once the requested pages are a git repository it should be possible to branch the original commit, git amend it with the new content then rebase later edits on this?

Result

Dump to functioning repo

Using Special:Export it is possible to get an xml-dump of a page history (remember to untick "Include only the current revision, not the full history"). Alternatively the xml for a single page can be gotten through a link such as this one (you need to POST to get the history) .

Using P4906 (and the py3 version of levitation) this can be converted to a non-bare repository.

Rebasing

After this we are able to follow the following procedure to change the first version of the page and replay later changes on that:

  1. git rebase -i --root
  2. Change pick to edit in front of first commit
  3. Save
  4. Edit page and make changes
  5. git commit --all --amend
  6. git rebase --continue
  7. Resolve conflicts

Conclusion

The procedure works but is a bit of a hassle and it's unclear how many of the changes can be automatically resolved (looks like very few).

Event Timeline

Lokal_Profil set the point value for this task to 12.Feb 6 2017, 10:38 AM

Using Special:Export it is possible to get an xml-dump of a page history (remember to untick "Include only the current revision, not the full history"). Alternatively the xml for a single page can be gotten through a link such as this one (you need to POST to get the history) .

Using P4906 (and the py3 version of levitation) this can be converted to a non-bare repository.

After this we are able to follow the following procedure to change the first version of the page and replay later changes on that:

  1. git rebase -i --root
  2. Change pick to edit in front of first commit
  3. Save
  4. Edit page and make changes
  5. git commit --all --amend
  6. git rebase --continue
  7. Resolve conflicts

The procedure works but is a bit of a hassle and it's unclear how many of the changes can be automatically resolved (looks like very few).