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

Extract history from Scrapy repository #1

Closed
dangra opened this issue Apr 28, 2015 · 2 comments
Closed

Extract history from Scrapy repository #1

dangra opened this issue Apr 28, 2015 · 2 comments

Comments

@dangra
Copy link
Member

dangra commented Apr 28, 2015

Per scrapy/scrapy#1007 (comment) we want to retain commit messages, dates and authors of selectors history as developed in Scrapy repo

@dangra
Copy link
Member Author

dangra commented Apr 28, 2015

I pushed the changes extracted by the following script to master branch (still under review)

git filter-branch -f --prune-empty \
  --index-filter "git ls-files | grep -Eve '(selector|xpath)' | xargs git rm --cached"

# http://jimmy.schementi.com/splitting-up-a-git-repo/
tmpfile=$(mktemp -t splitgit.XXXXX)
trap "rm $tmpfile" EXIT
cat >$tmpfile <<!
#!/usr/bin/env ruby
old_parents = gets.chomp.gsub("-p ", " ")
new_parents = old_parents.empty? ? [] : \`git show-branch --independent #{old_parents}\`.split
puts new_parents.map{|p| "-p " + p}.join(" ")
!
chmod 755 $tmpfile
git filter-branch -f --prune-empty --parent-filter $tmpfile HEAD

Only rest moving file around and preparing a proper python packaging for selectors once we decide the name.

@dangra
Copy link
Member Author

dangra commented May 11, 2015

This is in master branch now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant