Archive for the ‘DVCS – Distributed Version Control’ Category
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
closes
closed
closing |
| resolve |
fix |
fix
fixed
fixes
fixing
|
| resolve |
resolve |
resolve
resolves
resolved
resolving |
| reopen |
reopen |
reopen
reopens
reopening |
| hold |
hold |
hold
holds
holding |
| wontfix |
wontfix |
wontfix |
| invalid |
invaldate |
invalidate
invalidates
invalidated
invalidating |
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 https://bitbucket.org/jeroenp/fastmm/commits)
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.
–jeroen
via:
Posted in BitBucket, Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Source Code Management | Leave a Comment »
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:
- List all branches (including closed ones)
- Switch to a closed branch
hg update my_closed_branch_name
- 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.
lorddev:
A tag is sufficient to make it commitable.
–jeroen
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 »
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?
–jeroen
via:
Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Source Code Management | Leave a Comment »
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 »
Posted by jpluimers on 2015/06/16
Graeme Geldenhuys posted a great comment below.
Summary:
Git can do SVN, so locally you will see it as a Git repository, but the SVN repository will stay “as is” and not be affected neither will other SVN users be affected.
Two of the great benefits of this:
- You have fill local history so no need for long server-round trips to access it.
- You have the full query featureset of Git at your disposal. Locally.
Combined, you can do these without the need to be online or wait for the SVN connection and transfer:
For instance to view your branches:
git branches -vv
Or to show the branch-history:
git show-branch
It is how I access the FastMM repository from Git and described the git commands on how to get started and keep up to date.
Here is Graeme’s comment: Read the rest of this entry »
Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »
Posted by jpluimers on 2015/06/11
I wish I had known this years ago. Thanks This is why I code!
This is why I Code Shared publicly: #Git A flowchart to help you with your git decisions http://justinhileman.info/article/git-pretty.
This is the blog post; the chard is below.
Git pretty
This chart is from the presentation Changing History, or How to Git Pretty. Check it out to learn how to use this IRL.
Here’s a printable PDF version, if you’re into that sort of thing.
interactive git chart
If you like a more interactive way of decision making, this one is more elaborate: On undoing, fixing, or removing commits in git.
Note that on Windows, git does not like this:
git reset HEAD^
But does like this equivalent:
git reset HEAD~1
–jeroen
via A flowchart to help you with your git….

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »
Posted by jpluimers on 2015/06/10
After reading Converting Hg repositories to Git directed me into reading Bitbucket: Converting Hg repositories to Git I hoped moving my Mercurial repository on BitBucket to a Git repository would be something like following the steps.
It wasn’t.
First of all, hg-git on a Windows system requires Python or TortoiseHg. Neither of these I wanted to install for a one-off conversion.
So I took a throw-away Linux VM, and did the steps below. But let me first explain why.
Motivation
My motivation for moving away from BitBucket to GitHub, especially for projects containing markdown documentation.
When writing documentation in Markdown, being able to in-line reference pictures or have relative-references to other documents. This works perfectly in local Markdown tools (like MarkdownPad 2 or LightPaper).
Read the rest of this entry »
Posted in *nix, *nix-tools, BitBucket, Development, DVCS - Distributed Version Control, git, GitHub, Linux, Mercurial/Hg, openSuSE, Power User, Source Code Management, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2015/06/09
Now that github stopped showing my README.rst as reStructuredText here is the htmlpreview link of the pandoc rendered reStructuredText:
revue: getting Tumbleweed on it.
It is about installing and configuring Tumbleweed which is a tad bit more frustrating than I hoped for.
In practice unixoids aren’t as heavenly as many geeks pretend them to be.
I got the htmlpreview solution via css – How to see an html page on github as a normal rendered html page to see preview in browser, without downloading? – Stack Overflow.
I might try the github pages in the future.
Sourcecode of htmlpreview is at htmlpreview/htmlpreview.github.com.
–jeroen
via:
Posted in *nix, Development, DVCS - Distributed Version Control, git, GitHub, Linux, openSuSE, Power User, Software Development, Source Code Management, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2015/05/28
A while ago, I was fighting a corporate web proxy playing Man-in-the-Middle on all https sessions.
Though playing MitM on your employees is a debatable thing to do (especially without informing the employees, and illegal in certain countries, I had to get a GIT connection to the outside world working.
This helped tracking it down: GIT_CURL_VERBOSE “unable to get local issuer certificate”.
What I finally did was this:
- obtain the CA certificate that issues the MitM certificate in base-64 CRT form (which is the same as the PEM form):
- added it at the top of either of these files:
"%ProgramFiles%\Git\bin\curl-ca-bundle.crt"
"%ProgramFiles(x86)%\Git\bin\curl-ca-bundle.crt"
- added it to the top of either of these files:
"%ProgramFiles%\Mercurial\cacert.pem"
"%ProgramFiles(x86)%\Mercurial\cacert.pem"
–jeroen
PS: These were the failures I was getting:
Read the rest of this entry »
Posted in *nix, cURL, Development, DVCS - Distributed Version Control, git, PKI, Power User, Security, Source Code Management | Leave a Comment »