resolving merge conflicts doesn't work #111

jtbayly opened this Issue Mar 25, 2011 · 19 comments


None yet
7 participants

jtbayly commented Mar 25, 2011

I opened a shared text file and edited it at the same time that my friend did, and then we both saved it at the same time. On the next sync, mine looked just like it had when I saved it, but his version got screwed up with some sort of git merge junk.

From that point on, nothing that either of us did in that shared folder got synced to the other person.

This is what his .txt file looked like:

<<<<<<< HEAD
This is a test. I wonder what it's going to do.

I'm going to win this contest. -JTB
This is a test. I wonder what it's going to do. I still am not sure what it's going to do.

Blah, blah, blah, blah. blah.
>>>>>>> / ‘SparkleShare.txt’

jtbayly commented Mar 25, 2011

wow. it took a lot of tries to get that text to show up correctly.

wimh commented Mar 25, 2011

@jtbayly, this is a merge conflict. This happens when an automatic merge fails. So someone should check manually what to do next.

So what would you expect sparkleshare to do in this situation?

  • Automatically decide which version to keep. So either your changes, or the changes of your friend will be lost.
  • Popup a window asking what to do
  • ?????

And would you expect the syncing of other files to continue, even if this file is 'corrupted'?

jtbayly commented Mar 25, 2011

I don't say this to be critical. I'm just trying to be helpful in thinking about where to go with this.

Here's the thing. I don't expect this program to be for developers. I'm a developer. I don't need a git frontend. I need a dropbox replacement. That's why I'm interested in SparkleShare. Does it have to behave exactly like dropbox? Of course not. But I think it is a bad idea to aim for developers using this for projects. That's too small of a segment. Make it useful to the public first, and then make it useful to the small niche. If you get focussed on the needs of programmers, you're stuck with it being too complex to ever really become useful outside of that group.

Expect your mom to be using it, and you're on the right track.

So I've got this awesome folder that's always got the same stuff in it on both of my computers. And suddenly it doesn't have the same stuff on it, and one of the files is totally jacked up. No good.

That git message might make sense to a developer, but not to my mom. And plus, what is that going to do to an image? or a Word doc? Or etc...

So, I recommend:

  • an alert, allowing you to pick which version to go with. As it stands, there is no indication of what is going on. You save the file and close it, and boom. Syncing stops working. But when do you notice? The next day? The next week? Do you have any idea what caused syncing to stop? Nope. I guess I could open every file in the folder and see if it was messed up. But then what? Currently there is no way that I could find to fix the problem and start up the syncing again. There could be all kinds of creative things that could be done here in terms of what you display to the user, and when and where. And it would be an improvement on Dropbox, which just silently overwrites the conflicting file. But if I had to choose between the current implementation and silently overwriting, I'd choose silently overwriting.
  • continue to sync the rest of the folder. There are very few instances (aside from programming) where multiple files are versioned together. When you pause syncing, all you do is increase the chance of further conflicts. Let the user fix the conflict in their own time. If they want to wait a week, fine. But make sure they know about it right away. And make sure there is an easy way to pick which one to go with. And make sure that the rest of the folder continues to behave. The folder isn't in conflict. The file is. (I can't think of a single scenario besides programming where you want the whole folder paused. I'm sure there are some. But they are a tiny minority.)

hbons commented Mar 26, 2011

This is a bug. SparkleShare should have kept a copy of each file with a timestamp+author appended to the file name.

jtbayly commented Mar 26, 2011

Aha! I really like that way of handling it! I'm sorry I can't provide more info. If I produce it again, I'll try to get the log for you.


hbons commented Mar 27, 2011

note to myself: we probably never want to allow automatic merging of files through rebase. there should always be 2 separate files created.

pixmin commented Apr 7, 2011

