Archive for the ‘Mercurial/Hg’ Category
Posted by jpluimers on 2017/03/07
Found out recently that next to rawgit.com there is also raw.githack.com which contrary to the name also supports bitbucket files:
–jeroen
Posted in BitBucket, Development, DVCS - Distributed Version Control, git, githack.com, GitHub, Mercurial/Hg, rawgit, Source Code Management | Leave a Comment »
Posted by jpluimers on 2016/12/01
My experience is that early upgrades are very unstable and they take an eternity to fix bugs, I need to find a way to push myself from the early stage to the late stage.
[WayBack] Adding staged updates to SourceTree | SourceTree Blog
–jeroen
Read the rest of this entry »
Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Source Code Management, SourceTree | Leave a Comment »
Posted by jpluimers on 2016/09/07
Yes, people still do this: Screenshot 2016-09-07 15.59.24.png
This one is worse than the usual “Yes/No” questions missing one or more of the “Yes” or “No” buttons in that it actually mentions you can click “No”.
Load SSH Key?
Do you have an SSH kkey that you’d like to load now? If not you can click “No” and create one later if you like”.

Posted in DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, SourceTree | Leave a Comment »
Posted by jpluimers on 2016/09/01
Sometimes your latest commit isn’t what you intended. Fixing can be done, but isn’t always obvious hence these links:
Remove a new file from a commit:
cp somefile.txt somefile.txt.bak
hg forget somefile.txt
hg commit --amend
If the file was new (i.e. you had used hg add).
If that file already existed try:
cp somefile.txt somefile.txt.bak
hg revert somefile.txt --rev .~1
hg commit --amend
cp somefile.txt.bak somefile.txt
–jeroen
Posted in Development, DVCS - Distributed Version Control, Mercurial/Hg, Software Development, Source Code Management | Leave a Comment »
Posted by jpluimers on 2016/06/12
I found a working solution here.It works by using hg strip from the mq extension:$ hg strip my_pruned_branchAs mentioned in the comments, this should only be used for unpublished changesets.
Source: mercurial – Remove experimental branch – Stack Overflow
You need mercurial strip for that which ships with Mercurial 2.8 and up but isn’t enabled by default.
Enabling is easy and can be done globally or on a per-repository base which I like better: just edit your .hg/hgrc file inside your repository and add these lines:
[extensions]
strip =
The source StripExtension – Mercurial forgets to mention you can enable this on a repository base.
I used it to delete an experimental branch that I hadn’t yet pushed to the outside world.
–jeroen
Posted in Development, DVCS - Distributed Version Control, Mercurial/Hg, Source Code Management | Leave a Comment »
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/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 »