The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream




    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,501 other followers

Archive for the ‘Source Code Management’ Category

Linking commits to issues and issues to issues on BitBucket (via: Resolve issues automatically when users push code – Bitbucket – Atlassian Documentation)

Posted by jpluimers on 2015/08/13

Besides commit statements from hg or git like this:

hg commit -m “fixes #6, resolve ticket #5 and see ticket #9 and ticket #5 in the tracker”

The best is to start with the command, then finish the comment (commands in the middle of a comment are far less reliable).

There is a whole bunch of commands for which BitBucket tries to understand conjugations of verbs:

Command “Verb” Conjugation(s)
resolve close close
resolve fix
resolve resolve resolve
reopen reopen reopen
hold hold hold
wontfix wontfix wontfix
invalid invaldate invalidate

You can also use the word “issue” in the middle to just link to an issue like this syntax:

links to issue #1

Finally, you can refer from issues to change sets using a cset syntax: <<cset 2f2f8d4cae7da0e37a5ffbc81c527cb67cc56015>> where the hex number is from a URL in your commit list (for instance in

Note that linking from changesets to issues often automatically creates a back-link, but that doesn’t always work, and fixing it has very low priority (like many things on BitBucket): Issues getting linked to commits have the wrong link syntax, they show BB-6232 — Bitbucket.



Posted in BitBucket, Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Source Code Management | Leave a Comment »

How to reopen a closed branch in Hg/Mercurial – via: Stack Overflow

Posted by jpluimers on 2015/08/12

Thanks to the answers and comments on stackoverflow, here are my steps to resurrect a closed hg branch:

  1. List all branches (including closed ones)
    • hg branches --closed
  2. Switch to a closed branch
    • hg update my_closed_branch_name
  3. Change anything
    • For instance by adding a tag, as that is considered a versioned and mergeable change)
      • hg tag reopened_my_closed_branch
    • Or making a change to a file, then ommit your changes
      • hg commit -m "I changed a message"

This works because of what Lazy Badger explained in another answer which summarised is:

A commit on top of a closed head effectively opens the head.

Note: if you while experimenting with this, you want to undo your last change before committing, perform this command to revert back one revision:

hg update -C -r .

The answers and comments (thanks Lóránt Pintér for asking the question):

Tim Delaney:

You can just hg update to the closed branch then do another hg commit and it will automatically reopen.The closed flag is just used to filter out closed branches from hg branches and hg heads unless you use the --closed option – it doesn’t prevent you from using the branches.

Francis Upton:

The commit won’t do anything unless there is something to actually commit, so you may need to make a gratuitous change to make it happen.


A tag is sufficient to make it commitable.


via: Is it possible to reopen a closed branch in Mercurial? – Stack Overflow.

Posted in Development, DVCS - Distributed Version Control, Mercurial/Hg, Source Code Management | Leave a Comment »

Many (not One!) weird tricks for powerful Git aliases – Atlassian Blogs

Posted by jpluimers on 2015/07/07

The One weird trick for powerful Git aliases – Atlassian Blogs post has many great git aliases, and other Git tricks and references the below great video.


Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Git: Remove sensitive data using git filter-branch and the BFG Repo-Cleaner.

Posted by jpluimers on 2015/07/02

Hoping I never need it, but just in case:

Git: Remove sensitive data using git filter-branch and the BFG Repo-Cleaner.

Anyone who knows if there are equivalents for Mercurial/Hg?



Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Source Code Management | Leave a Comment »

`git init –bare`: to create a new git repository from an existing one (via: Stack Overflow)

Posted by jpluimers on 2015/06/23

I needed to get an existing Git repository to a client that had a tightened network. No SSH allowed, web proxy filtering out all sorts of sites and also performing a HTTPS man-in-the-middle to detect and reject all kinds of binaries, etc.

But we needed a public repository locally.

Which worked, thanks to pestrella, who answered about `bare` repositories to get my last steps correct:

In order to create a new Git repository from an existing repository one would typically create a new bare repository and push one or more branches from the existing to the new repository.

The trick is to know that server-side repositories are `bare` and client side repositories are `regular`. `bare` means the absence of a working copy on the server side.

I performed these steps:
Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »


Get every new post delivered to your Inbox.

Join 1,501 other followers

%d bloggers like this: