Swift Package Manager rename and deletion not visible after merge. No merge conflicts shown - ios

i am creating a private swift package for myself that I use in a different project.
For the package I have a develop, acceptance and master branch.
When I make a change in the project like a rename or a deletion of a file I merge this to the develop branch.
However when I later merge the develop branch to the acceptance branch or the acceptance branch to master branch I do not see this changes.
Instead the deleted files are back and the file I renamed also get back with the original file name.
I expect merge conflicts but those are not shown.
I checked the .gitignore to see if what gets ignored but I do not see anything that has to do with this.
I am not sure what I am doing wrong here or if it's simply not common for packages to work like this. Anyone got the same problem or tips on how to make it work better?

Related

TFS - How to promote code to prod branch without merging

We have 3 TFS branches – dev, test, and prod.
TFS works well for us as source control as long as we check in and get latest often. Then the merging is small and we can resolve any issues right away. We know that if we don’t do this every day, then merging our code will be painful.
But by the time we are ready to promote to one of the other branches, there are huge changes in the code. We don’t want to keep any of the code in the target branch, and we really do want an exact copy of the source version, not a merge.
We do like having the 3 branches so that change sets are kept for the complete set of changes in each deployment/promotion.
I don’t see a way in TFS to do this very common function. I have been using two workarounds:
If only one user does the merging from one branch to the next, TFS really does copy all changes. But it does not work if the user is different than the last user attempting the promotion, then TFS will merge the code.
I have checked out the whole solution of my local copy of the target branch. Then done a file system copy of the source branch folder into the target branch folder. Then checked in the solution.
Is there a right way?
The correct way to merge is:-
Set up a shared workspace that contains both branches (if you don't already have one)
Get the latest Target branch code
Get the latest Source branch code
Merge from your Source to your Target using Latest Version and All Changes to a Specific Version
Submit your Changes to Source
To overwrite the target if you get conflicts, to ensure that the target is definately overwritten, Select Choose Source version at the conflict window
I know this post is way late, but
My solution in this scenario
Prod -> Dev -> Test
(parent) -> (child) -> (grandchild)
When test is ready to be promoted, I do the following.
Delete Prod (This can be undone with rollback, but check-in)
Branch Test -> Prod (Use the same name a location as the old deleted version), so your new branch structure will be Dev -> Test -> Prod
Reparent Prod (new branch) to "none"
Reparent Dev to Prod
Delete Test
Branch Dev -> Test
When you look at the new branch hierarchy it will look the same as when you started but the code in prod will be the same as Test.

How to merge in TFS when a file has been moved?

Here's our situation:
In TFS 2010 we have the main dev branch and a release branch.
At some point, it was decided that some code was in a poorly named directory so it was renamed in TFS (only on the main branch as it wasn't a bug fiw).
I have now fixed a bug in this moved code on the dev branch and want to merge the fix into the release branch.
However, when I do this, rather than performing a merge on the file, it creates a copy of the file in the new location and labels the change as 'merge, branch'.
Am I doing something wrong or is this a 'feature' of TFS?
Update: I've just revisited this post and retried. steps to reproduce the error are:
I have a file (control.cs) in Main/Desktop/UserControls and
Releases/V5/Desktop/UserControls.
Using source control explorer I 'Move' UserControls to UserControls2 and check in (I've also tried 'Rename' btw with the
same results)
I Edit control.cs on Main and check in.
I merge Main into Releases/V5 (Note I am merging on the whole branch, not just UserControls)
I now see the modified control.cs in Releases/V5/Desktop/UserControls2 and the old one in Releases/V5/Desktop/UserControls
I answered it earlier with the assumption that you have the DEV branch and I have more inputs after I did some more research in TFS with what you explained above.
This is what I did, I have a Source branch call it Main, I branched from Main called Release. In Main, I have two folders (f1 and F2), I renamed folder F2 to F3 and checked in the changes. Then edited the file File1 within F2 (now F3) and made some changes to the content, checked in the changes.
Now I merged the Main to Release and every changes were merged properly. In Release, the folder F2 was renamed to F3 and the file1 was merged to the right folder as well.
The change should show up as merge, rename for the folder and edit for the file.
Everything worked like a charm. I am using TFS2010 as well. Can you please let me know if you have done anything differently than what I just explained above? Am i missing something?
UPDATE:
I tested the exact scenario that you mentioned above and it merges the control.cs file properly even after the Move/Rename in the source branch. I believe that in your case - in the Release branch someone recreated (deleted and added again) the Usercontrols folder and/or the Usercontrol.cs file, so TFS doesnt recognize that its the same file/folder from the source branch and hence its not getting merged properly.
Can you check the history of the Usercontrol file in the release branch to confirm that?
Just adding some screenshots from my test:

Master GIT repository with shared sub respoitories

I have created a basic admin system using RoR. It has very basic functionality such as users, roles, security features and a basic UI. I want to put this project into a master GIT repository.
If I want to create future projects, I'd like to use this base project as the foundation. Do I create braches?
MASTER PROJECT
MASTER PROJECT > SUB PROJECT #1
MASTER PROJECT > SUB PROJECT #2
So both sub projects are identical to the master project at this point. If I want to make a universal code change to any file within the MASTER PROJECT, how do I make that change trickle down to all sub projects. That is my FIRST QUESTION.
SECOND QUESTION:
What if I want to make a code change to a particular file on one of the sub projects?
e.g.: If I customize the layout in SUB PROJECT #2 (application.html.erb), I want that change only to affect SUB PROJECT #2. I want all sub projects to use the application.html.erb from MASTER PROJECT UNLESS it has changed (customized). It would be nice if SUB PROJECT #2 only contained the one customized file. All other missing files fallback on MASTER PROJECT.
THIRD QUESTION:
If I make a change to application.html.erb in the MASTER PROJECT, it is supposed to tickle that change down to all sub projects UNLESS one of the sub projects has a customized change to that file already. In this case, SUB PROJECT #2 does.
I'd want GIT to either:
a) Skip the update on application.html.erb on SUB PROJECT #2
OR
b) Prompt a warning to allow for some sort of merge.
Does that make sense? Is this setup possible? What would it be called? Where do i start?
Question 1:
You could use branches to track this. However, you should also consider whether what you need is simply a set of templates.
Git does not perform automatic merges by itself. You can write a script to do this, but otherwise you'll need to manually perform a git merge on each subproject branch.
Question 2:
Any branch you create will initially be identical to the original branch (master), at the time you created the branch. It will not change until you commit changes or merge in changes from the master branch. It wouldn't make sense to have this branch contain only the one customized file, so you may want to consider why you're asking for that if you want to use version control branches. The branch may only contain modifications to the one file, but nothing enforces this.
Question 3:
This is what git is designed for. When you do a git merge on the subproject branch, git will try to automatically merge the content and if it fails it will mark a conflict and allow you to manually perform a merge. You can also tell git to use another merge strategy, such as 'keep the local version', but this is a more advanced technique, and probably isn't what you want.
I recommend you start with the git-tutorial and make sure you have a good understanding of branching in git. Then, revisit this idea and make sure it still makes sense for what you're trying to acheive.
Maybe it's the right choice to put your master project into its own repository and make a new one for each project. There's git submodule which enables you to integrate other repositories in a project. YOu should try to have project specific changes only in the relating repositories, changes on the master project you can update via git submodule!

