Changes between Version 2 and Version 3 of Ticket #16944


Ignore:
Timestamp:
2018-11-04T22:36:24+01:00 (7 years ago)
Author:
wiktorn
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16944 – Description

    v2 v3  
    7575
    7676# Apache Commons Compress
    77 # compress is already on git, need first to somehow mix with other repositories (using commit date, not author date)
    78 # as commits sorted by date do not constitue the history.
    79 # first - create subdirectory where all commons-compress files will go
     77# Linearlize commons_compress history
    8078git branch -f svn_commons_compress_rewrite remotes/commons_compress/master
    81 git filter-branch -f --index-filter "
    82   git ls-files -s | sed -e \$'s#\t#\tcommons-compress/#' |
    83       GIT_INDEX_FILE=\$GIT_INDEX_FILE.new git update-index --index-info &&
    84       if [ -f \$GIT_INDEX_FILE.new ] ; then mv \$GIT_INDEX_FILE.new \$GIT_INDEX_FILE ; fi" \
     79git filter-branch -f --parent-filter 'cut -f 2,3 -d " "' svn_commons_compress_rewrite
     80# Extract externals
     81git filter-branch -f --tree-filter '
     82  if [ -d src/main/java ] ; then
     83      git mv src src.new &&
     84      find . -depth 1 |
     85      grep -v ^./src.new | grep -v ^./.git$ |
     86      xargs -r git rm -fr &&
     87      git mv src.new/main/java src &&
     88      git rm -rf --ignore-unmatch src.new
     89  else
     90      find . -depth 1 |
     91      grep -v ^./.git$ |
     92      xargs -r git rm -fr
     93  fi' \
    8594  svn_commons_compress_rewrite
     95
    8696
    8797# Apache Commons JCS
     
    117127  fi' \
    118128  svn_commons_loggingtrunk_rewrite
    119 
    120 ###
    121 # Linearlize commons_compress history
    122 ###
    123 
    124 git branch -f svn_commons_compress_clean svn_commons_compress_rewrite
    125 git filter-branch -f --parent-filter 'cut -f 2,3 -d " "' svn_commons_compress_clean
    126129
    127130###
     
    171174git rebase --keep-empty -i $(git log --reverse --oneline --no-abbrev-commit | head -n 1 | cut -d ' ' -f 1)
    172175
    173 # fix Apache Commons Compress paths
    174 git filter-branch -f --tree-filter '
    175   if [ -d commons-compress/src/main/java ] ; then
    176       mkdir -p src/java/org/apache/commons/
    177       git mv commons-compress/src/main/java/org/apache/commons/compress src/java/org/apache/commons/ &&
    178       find commons-compress -depth 1 |
    179       xargs -r git rm -fr
    180   else
    181       find commons-compress -depth 1 |
    182       xargs -r git rm -fr
    183   fi' \
    184   master
    185 
    186176# helpful one-liner: git diff --name-only --diff-filter=U | xargs git checkout  ...
    187177