Merging branches taking a long time

This forum is for all Flare issues related to using Source Control.
Post Reply
sboltz
Propeller Head
Posts: 25
Joined: Wed Sep 10, 2014 9:59 am

Merging branches taking a long time

Post by sboltz »

I'm using the latest version of Flare with ADO/git and have been trying to merge a branch into main for the last 2 hours or so. This is my first production trial of using branches. All testing and trials up to now have been rather small. This branch contains a lot of changes, additions, and deletions.

I'm not sure how long is a reasonable amount of time to wait before quitting Flare. The Progress dialog in Flare doesn't show any progress and Task Manager shows Flare using between 26 and 31% CPU throughout the past couple of hours.

Any recommendations on how long I should wait? Will Flare timeout if there isn't activity or it freezes? I'm really not sure what to think because the Progress dialog shows bars with no progress...
Suzette
BeckyM
Jr. Propeller Head
Posts: 5
Joined: Wed Sep 02, 2015 8:25 am

Re: Merging branches taking a long time

Post by BeckyM »

Hi,
I find that trying to do anything with the source control integration between Flare and git is really slow.
Just changing branches can take several minutes (admittedly I have quite a large project).

If it helps at all, I use the git command line for most of my source control related needs. Just remember to exit out of Flare before switching branch, merging etc. as when you return to it, it will probably hang.

I'm finding that with each update of Flare the source control integration with git gets worse :(
sboltz
Propeller Head
Posts: 25
Joined: Wed Sep 10, 2014 9:59 am

Re: Merging branches taking a long time

Post by sboltz »

Oh, that's disappointing to hear. One thing I've learned is to close all files before switching branches. I made that mistake a while back and now I close all files, close Flare and reopen to switch branches. And I agree, it is slow, even on smaller projects. I did run into the issue where it doesn't recognize branches created in git and am slowly learning to use git bash.

Do you have any tips for which git commands you find most helpful?
Suzette
BeckyM
Jr. Propeller Head
Posts: 5
Joined: Wed Sep 02, 2015 8:25 am

Re: Merging branches taking a long time

Post by BeckyM »

You might find this site useful:
https://dzone.com/articles/top-20-git-c ... h-examples

The commands I use most often are:
add
branch
checkout
commit
push
pull
status

I just find the command line a lot easier than using git bash or similar.
The help guides for the products I am working on are in the same repositories as the dev code and I often push my changes to the devs branches. For merging branches we use Pull Requests in ADO.
kevinmcl
Sr. Propeller Head
Posts: 250
Joined: Mon Sep 11, 2006 10:58 am

Re: Merging branches taking a long time

Post by kevinmcl »

THIS thread, right here, is one of the many reasons that a certain company (wink-nudge...) has begun switching from Flare to markdown+Pelican+<some-tools>.

I... er... I mean, some writer... is stuck with Flare because it would take six months of dedicated re-architecting and rewriting of my... er... I mean 'his' project documentation to get it all into markdown. But other products/projects at my.... er... I mean, at some writer's company, have already made the switch and are loving it.

I just started with git-with-Flare mid-last year (having used Flare without Source Control since about 2006). I've done some small branch merges of a few files difference, where Flare just automatically did the merge. I've done some small branch merges where Flare complained about a few conflicts and then nicely presented me with a window on the source file, a window on the destination file, and a third window below, in which to edit/resolve. I did that.
So imagine my surprise when I tried to merge a feature-release branch into develop just last week.

And Flare popped up the usual merge progress window - the one with the two progress bars across the top.
And then it sat there. No color at all on the 'progress' bar. No movement. Two and a half hours later, I figured it was stuck and I clicked the Cancel button. Two hours after that, Windows Task Manager said Flare was still running, but there was no evidence of that in my open Flare instance, and no response to any click or prod. So I forced it to shut down.

Then I shut down my laptop and started up with only the company-mandated apps that launch on boot, plus Flare... no other resource drains like mail or browsers or anything... whoops, I had to close it and delete a Merge-head file and an index-lock file, etc. So I did that and shut down the laptop again and restarted it and Flare and opened my project and I said merge this branch into this branch and the dialog came up again.

This time, 15 hours later, with ABSOLUTELY ZERO INDICATION that anything was happening, I killed it again.

Does anybody know an IDE I can use to compare-and-resolve all the affected files so I can get a successful merge (in whatever other tools I need to use externally), so Flare won't choke when I launch it again?

Is it just me, or are MadCap voices conspicuously absent from this thread?
De gustibus non disputandum est
BeckyM
Jr. Propeller Head
Posts: 5
Joined: Wed Sep 02, 2015 8:25 am

Re: Merging branches taking a long time

Post by BeckyM »

Sometimes in a moment of distraction I forget and try to do something source control related in Flare such as viewing file history... and then immediately kill it because I don't want to sit for hours waiting for nothing to happen!

I use Visual Studio for all of my merge conflict needs!
Visual Studio and the git command line do me just fine.

Not an IDE, but how about GitHub? Haven't used it myself yet, but need to do some work around it soon so will be having a play in the next week or so.
sds
Propeller Head
Posts: 48
Joined: Tue Jun 26, 2018 11:29 am
Location: Tucson

Re: Merging branches taking a long time

Post by sds »

I'm sad to see no one has found a solution. I am, unfortunately, in the same boat. I've used branches & merged them without issue but today I went to merge a rather large branch and everything fell apart. Like others have stated, it was taking so long that I killed it. Then, to my dismay, I found that some of my changes made it across, and others didn't, but I'm not getting any error, conflict, or otherwise when I try to merge again. It all just stalls out. I'm at a total loss and this is so disappointing. I'm not a Git expert so any advice would be welcome. It would be amazing if someone could tell me how to just merge the branch into my master manually, because Flare's not doing the job.
kevinmcl
Sr. Propeller Head
Posts: 250
Joined: Mon Sep 11, 2006 10:58 am

Re: Merging branches taking a long time

Post by kevinmcl »

BeckyM wrote:
I use Visual Studio for all of my merge conflict needs!
Visual Studio and the git command line do me just fine.
Yup. The people who led the way from Flare over to markdown were using VSC and recommended it. I use it now.
I use Git Bash alongside flare, to create any new branches or to get them cloned to the remote repo.
I still use the Flare branch selection, and for merges from master to <branchxyz> that I do multiple times per day, but any time that more than one merge conflict pops up, I just cancel the merge in Flare and go to VSC for a decent merge resolution tool in finite time.

I feel your pain about accidentally hitting the Branch History button. Y'know those depictions of launch buttons for torpedoes or missiles; they always show the flip-up protective cap to protect against accidental activation? Yeah... the Branch History button needs something like that. Once you've got more than 20 pages in a project and have merged or committed and synch'd more than a few dozen times, you never, ever want to click that button again, 'cuz it seems to want to read and collate the history of the world, to the exclusion of all other tasks... and let's not even mention little joys like completely ignoring the Cancel button. Or, at the very least, if you click the Branch History button, it should pop up a confirmation dialog that says something like

"YOU FOOL! Are you really certain you wish to pursue this irretrievable indiscretion?
[ Glutton for Punishment - Hurt me ] / [ OMG! Save me from the momentary lapse of sanity! ]"

OR, perhaps

"Persist at your peril, unwise one!
[ Confirm Folly ] / [ Return to Rationality ] "
De gustibus non disputandum est
sds
Propeller Head
Posts: 48
Joined: Tue Jun 26, 2018 11:29 am
Location: Tucson

Re: Merging branches taking a long time

Post by sds »

lmao that was totally me. I felt like I just torpedoed my project. Actually I still do. I'm in some limbo hell right now where about 50% of my content merged and the other 50% didn't. I've restored backups, tried analyzing manually... I'm not even sure what else I can do except literally go through every single thing I logged in a different system and make those changes again. So my <branchname> still exists and has all the changes. The master branch has *some* of those changes... I have tried to merge again 3x and it just freezes. I have tried hooking my repository up to GitKraken and that's not working at all. Does MadCap put some kind of proprietary file in there that wouldn't allow that? I just need some way to try the merge again & resolve any conflicts.


EDIT: So, I finally got it all fixed. I ended up restoring a backup of my project directory from 4 days ago and *that* didn't cause this weird lock. I was able to hook it up to GitKraken and finally get the merge taken care of there. Once I found a good backup, I made a couple copies of it and tried the merge from Flare again to no avail. I'm super disappointed that it can't handle large merges. I'm in software and I was really hoping that I could keep a version branch around for 3 months and then merge it all at once upon release. I'm never doing that again in Flare.
scap
Propeller Head
Posts: 52
Joined: Tue Jun 28, 2022 7:36 am

Re: Merging branches taking a long time

Post by scap »

About 20 minutes in, wish I'd searched for this thread beforehand.

Though, it's merging from Central so it seems I have no alternative VC option other than to wait.

EDIT: have abandoned ship. Been trying via Visual Studio Code source control instead, different problems... (SSL certificate).
You do not have the required permissions to view the files attached to this post.
sds
Propeller Head
Posts: 48
Joined: Tue Jun 26, 2018 11:29 am
Location: Tucson

Re: Merging branches taking a long time

Post by sds »

Hey scap - Sorry you're going through this. GitKraken ended up being my savior even after that last debacle. It ended up happening another time, albeit I caught it early enough. I am 99% sure that the Flare Git source control interface struggles when there is a file conflict (two branches have edits to the same line of the same file). Instead of letting you know there's a conflict, it just slows way down on every single thing you ask it to do.

I've started using GitKraken as a monitoring tool. Every once in a while, I open it up on the same repository and check to make sure everything look good. You're able to actually see each commit from there in a more clear way (IMO). I'm also doing ALL of my merges from there. When I'm ready to merge, I use GitKraken. If there is a file conflict, you have a workspace in GitKraken where you can pick the change you want, it fixes the file, and then you're good to go.

One thing I learned the hard way if you start using this model.... Be careful if you have Flare open and GitKraken open, and then you start switching branches in one or the other. I'm 99% sure that while I was wrapping my arms around this, it caused the Git index to break, which again, caused a total slowdown to any action in both source control clients. After hours of research and experimentation, I found I could delete the index file from the directory, which forced me to re-commit my entire directory, but then solved the problem.

I'm definitely not an expert at source control. I know just enough to create a branch or two, merge, and hopefully fix an issue. But GitKraken has been much easier for me to use.
Post Reply