Tag: mercurial

Vault to Git to Mercurial not preserving dates

Using https://github.com/AndreyNikiforov/vault2git I was able to convert a Vault repo to Git and then used Mercurial’s hg convert to get a hg repo. The only issues is that after running hg convert the dates on the change set commit dates are incorrect. The dates show the time the change set was converted from got to […]

How to save disk usage when cloning git or hg repositories?

I have cloned few trees into my local disk and it takes too much space from my limited laptop disk. Unlike non-distributed version controls, such as SVN and CVS, when you checkout a git or Mercurial repository you get the whole tree, including the whole history, and since I rarely commit any code into these […]

DVCS detect code block movement

I’m looking for a version control system that is able to detect if a function is moved inside a file. For example, there is this file “Foo.java” and this contains function “a()”, “b()” and “c()”. public class Foo { void a() { } void c() { } void b() { } } Now if user […]

Specify SSH configuration for Git per-repository

In Mercurial, I can specify the command (and thus the certificate) used for SSH per-repository in .hg/hgrc, for example: [ui] … ssh = “C:\path\to\ssh.exe” -i “C:\Development\Identities\identity1.id_rsa” Most instructions I can find on configuring Git seem to use the bundled ssh.exe to manage the certificates, for example GitHub’s guide for Windows. There is a way of […]

vim colorscheme to highlight modifications since last commit?

In vim, what I want to do is to highlight all the modifications I have done since the last commit (I personally use mercurial), either using two colors, or a darker and a lighter version of the same colorscheme for the old and new contents, respectively. I don’t care about syntax highlighting coz the document […]

git with DiffMerge setup to mimic Mercurials setup with diffmerge

I’m wondering if there is a way to setup git and diffmerge so that when you execute the following command: git difftool diffmerge pops up and shows you a file listing of all the modified files instead of cycling through them via the command-line? I’m thinking it must be some setting the ~/.gitconfig file. Here […]

GIT / Mercurial Crossover with SVN for Development teams

The problem is that I’d like to be able to use Mercurial, or git, as a front end for development, but have changesets and updates made in Subversion, typically in an integration branch or something that is only written to by a script for Mercurial, or by Hudson when it notices changes. Then our Mercurial […]

Automatic versioning of sources for local backup

When using a versioning system, one is often tempted producing ‘clean’ commits, ie commits that actually make sense, and are compilable (and nice to read for other developers). As a natural effect of this, commits are usually done pretty late (‘when it works’). It mitigates one of the benefits of version control : being able […]

Best way in fixing a bug added in an old commit?

What is the best practice you encountered when wanted to fix a bug created in old commit? Let suppose you have the following commits A->B->C->D and you discover that on commit B a bug was added. [Edit: A, B, C and D were already published (pushed by others)] Would you go back on B add […]

How to keep/maintain public and private code in the same repository? (at repository hostings)

I’m working on my own project which has two parts: A. kernel/generic code (public part) B. code which works with proprietary protocol etc (private part, available for me and a few authorized persons) I want repository hosting (maybe github, assembla, …) which allows working in public and private branches in the same repository. I don’t […]

Git Baby is a git and github fan, let's start git clone.