Just had the same problem, the little star in the icon kept spinning so I checked the log and there was a conflict. I think what it should do in that case is provide a visual clue that there is a conflict (different icon, maybe a red version?, and also a notification, but not just a notification as you might miss it, as long as the conflict is there the icon should make it obvious that something is going on and requires your attention). Then in the menu when you click on the icon, it should tell you about the conflict, and maybe offer a direct link to each file (like two menu entries, one for each version of the file, so you can click on each to open each file and compare, then remove the one you don't want).

In Nautilus, the file should have an embedded icon, someone like an exclamation point, and if you right click on it, it should have a similar menu as on the icon, something saying there is a conflict and offer:

  • if it's a binary file, to open both files and decide which one to keep
  • if it's a text file, maybe offer a diff to decide which one to choose?

Just some ideas...

Thanks for this nice tool!


hbons commented Apr 8, 2011

@pixmin yep, that's roughly the state i want it to be in.

@pixmin: My mom would not know how to read a diff ("What are those plusses and minusses?") and imagine you access your machine through a terminal, there you dont have nautilus icons BAM! =). I'd stick with hbons solution: SparkleShare should have kept a copy of each file with a timestamp+author appended to the file name, this can be understood by everyone.

pixmin commented Apr 25, 2011

@laryllian: I believe that in order to use SparkleShare you need a git repository, so I would guess that if your mum doesn't know how to read a diff file, she probably won't be setting up a git repo... And regarding the terminal comment, if I had to remote access my desktop via a terminal I would probably not use SparkleShare in the first place but simply use git directly... But that's just me :)


hbons commented Apr 25, 2011

@pixmin @layllian the nice thing about building on git is that we can make it nice for most usecases, but if you would like to diff yourself or do some more advanced things, you can! it's just git :)

Anyway, i think everyone in this thread agrees that it should be nice and easy :)

@pixmin: Hehe, I know what you mean, but here is the thing: I would go to her, install and configure it (or send her an email with server and folder info) and then just tell her, that she can send me stuff by placing it into that folder, done. My point is that: for using (not hosting) SparkleShare, you should not have to understand git or even know it. But hey, that's a design decision and up to hbons. =)

@hbons: Yes, and "shine by its absence" nodecisiondialogspleasecoughcough ;-)


hbons commented Apr 25, 2011

@laryllian i hate dialogs :)

Keeping it nice and simple and explicit : have a "conflict" version of the file with a timestamp (and the author if you want). This also happens a lot when working offline. This is a must have.

Personnaly I get the following error in a loop when simultanously editing a file (cluster-ssh is usefull for testing). :

It seems that I cannot create a rebase-apply directory, and
I wonder if you are in the middle of patch application or another
rebase. If that is not the case, please
rm -fr /home/arthur/SparkleShare/SparkleShare/.git/rebase-apply
and run me again. I am stopping in case you still have something
valuable there.


hbons commented Apr 30, 2011

I redid the conflict detection and resolving code in master and it seems to work well. Would be nice if you folks could test it (edit/delete a file on client A when client B isn't running, make conflicting changes to the same file on client B's system and start client B)

If a file got edited on the server but you didn't know about it (whilst offline, or editing at the same time) this will be detected and the server's copy will be used for the file. Your local file will be added with your name and timestamp and pushed to the server. Local edits/adds overrule server side deletions, server edits/adds overrule local deletions.

On Linux, a bubble should pop up. Not yet on Mac because of the lack of Growl support.

Closing, these issues should now be resolved.

hbons closed this Apr 30, 2011


I am trying this software version 1.0 on Windows 7 64 bits and Ubuntu.
I tried to create a conflict to see how it handles it and I got the issue described here.

On the Windows machine, where the conflict is known (on Ubuntu, I still have the old version) here is what a git status gives me:

C:\Users\user\SparkleShare\testing [(f725990...)|REBASE]> git status
# Not currently on any branch.

I don't know how you handle the conflicts and I was wondering if it is because I had git installed prior with the "GitHub" software.
Sadly, I don't know git enough to know how to make it continue. At least, that was just a test project :)


hbons commented Jan 12, 2013

@provirus that's issue #1108.

Really? I read the full thread #1108 and I didn't see anything about trying to create a conflict and having the conflicting file with

<<<<<<< HEAD

waiting to be resolved.


hbons commented Jan 12, 2013

@provirus it does, in the logs pasted. i'm pretty sure your issue is the same one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment