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

Ignore the bats/ directory cloned by tests #286

Merged
merged 1 commit into from
Dec 11, 2014

Conversation

joshfriend
Copy link
Member

No description provided.

@blueyed
Copy link
Contributor

blueyed commented Dec 11, 2014

👍
Seems to have been forgotten in bfddc69.

@yyuu
Copy link
Contributor

yyuu commented Dec 11, 2014

Importing updates from rbenv / ruby-build is really hard... 😞

yyuu added a commit that referenced this pull request Dec 11, 2014
Ignore the bats/ directory cloned by tests
@yyuu yyuu merged commit 9b7b2a6 into pyenv:master Dec 11, 2014
@joshfriend joshfriend deleted the ignore-bats branch December 11, 2014 03:53
@blueyed
Copy link
Contributor

blueyed commented Dec 11, 2014

Importing updates from rbenv / ruby-build is really hard... 😞

I can imagine that.
But there can be certainly some tooling for this, e.g. a (git) diff filter, which ignores or translates RBENV to PYENV.

But then there's no common Git ancestor, is there?
Maybe that could be faked somehow now, like "git merge rbenv", discard/review any changes/conflicts and then commit the "merge".

Then future merges could be as easy as "git merge rbenv/master".
Also look at git's rerere in this context, which allows to record resolutions to merge conflicts and replays them automatically.

For comparing directory trees, I can recommend http://www.scootersoftware.com/, which allows to have "unimportant" differences.

HTH :octocat:

@blueyed
Copy link
Contributor

blueyed commented Dec 11, 2014

Oh, there appears to be some common ancestor at least, git merge worked, with quite some conflicts (for whole files) though: http://dpaste.com/2SR5K0Z

If merged properly once, they should work in the future?
Anyway, rerere would definitely help here - and it would be even possible to share what it has learned with others / centrally (IIRC).

@blueyed
Copy link
Contributor

blueyed commented Dec 11, 2014

Hmm, git merge-base master rbenv/master does not output anything.

@yyuu
Copy link
Contributor

yyuu commented Dec 14, 2014

There is not common ancestor changeset between sstephenson/rbenv and pyenv. I didn't know git rerere and http://www.scootersoftware.com/. It might help somehow on merging. I'll try them later.

Anyway, we have to prepare comprehensive tests for pyenv specific features (e.g. multi versions) before automating merges....

@blueyed
Copy link
Contributor

blueyed commented Dec 14, 2014

I do not mean to have automatic merges, but to create a common ancestor now: if you think everything has been merged, then "git merge -s ours rbenv/master".

But somehow we would need to make git aware of the renaming from rbenv to pyenv, too.

blueyed added a commit that referenced this pull request Apr 15, 2015
This merges
https://github.com/sstephenson/rbenv/commits/4d72eefffc548081f6eee2e54d3b9116b9f9ee8e
to build a common ancestor for future merges.

The last manual merge was in f48a5b1.

Discussion / initial idea: #286 (comment)

This was done using:

    # Keep our changes for "unmerged, both added"
    for i in $(git status --porcelain | grep '^AA ' | cut -d\  -f2); do
      git checkout --ours $i
      git add $i
    done

    # "git mv" rbenv files to our name, keeping the current contents.
    for i in $(git status --porcelain | grep '^A ' | sed 's/^A  //'); do
      ours=${i//rbenv/pyenv}
      test -f $ours || { echo "Skipping: $i"; continue; }
      git mv -f $i $ours
      git reset HEAD $ours
    done

I've handled the following then manually:

    - rbenv.d/exec/gem-rehash.bash
    - rbenv.d/exec/gem-rehash/rubygems_plugin.rb

This should allow to merge rbenv in the future using:

    git merge rbenv/master -s recursive -X rename-threshold=5%

I am not sure about the rename-threshold, 25% also worked for one file
I've tested.

Conflicts:
	.gitignore
	.travis.yml
	LICENSE
	README.md
	src/Makefile.in
	test/--version.bats
	test/commands.bats
	test/completions.bats
	test/exec.bats
	test/global.bats
	test/help.bats
	test/hooks.bats
	test/init.bats
	test/local.bats
	test/prefix.bats
	test/rehash.bats
	test/run
	test/shell.bats
	test/shims.bats
	test/test_helper.bash
	test/version-file-read.bats
	test/version-file-write.bats
	test/version-file.bats
	test/version-name.bats
	test/version-origin.bats
	test/version.bats
	test/versions.bats
	test/whence.bats
	test/which.bats
blueyed added a commit that referenced this pull request Apr 15, 2015
This merges
https://github.com/sstephenson/rbenv/commits/4d72eefffc548081f6eee2e54d3b9116b9f9ee8e
to build a common ancestor for future merges.

This is branched off f48a5b1, which was
the last manual merge.

Discussion / initial idea: #286 (comment)

This was done using:

    # Keep our changes for "unmerged, both added"
    for i in $(git status --porcelain | grep '^AA ' | cut -d\  -f2); do
      git checkout --ours $i
      git add $i
    done

    # "git mv" rbenv files to our name, keeping the current contents.
    for i in $(git status --porcelain | grep '^A ' | sed 's/^A  //'); do
      ours=${i//rbenv/pyenv}
      test -f $ours || { echo "Skipping: $i"; continue; }
      git mv -f $i $ours
      git reset HEAD $ours
    done

I've handled the following then manually:

    - rbenv.d/exec/gem-rehash.bash
    - rbenv.d/exec/gem-rehash/rubygems_plugin.rb

This should allow to merge rbenv in the future using:

    git merge rbenv/master -s recursive -X rename-threshold=5%

I am not sure about the rename-threshold, 25% also worked for one file
I've tested.

Conflicts:
	.gitignore
	.travis.yml
	LICENSE
	README.md
	src/Makefile.in
	test/--version.bats
	test/commands.bats
	test/completions.bats
	test/exec.bats
	test/global.bats
	test/help.bats
	test/hooks.bats
	test/init.bats
	test/local.bats
	test/prefix.bats
	test/rehash.bats
	test/run
	test/shell.bats
	test/shims.bats
	test/test_helper.bash
	test/version-file-read.bats
	test/version-file-write.bats
	test/version-file.bats
	test/version-name.bats
	test/version-origin.bats
	test/version.bats
	test/versions.bats
	test/whence.bats
	test/which.bats
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

Successfully merging this pull request may close these issues.

3 participants