Giter VIP home page Giter VIP logo

Comments (4)

zrax avatar zrax commented on August 19, 2024

Fair enough... I had to edit the files due to merge conflicts anyway (we converted everything to using spaces and changed the location of the root path), so I also updated the whitespace in the files you added as well... I also had to ignore the .vcproj and add the equivalent changes in the CMakeLists.txt, which certainly makes sense to have done in a separate commit (sorry about that). As to why the diff you posted above shows that one line different, I have no idea -- I certainly didn't (intentionally) remove any whitespace, I just converted tabs to spaces >.>

In short, I apologize for the confusion -- in the future I'll make it more clear when I modify things from pulled hg commits. Of course, the other option is that you could make a github fork and do your work in a pull request, making my life easier :P

from plasma.

cwalther avatar cwalther commented on August 19, 2024

Point taken about using GitHub pull requests. For changes like these where I want to maximize the chances of getting them into MOULa, I want to start as closely as possible to the MOULa codebase, and in this case that was easiest by staying in Mercurial. I'll have to read up about Git/Hg interoperability to see about using Git in the future. What tools are you using to pull from Mercurial into Git (I’d imagine there are multiple ways)? It seems important to me that things enter version control once and then only move around inside it, without losing their identity. It would be nice if that could also be achieved when pulls/pushes back and forth between Mercurial and Git are involved.

To be honest, it seems to me that such arbitrary changes as switching from tabs to spaces are just a needless complication and barrier to effortless sharing of information between the various repositories. Changing CRLFs to LFs is probably okay as that is transparent to most tools involved, but I fear the whitespace conversion is just going to lead to merge conflicts and files with inconsistent indentation.

from plasma.

zrax avatar zrax commented on August 19, 2024

It is true that converting the whitespace makes merging more difficult... But most of us who have been working in the code base so far find it very difficult to work with tabs, since we've all configured our editors on numerous systems to using spaces, so there's a good chance it would become inconsistent and messy anyway :(.

There are, as you pointed out, several ways to share code between hg and git -- for an initial repository migration, the hg-fast-export tool worked great for us. Unfortunately, it doesn't do individual commits though. In my experience, hg tends to be better about playing nicely with other SCMs than git does :\

What I used to migrate your changes over (which I admit was probably not the best way), was to run hg export, copy the resultant .patch file, use vim to retab it, apply it, and then commit it with --committer="your name" using your original commit message. Ideally, what I should have done, was to checkout the revision that was identical to the base you applied it on, branched from there, applied your change, and then edited the whitespace at the merge with master. Paradox also pointed out to me that github actually has an hg-git plugin which allows you to use hg to push git commits, which could have made this easier since the initial commits are the same in both forks. Either way, it's not the simplest thing to do, but I probably picked the hardest way to do it too :P

from plasma.

cwalther avatar cwalther commented on August 19, 2024

OK, I’ll do some experiments on my own. Thanks!

from plasma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.