I've been using TeamCity to build all of my named branches (in Mercurial). It works well. However, TeamCity continues to show the branches after they have been closed for up to seven days past the last commit time to that branch. I would like to hide closed branches, aka, not show them in the TeamCity list. Does anyone know how to hide closed branches in TeamCity? I'm currently using TeamCity v8.1.2.
According to the TeamCity documentation you can set up the cleanup defaults from the following menus:
Administration | Project-related Settings | Build History Clean-up page, Configure clean-up rules section.
Related
This question already has answers here:
How to resolve git error: "Updates were rejected because the tip of your current branch is behind"
(12 answers)
Closed 2 years ago.
As I'm a new user to git. Can someone please help me out and explain the error shown in the picture
picture
The branch that you are working on is too far ahead of the remote branch. You need to pull the remote branch, resolve and conflicts and then you'll be able to push.
Git can be confusing!
It means that there are already changes on the remote branch that are not part of the history of your branch... under this circumstances, git is asking you to bring over those changes into your branch.... that is normally done with pull... or with merge... or with rebase. You can see the situation by running git fetch origin and then run something like gitk --all, then you will notice that your branch went in one direction, the remote branch went in a different direction.
Setup is
a "central" hg repo and devs pulling from it.
TeamCity CI server is triggered by pushes to the central repo.
4 configs are built nightly and tag the repo.
We want to visualize the information
"this changeset resulted in a Failed CI build in TeamCity"
directly inside the DAG of TortoiseHG.
This way, devs are able to determine which changeset is "a good starting point", without having to look it up on the TeamCity server.
We are looking into Mercurial Bookmarks: setting them in a last build step when the CI build succeeded.
Advantages:
they stand out in TortoiseHG
adding or removing them doesn't increase the history
Disadvantages:
pulling them over is not guaranteed
they can be modified at will
they are meant to move
Tags are less of an option: we are already tagging 4 times during nightly builds,
so those new tags would add to the clutter.
Also, we have no idea if tagging (a growing .hgtags file) will scale well with the extra tags.
I'm using Mercurial with TortoiseHG Workbench. I closed a branch by accident. I tried updating to it and making a commit to see if it would reopen (since there didn't appear to be an option to reopen the branch)
I was able to make a commit and push, but on TortoiseHG, it still says that the Head is Closed!
Option to reopen branch doesn't exist, because commit on top of closed head effectively open this head (and commited head must not be "closed": it's metadata from previous changeset): test this with hg branches and|or hg heads
Additional reading:
Is it possible to reopen a closed branch in Mercurial?
New changesets on a closed branch that must make it to default
I found out what happened.
On TortoiseHG, I clicked the Branch: button to close a branch. When I updated to my correct branch, I noticed that I forgot to check that the button does not say "close current branch".
A simple commit should solve this problem
I'm new to Mercurial, and I'm using the Stable/Default branching system. We're all on Windows here, and I'm trying to get everyone else to work in this system. We're all using TortoiseHg. I'm trying to document how to Merge changes into stable and tag releases, but I've only been using Mercurial for about three weeks, so I'm not even sure I'm doing this correctly. Also, TortoiseHg seems to be missing a few options available from the command line. But, I need to make this work from the Windows shell, or it won't get adopted here.
All of our programming work is done in default, and the stable branch is used only for releases of the software. One thing that leads me to believe I'm doing something wrong is that, after every merge, I have to re-make the stable branch. Is that normal? Seems counter-intuitive.
Below is the procedure I wrote up. Please feel free to point out my idiocy or ask any questions. And thank you in advance for any comments.
On my laptop, there are two directories for each project. The devel directory stores a clone of the default branch,
===============
Merging the branches and creating a stable release, TortoiseHg
-- Commit in the devel repository.
-- Open the devel local directory.
-- Start HgWorkbench.
-- Click the latest stable version of the stable branch.
-- Select Merge with local...
-- Synchronize and push changes to the remote repository.
-- Go to the local stable repository.
-- Synchronize and pull from the remote repository.
-- Update to the latest default branch. Picking "update to tip" should be best.
-- TortoiseHg -> commit. Commit to branch "stable." You'll need to re-create a new branch. When it asks, select "Restart branch."
-- Open HgWorkbench and add a tag for the latest stable version. Example "Version X.X"
-- Synchronize and push to the remote repository. Use the Options button in the Sync dialog box to bring up the "sync options" dialog. In the bottom field labeled "Branch", type "stable"
-- Return to the local "devel" repository.
-- Synchronize and pull from the remote repository. Use the Options button in the Sync dialog box to bring up the "sync options" dialog. In the bottom field labeled "Branch", make sure the field is blank. Otherwise, it will default to the "stable" branch.
There's no need for the second clone to achieve what you want and I think that it adds complexity where it isn't needed.
This is what I'd do:
Have a single clone of the repository
Commit in the default branch
Start HgWorkbench
Right click the latest changeset on the stable branch
Choose Update... in the pop up menu and press the Update button in the pop up window (use the default options)
Right click the latest changeset in the default branch
Choose Merge with local...
If the working directory status is shown to be clean (it should be) then click the Next button
If there are no merge conflicts (again, there shouldn't be if you do no development in stable) click the Next button again
Enter a commit message and click the Commit button and the press Finish on the next step
Right click the last changeset in the stable branch and choose Tag..., enter the tag name and press the Add button.
Right click the last changeset in the default branch and choose Update... using the default options again
You've now got a tagged stable branch and are back on the default branch to continue development. When you're ready to release a new stable version then repeat the steps above from step 3.
for some reason "hg ci --close-branch" is coming up as an command not found in my mercurial. how do I get around this to close the branch in a different way?
thanks!
Your mercurial is too old. Close branch was added in version 1.6 or 1.7. You should upgrade, which is quite easy on most any platform.
Failing that there's no way to close a branch, but you can make it inactive by merging it into another branch. Both closed and inactive non-final for a named branch -- they never really go away.