To save own application with version or not

I need some opinions here.

I am working on a Django project using buildout to get dependencies, etc. I use mercurial as DVCS.

Now ... I need to configure one of the dependencies, so I can do one of the following: (* Changes may not be suitable for everyone else.)

1- Make the project fork in (github, bitbucket, etc.), save my version and get the dependency with the recipe (mercurial or git).
2- Clone the project, put it in PYTHONPATH, erase DVCS-dirs and add it to my version of the project. Therefore, each change will be private. Here I need to erase all information from their DVCS or something like that.

Any other that you can think of.

Am I missing something? Am I off too?

Thanks!

+4
source share
3 answers

Esteban, take the following steps: I will speak in a mercurial conversation, but all this can be done in git too.

  • clone their project
  • make your clone of your subrepo project in your project

It gives you the best of all worlds. You can edit the code in your project and their project, not paying attention to the fact that when you make changes to your code, go to your repo along with a pointer to a new set of changes in your clone of your project. Then, when you want to update your clone of your project, you can do it in place and just merge.

So this is pretty much what you said in "1", but there is no need to make a plug or host that repo publicly. Just edit your clone as a sub-report of your project and never click (which will not work, since you do not have write access to their repo).

Your version of the two main drawbacks is that as they change and improve their project, on which you depend, you will have a hard time pulling in their improvements and merging them with yours.

+1
source

Well, if you use DVCS, then all your commits are saved as change sets, and people can choose to apply your change set or not. Therefore, while you comment on this change, people can choose to apply the change or not at their discretion. What more, if they do not want this change, but want other changes, they can choose and choose. Thus, it is true that DVCS takes care of the problem for you (provided that the people pulling you from you use DVCS correctly).

Personally, I recommend using forking, but as I said, it does not really matter.

+1
source

You ask this question in a rather confusing way, and I don't know if you really understand the point of view of DVCS.

The whole point of DVCS is to let you have your own repository. You do not need to publish your repository on github or bitbucket or in any of these places if you do not want this, but of course I did not delete the DVCS information.

If the upstream project makes the changes you want in addition to your personal changes, you will have a time merge devil if you do not save the DVCS information.

Using Mercurial, you can include the project in your own, using the Mercurial subrepo function .

+1
source

Source: https://habr.com/ru/post/1306586/


All Articles