[Gllug] Mercurial or Subversion for single user?

Nix nix at esperi.org.uk
Fri Mar 26 20:40:27 UTC 2010


On 24 Mar 2010, Philip Hands said:

> which to fall in love with it, but having taken a machine-shotgun to my
> entire leg, I fairly soon discovered:
>
>    git fsck --unreachable
>
> This lists versions that exist in the repository but are not recorded in
> history -- iI fairly rapidly worked out that doing something like:

I've done this too.

>    gitk --all $(git fsck --unreachable  | cut -d\  -f3)

Oo, that's nice. I used git show instead, which is much less useful,
because you only get single unreachable commits, not the whole parental
history of each one.

> allows you to visualise where the orphans fit when compared with the
> rest of the archive's history -- I had my lost version back in minutes,
> and realised that you have to be considerably more stupid than I'd been
> to actually lose data with git (I could have managed that by running the
> garbage collector after being stupid).

I think you'll find that you'd *also* need to have waited two weeks first,
or explicitly reset the gc.pruneExpire config option, or explicitly
passed --prune=now or something like that to 'git gc'.

> It is rather important to understand something of the underlying model
> in git though -- it's not difficult to do that, and will ensure that
> you don't just feel confused all the time -- I'd recommend reading:

Lots of people I know avoided git because they weren't willing to put in
the small amount of effort to understand this (they wanted it to 'just
work', which is I suppose a reasonable position). You don't need to
understand it anymore to do simple things, but if you want to really
make it dance you have to understand about the commit DAG...

> So, don't dismiss git as being overkill, it's really very good for all

Oh, it *is* overkill... but you don't have to use all its features.

> sorts of odd tasks (I use it with etckeeper to track the contents
> of /etc on all my systems, for instance) and if you're liable to do any

I kept on meaning to do that and never dared. I might set up a VM and
experiment there... or just, I dunno, experiment on /tmp instead of /etc
to start with :)

> Once you're addicted to git, the pain of going back to svn collaboration
> can be completely eliminated with git-svn.

Now if only there were decent git<->hg and git<->bzr bidirectional
gateways... anything that could stop me from ever again having to go
near bloody bzr would be very welcome.

> If you're fed up with having to care what sort of repository you're
> sitting in, Joey Hess has a wrapper that will drive all of them called
> 'mr'

oo, nice (and essentially ungoogleable!)
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list