Storing files on TFS

I am working with my co-worker on some files, that are in TFS repository. We have to share these files frequently, however, in the process of our development they are neither compilable, nor working properly. We don't want to put them in the repository, because the rest of the crew shall have problems with compiling the solution. However, the manual sharing would be rather painful. Is there a way to put files on TFS, but not inside repository? (mark as temporary, not finished or something like that).
You can use a shelveset - if you shelve your set of changes then your colleague can pick them up and the other members of the team will never see them. It is a bit of a PITA as you need to have 2 shelvesets (1 each as you can only update your own). The only other way is to branch and then merge when you have compilable code.
Another option is to branch the code into a new branch that the two of you use. When you are done working on the file, and it will no longer break the main build, you can then merge that file back down to the development branch.

Merging from wrong changeset in some circumstances

I have a main branch and a dev branch in TFS. I merged changes from the main branch up into the dev branch fine. Now when I try merging up again it says there is nothing to merge.
However when I merge down from the dev branch to the main branch, it magically decides that a bunch of files have differences (which are only present in the main branch). Why does it decide this? Because TFS is comparing using the wrong changelist version from the dev branch! It is using the second to last changelist, not the latest one like I asked!
Sure I could resolve this by doing a force merge, but then every file in main would be marked as changed when it actually hasn't. What I want is for TFS to actually WORK in a logical way, does anybody know a work-around for this behaviour?
Even though this question has been asked a long time ago.
First things first, you are working on a dev branch and you have a main branch like the published one, so when you merge up to main you should get all changesets you checked in on dev branch.
If that is not the case, make sure you have nothing in pending changes to make sure you checked your changes in.
I work with a workspace for each branch not sure if you do this, make sure that you are on the workspace of the main branch and right click on dev branch and do the merge accordingly.
Hope this is what you were asking for.

Resources