Xcode 7 doesn't show new remote branches using Git - ios

In Xcode 7, after creating a new remote branch using Jira/Stash, when I pull master, the new branch used to show up as an optional origin branch. Now newer branches don't show up at all, so creating a new local branch isn't as easy.
Before you could go to Source Control > hover over your current working copy > select "Switch to Branch" and scroll to see the new origin/ branch. Once that was selected, Xcode automatically created a local branch.
Now I have to manually name/create a new branch locally and push it up (Create) the remote branch which can cause a lot of conflicts if you're working copy isn't master.
Is there a way to force Xcode to see all the remote branches via the Terminal, or by something I'm missing in Xcode?

Ok, so as of Xcode 7.1.1, it looks like the way to do this is to:
1) Create your branch in Jira/Stash
2) In Xcode, go to Source Control
3) Select "Pull"
4) Click on the dropdown and you'll see the new "origin/..." branch
5) select the new branch and pull
6) go to Source Control, hover over your working copy, and select "Switch to Branch..."
7) find the new origin branch in the origin section and you'll create a new local branch
Some IDEs like Visual Studio may require you to pull "master" to get the new origin branches, but this seems to be the way it's done now in Xcode.
UPDATE: It appears I didn't have "Refresh server status automatically" checked which would eliminate most of these steps! (found in Xcode -> Preferences -> Source Control .. unless this was recently added in Xcode 7.3)

Now you need to tick Fetch and Refresh Status

Related

Cant create a branch from a TFS project

I started using TFS and I was not using branches for my project, but now I need to manage releases, so my Idea is to make Branch from the project and for every release create new branch from the main branch.. so
In VS2015 Source Control Explorer, i click on TFS project > Branching and Marging > Convert To Branch and this error happened
TF203028: You cannot create a branch at $/ProjectA because a branch alreadyexists at $/ProjectA/Main. If $/ProjectA/Main is not a branch convert it back to a folder and retry the operation.
the problem is that I don't see any branches in source control manager neither in TFS website, I created empty branch earlier but I deleted it. What to do ? I don't want to create new project with Main branch and copy/paste the source codes because I want to preserve the commits.
In TFS, you never really delete anything. In fact, if you look under Tools -> Options -> Source Control -> Team Foundation Server, there is an option to show deleted items:
To actually delete an item, have a look at the tf destroy command.
I believe that you can simple rename the folder, and that will maintain your history, should you not wish to permanently delete the old branch.

How do I create a bot in Xcode? Getting "Creating a bot requires a project that is under source control."

I'm trying to get Continuous Integration setup in Mavericks using OS X Server for Mavericks.
I have the Server installed and my source code is in a local directory using Git from assembla. I'm following the Apple Xcode Continuous Integration Guide, and I'm at the part where I'm adding a bot to the product in Xcode.
I'm getting the error:
Creating a bot requires a project that is under source control. This project appears to be in a local git repository. To be able to create a bot, the project must be in an repository the server can access so it can clone it. [cancel] [Configure Remotes...]
Clicking either cancel or configure remotes brings up the configure for my folder and I see my remote added just fine. I also tried adding the remote repository again with a different name.
How do I move forward?
It seems like this issue happens when there isn't a remote named "origin", as that's what Xcode is looking for. When I renamed my remote to origin (in <ProjectRoot>/.git/config), Xcode stopped complaining and let me add a bot through the Xcode UI.
This is hacky, but worked.
In Xcode I clicked the Source Control menu then checkout. I checked out my repository to a new folder and I was able to create my bot.
It seems adding the repository from the command line caused things to not look correctly configured to Xcode.
After numerous trials I did the following steps to get the whole process to work:
Connect a device to the server. Make sure it is active.
Set up the server and ensure that the XCode service is active.
Create a new project with a local GIT.
In the Source Control menu, select Configure, and under Remotes select to Create New Remote.
Go to Manage Schemes and check the Shared check box.
Commit the project and select Push to master.
Go to the developer site and create an developer and Ad-Hoc profile.
Go to the Xcode settings and reload the profiles for the team / developer.
Configure this profile in the app build settings.
Select to create a bot with CI to run on commit.
The next time you commit this should run the bot etc.
I had the same issue when I tried to edit a bot that I created before. In my case the problem was that I created the bot for the master branch, but when I tried to edit it, I had checked out a different branch. After switching back to master I was able to successfully edit my bots.
Tried most of the things here. None worked for me. Got this error
Creating a bot requires a project that is under source control..
But when I proceeded with the popup it said
All projects are in workspace (something similar).
I did the below
Removed .git folder
git init
git remote add origin <repo.git>
git pull origin <branch_name>
removed the conflicting folders and files
git pull origin <branch_name>
Then when I clicked create bot from Products it worked.
I think I had the easiest time of all. I simply did an Xcode-based commit and push, then tried the bot again, and the nasty error was gone.
[In Xcode 6.4, this would crash the Xcode].

Xcode Service: Select Git Branch

I started to set up the new Xcode service in Mavericks. I created a new bot - but I wasn't asked for the branch it should build?
How can I select the branch for each bot? I do not only want to build master, but different branches too.
In the current version, when you create the bot in Xcode, it will be linked to the currently active branch. You can easily verify (but not change) it from the web interface, when you navigate to the bot -> Bot settings (when you click the cog wheel in the upper right).
Alternatively you can create the bot via the web interface where you can specify the branch name plain-text.
Assuming you want to change it whenever you want and not recreate bots each time, you can use the script: (pre-trigger)
cd "$XCS_SOURCE_DIR/<repo name here>"
git checkout development
Just change it to whatever branch you want and whatever repo you want. (you can look in the pre trigger logs to see if you mess up the change directory, ie if you misspel the repo name or whatever else. Good luck!
Create a bot for each branch you are interested in testing.
You can create as many bots as you want. Each one will check out whatever branch you specify, and run per the schedule you set individually.
It seems like this is now possible (in Xcode 7.1). However, you only get the option your project actually has more than one branch (makes sense).

Xcode 4.5 - Can't create Branches/Trunks/Tags for SVN

Simply as titled, I can't create Branches/Trunks/Tags for SVN although I am able to connect to the repo. In the screen where I enter the Trunks, Branches and so, it can't connect to them (showing red indicator). What am I doing wrong?
Go to Source Control->Project Name->COnfigure
Over there, select configuration and update the paths of trunk,
tags and branches.
Now along with info and configuration, you'll get branches option as well/
From there add a new branch and an auto switch to that branch will happen.

TFS2010, is it possible to create a branch retroactively?

Been using TFS2010 for just a few months now so relative newbie, and now possibly need to create my first branch, unfortunately I need to create it from an older changeset, is this possible?
Basic scenario is I converted a project from VSS 6.0, with history, and it all came over fine. Project has approx 500 source files.
Before the conversion from VSS we started working on version 4.0 of our project, with no plans to release any more bug fixes to 3.1 so we didn't establish any branches at that time.
So we have made significant changes to about 20 files (which I can identify), but now the client wants to release a 3.11, 3.2, 3.3 etc because not everyone will be ready to go to 4.0 product anytime soon.
I think we want to create a branch, and then use TFS to rollback about 20 files in that branch to an older version, is this possible to do? Create a branch from where we are now, and then rollback some of the files? or does creating a branch cause you to lose history for that branch?
Slightly complicating things is that after we started working on 4.0, besides making the 4.0 specific changes we also have several changes that we made that would need to go into both he 3.1 branch AND stay in the 4.0 branch we are working on now, and furthermore, and more bug fixes we need to put in over the next several months would need to apply to both branches.
Perhaps this is a pretty straight-forward use case for TFS, but just wanted to make sure I don't mess up what is already working perfectly fine.
Suggestions?
You can create a branch from any changeset, and it's very easy from within the Source Control Explorer UI. Just navigate with Source Control Explorer to the server path you want to branch, select branch, and then you'll be given the option to "Branch From Version". Just select whatever changeset you want to branch from and your new branch will be created from that instead of the default of the latest version.
Why don't you choose to get the appropriate base version with "Get Specific Version" which will summon the sources in the state you need - of your version 3.1.
Then construct a branch to continue work towards 3.1x
Executing 'Get Latest' on your base branch should result with your sources in version 4.0
I have just done this.
I started my solution with a single branch team project in codeplex :
-MyPrettyCMS/Database
-MyPrettyCMS/Framework
-MyPrettyCMS/Layers
-MyPrettyCMS/Portals
-MyPrettyCMS/Solution
It's not possible to create a branch of the team project
WARNING ! I tryed to convert Team Project folder to a Branch, it worked but after that, I can't create any branch and I had not enough rights to undo that (I had to ask the Code Plex TFS Administrator to undo for me).
All of this must be done with team explorer and not with solution explorer.
So I created a Team project folder subfolder CurrentRelease like this
-MyPrettyCMS/Database
-MyPrettyCMS/Framework
-MyPrettyCMS/Layers
-MyPrettyCMS/Portals
-MyPrettyCMS/Solution
-MyPrettyCMS/CurrentRelease
Then, for each folder I used the team explorer move command (DON'T MOVE FOLDERS with the Windows explorer even if you have the plug in, because sometimes it fails).
The result is
-MyPrettyCMS/CurrentRelease/Database
-MyPrettyCMS/CurrentRelease/Framework
-MyPrettyCMS/CurrentRelease/Layers
-MyPrettyCMS/CurrentRelease/Portals
-MyPrettyCMS/CurrentRelease/Solution
At this point you must archive each CurrentRelease subfolder
Now you open windows explorer and you verify each folder and its descendent to see if you forgot some files. If you did, copy it to the new folder, add it to archive with the Add files of Team Explorer. You must archive again.
Right click on MyPrettyCMS/CurrentRelease ans select command create a branch
I used CurrentRelease-To-2-50-001 as Branch name
Then I have
-MyPrettyCMS/CurrentRelease/Database
-MyPrettyCMS/CurrentRelease/Framework
-MyPrettyCMS/CurrentRelease/Layers
-MyPrettyCMS/CurrentRelease/Portals
-MyPrettyCMS/CurrentRelease/Solution
and
-MyPrettyCMS/CurrentRelease-To-2-50-001/Database
-MyPrettyCMS/CurrentRelease-To-2-50-001/Framework
-MyPrettyCMS/CurrentRelease-To-2-50-001/Layers
-MyPrettyCMS/CurrentRelease-To-2-50-001/Portals
-MyPrettyCMS/CurrentRelease-To-2-50-001/Solution
I archived the Initial version of the branch.
Now I can work on my next release and make some minor corrections to the current release.

Resources