Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Dropbox merging #448

Open
ChrisJefferson opened this issue Nov 14, 2013 · 7 comments
Open

Dropbox merging #448

ChrisJefferson opened this issue Nov 14, 2013 · 7 comments
Milestone

Comments

@ChrisJefferson
Copy link

I'm sure this is a FAQ, but I can't find it anywhere!

I find it very annoying that when my phone and dropbox get out of sync, the only presented option I am given is "choose phone or dropbox", I would much prefer a merge take place.

The merging part is not too hard, but the way the source is currently laid out would make merging a little tricky (but not impossible). If a well-written merge was written, would it be accepted?

@ginatrapani
Copy link
Member

If a well-written merge was written, would it be accepted?

With good unit tests, absolutely.

@fred777
Copy link

fred777 commented Jan 10, 2014

I bought todo.txt-android more than a year ago but the reason why I still do not use on a daily basis it is missing merge-ability :(

In the meantime there were many discussions on how to merge / smart-resolve conflicts, but not even a simplistic solution has been implemented.

With this comment, I'm just voting for a very simplistic merge-ability which is very easy to implement.

Instead of offering only 2 options (overwrite phone, overwrite dropbox) when out of sync, please offer a third option: merge phone and dropbox, which simply copies both files together and removes duplicate lines, i.e. lines that are absolutely equal on a character-by-character basis - no content-parsing.

This way, tasks may still get duplicated, but this won't hurt. But having only 2 choices - discard phone changes or discard dropbox changes really hurts!

Without even a simplistic merge-ability, todotxt-android is of no use for me because I do not keep my phone always-online.

@intrications
Copy link
Contributor

@fred777 Why don't you implement this and send a pull request?

@fred777
Copy link

fred777 commented Jan 10, 2014

Because I haven't coded anything for Android / Java until now and it would take me a lot of time to work into it, set up Android toolchain, etc. Gina also mentioned unit-tests, which would add even more work for me.

Also, I'm not quite sure if the git repo is uptodate compared to the version offered in Google Market.

So, if I'd decide to implement an own quick&dirty solution, I'd do it with a bash shell script and Tasker.

@intrications
Copy link
Contributor

Sorry, I thought because you said it would be very easy to implement that you would be able to do it. It does sound quite straightforward but, as you say, unit tests are also required.

The git repo should always be the same or ahead of the version in the Google Play Store.

@fred777
Copy link

fred777 commented Jan 10, 2014

:) If I had enough android background, I'd have done & committed it already...

PS: in Android terminal shell, cat todo1.txt todo2.txt | sort | uniq > todo.new works like a charm

@karbassi karbassi added this to the Version 2.1.0 milestone Oct 9, 2017
@evanp
Copy link
Member

evanp commented Mar 13, 2018

There's a package from Google for doing diffing, matching and patching.

https://github.com/google/diff-match-patch

It's under active development, implements the best-of-breed Myers algorithm for diff/patch, and is probably a great way to start without writing diff/patch from scratch.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

6 participants