Fork update questions

Questions, comments, discussions. Over time certain topics might be moved to their own category.
Post Reply
tzhou
Posts: 3
Joined: Wed Sep 05, 2018 9:52 pm

Fork update questions

Post by tzhou »

I'm the author of Open Paperless, a fork of Mayan for home users. The initial version fulfilled my needs at the time and I have not updated it since. There are some new features of Mayan that I would like to include now but trying to merge the two repositories results in a lot of code conflicts. Is there a recommended way to do merges between Mayan and forks? Is it possible to have some mentoring or guidance to do this?

I want to try my hand and do the merge to get Open Paperless up to date with Mayan but I recognize this is probably beyond my abilities with Python and git. I also know this is something I will need to go over again every time I need to catch up to Mayan. For that reason I'm also open to give control of the project if anyone is willing to put the work and keep it up to date.

Tina
Open Paperless
https://github.com/zhoubear/open-paperless

User avatar
rosarior
Developer
Developer
Posts: 522
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Fork update questions

Post by rosarior »

I was not aware of Open Paperless, looks interesting!

Merging from a source repository to a fork will always raise conflicts. Conflicts happen when a fork modifies a line of code that the original repository also modified, and this modification happened after the fork was made. Git detects that both repositories made changes but doesn't know which one to leave and which one to discard or how to merge and keep both. This is why a merge conflict is raised and is up to the human to interpret what stays and what to remove. If you do merges periodically the number of conflicts will be lower, the more you wait to synchronize with the upstream repository and more the code in both will diverge and the longer the conflict list to resolve.

This is my workflow when doing an upstream merge, we use this method when we want to synchronize our work repositories with each other before pushing code to GitLab:
Mayan EDMS -> Forked to Mayan EDMS Fork
  • In my Mayan EDMS Fork I add a the repository URL as a new remote using `git remote add upstream <url>`, this is the main repository or another core member's repository.
  • Then I fetch all the changes from upstream without merging with `git fetch -a upstream`
  • Then I create a temporary branch with `git checkout -b feature/upstream_merge`
  • Execute the merge with `git merge upstream/master` or `versions/next`
  • Then I go over each conflict, resolve it using the code editor and add it with `git add <file>`
  • When all the conflicts are resolved I run the entire test suit.
  • If there are no errors I commit the merge with `git merge`
  • The switch back to the main branch for the fork with `git checkout <branch>`
  • And merge the temporary merge branch into the main branch with `git merge feature/upstream_merge`
Right now we have very little chance of taking on more work. It looks interesting but we would be in over our heads. Unless we get more hands in the team I don't think we can spare time on another fork, at least not at the moment. Thank you for the offer and the work you put on your fork, forks are important and help drive the project forwards. Let revisit this after 3.1 is out.

tzhou
Posts: 3
Joined: Wed Sep 05, 2018 9:52 pm

Re: Fork update questions

Post by tzhou »

I was secretly hoping there was a merge button that would synchronize the codes for me :lol:

Open paperless was well received and has some 2,233 stars in github. So there is definitely a market for a lightweight version of Mayan DMS. I'm not doing anything with it right now and don't plan to in the future given the work of merging. I understand the work involved in yet another version of Mayan but I think that if you make it a commercial version that would help offset the cost of maintenance. I would like to give back to the project so just tell me how to do it and I'll transfer control of Open Paperless back the Mayan team.

Thank you for the work you have done.

User avatar
eriggs
Developer
Developer
Posts: 12
Joined: Fri Sep 07, 2018 3:32 am

Re: Fork update questions

Post by eriggs »

@rosarior I think this is a good idea. I'm up for it if we can cover another user audience. The Git merge workflow and scripts in place for the Professional Edition can be used for Open Paperless. We can clone the PE repository, replace the code with the code from Open Paperless and that way we also keep the CI and CD scripts.

@tzhou I don't mean to dis you work, but doing a quick search I can see you got massive coverage and traction with your fork! Here are some examples:

* https://medium.mybridge.co/30-amazing-p ... 310b04cdb3
* https://ubunlog.com/open-paperless-admi ... ocumentos/
* http://laboratoriolinux.es/index.php/-n ... buntu.html
* https://blog.desdelinux.net/escanee-adm ... paperless/
* https://www.reddit.com/r/WebApps/duplic ... ayan_edms/
* https://news.ycombinator.com/item?id=15983492 <= 285 upvotes in Hacker News!!!
* http://portaldosaber.net/2018/01/open-p ... no-ubuntu/
* https://sempreupdate.com.br/open-paperl ... no-ubuntu/
* http://linux-os.net/open-paperless-esca ... tu-ubuntu/
* https://boostlog.io/boostio/python-week ... ositories-[dec-24~30]-5a71fc2052b91d9de6d0bd83
* https://linuxstory.org/github-trending-2017/
* https://mipropiadecadencia.blogspot.com ... -para.html
* https://importpython.com/newsletter/no/156/
* http://saveti.kombib.rs/30-amazing-python-projects
* https://www.reddit.com/r/Python/comment ... _the_year/

I mean, how did you managed that!?!? Also, why in the same articles and posts where Open Paperless is praised, somehow, there is hate, not criticism, but HATE towards Mayan EDMS? Why? We've posted, I have PERSONALLY posted Mayan EDMS news on some of those sites and have had my posts remove because they are SPAM!

Again @tzhou I'm not dissing you or your fork I'm just in awe at the attention this got in the span of weeks whereas Mayan has been going strong for 7 years and gotten only a fraction of the attention. Mayan posts in Hacker News get 5 upvotes, IF we are lucky. We stopped posting on Reddit because almost every post is received with hate. Flabbergasted by what you achieved. Maybe you should do PR for Mayan. I'm speechless.

User avatar
rosarior
Developer
Developer
Posts: 522
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Fork update questions

Post by rosarior »

@tzhou Thank you very much! That is something to think about. In order for us to be able to take control of the project you need to read these documents and follow the following instructions.

Developer Certificate of Origin
This certifies the source of your additions and protects us and the project.
It applies to code being merged directly into Mayan. Since your additions have not yet been merged you need to print, sign and send this to retroactively certify your original code.
https://gitlab.com/mayan-edms/mayan-edm ... master/DCO

Mayan EDMS Individual Contributor Assignment Agreement
This document transfers any rights you own or may own on Open Paperless. Needs to be printed, signed and sent.
https://gitlab.com/mayan-edms/mayan-edm ... vidual.rst

It is usually only necessary to fill these two for code blocks but since this is an entire project I'll contact the legal advisor at Mayan EDMS, LLC to see what else needs to be done. In the meantime send and email to the address in the Contributor Assignment Agreement to continue the process via email. Thanks!

@eriggs You are speechless? That's a first :lol: Now seriously, I warned you about this when you joined, more than once. If you read it, repeat it or talk about it, at the end of the day you are the only one that goes to bed stressed, drained, and feeling worthless. There will always be bad press, unfair or biased criticism, and just plain hate. Don't dwell on it. Let it go, keep moving forwards. We have a lot of cool stuff to work on. :ugeek:

tzhou
Posts: 3
Joined: Wed Sep 05, 2018 9:52 pm

Re: Fork update questions

Post by tzhou »

@rosarior
Thank you. I'll get on those right away.

@eriggs
Not to pour gasoline on an open fire, but I've also gotten jobs offers, have been invited to speak at events (including Python and Django events of which I now nothing), and have even been offered to be keynote speaker with all expenses paid including travel, all thanks to Open Paperless :D

gargantvan
Posts: 27
Joined: Thu Sep 06, 2018 10:57 pm

Re: Fork update questions

Post by gargantvan »

It would be nice to integrate at least the ui from Paperless, though I have not used it.

User avatar
eriggs
Developer
Developer
Posts: 12
Joined: Fri Sep 07, 2018 3:32 am

Re: Fork update questions

Post by eriggs »

@tzhou Fucking hell! Has tech conferences gotten so subjective? :roll:

User avatar
rosarior
Developer
Developer
Posts: 522
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Fork update questions

Post by rosarior »

@tzhou Please don't encourage him :lol: Where is Michael when I need him to help me restrain Eric? :lol:

Now seriously, I would like to close this topic. Also, let's keep things professional and focused on the technical aspects. For everything else we already have other channels. Complaining about negative coverage, tech conferences or any of the other stuff, say more about us and the project that it says about them. :geek:

Post Reply