Skip to content

gnrc_(*)2: rename to gnrc_\1#8069

Merged
bergzand merged 2 commits intoRIOT-OS:gnrc_netif2_integration/masterfrom
miri64:gnrc/cleanup/rename-gnrc_netif2-and-gnrc_ndp2
Nov 17, 2017
Merged

gnrc_(*)2: rename to gnrc_\1#8069
bergzand merged 2 commits intoRIOT-OS:gnrc_netif2_integration/masterfrom
miri64:gnrc/cleanup/rename-gnrc_netif2-and-gnrc_ndp2

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Nov 17, 2017

Renames gnrc_netif2 and gnrc_ndp2 to the respective version without the 2.

I used the following script to do that:

rename2() {
    MODULE=$1
    # rename directories
    for dir in $(find . -type d -name "*${MODULE}2*" -not -path "./.git/*"); do
        new_dir=$(echo "${dir}" | sed "s/${MODULE}2/${MODULE}/g")
        if [ -d "${new_dir}" ]; then
            git mv "${dir}"/* "${new_dir}"/
        else
            git mv "${dir}" "${new_dir}"
        fi
    done
    # rename files
    for file in $(find . -type f -name "*${MODULE}2*" -not -path "./.git/*"); do
        new_file=$(echo "${file}" | sed "s/${MODULE}2/${MODULE}/g")
        git mv "${file}" "${new_file}"
    done
    # change name in files
    git grep --name-only -i "${MODULE}2" | xargs sed -i "s/\(${MODULE}\)2/\1/gI"
    # first (temporary) commit
    git commit -am "gnrc_${MODULE}2: rename to gnrc_${MODULE}"
    # fix formatting (for the most part)
    uncrustify -c uncrustify-riot.cfg -l C --no-backup \
        $(git diff --name-only --diff-filter="ACMR" HEAD~1 -- *.c *.h)
    # the tedious part of stepping through (mostly false positive or unrelated)
    # uncrustify output
    git add -p
    # append changes to commit
    git commit --amend
    # reset rest
    git checkout -f
}

# create new CCN-lite patch ;-)
rename2 netif
rename2 ndp

Depends on #8064.

@miri64 miri64 added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation GNRC Area: network Area: Networking labels Nov 17, 2017
@miri64 miri64 requested review from bergzand and cgundogan November 17, 2017 09:22
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 17, 2017

NDP is missing because again: I want to test the gnrc_netif code on Murdock first.

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 17, 2017
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 17, 2017

(Same reason, why I did not set the "Waiting for other PR" label yet)

@miri64 miri64 force-pushed the gnrc/cleanup/rename-gnrc_netif2-and-gnrc_ndp2 branch from f131e31 to 14fbb1d Compare November 17, 2017 09:31
@miri64 miri64 force-pushed the gnrc/cleanup/rename-gnrc_netif2-and-gnrc_ndp2 branch from 44f7c8c to f90a9a8 Compare November 17, 2017 09:46
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 17, 2017

Ready for review.

@bergzand
Copy link
Copy Markdown
Member

bergzand commented Nov 17, 2017

How do you want this reviewed? The script looks good from here, and I trust murdock to some extend, but I'm not looking forward to spitting through 14K lines of code. :)

@bergzand
Copy link
Copy Markdown
Member

Never mind the number of lines, that rebase made it a lot less -_-

@bergzand bergzand merged commit 2db13af into RIOT-OS:gnrc_netif2_integration/master Nov 17, 2017
@miri64 miri64 deleted the gnrc/cleanup/rename-gnrc_netif2-and-gnrc_ndp2 branch November 17, 2017 10:42
@aabadie aabadie added this to the Release 2018.01 milestone Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants