The content of this blog is my personal opinion only. Although I am an employee - currently of Nvidia, in the past of other companies such as Iagination Technologies, MIPS, Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Thursday, January 05, 2012

hg schemes extension


I like the idea of this extension, that allows you to create shortcuts for URLs you use often, e.g. cloning.



ups = ssh://my-uarch-performance-simulator/...

However, it is something of a no-sale when I saw that the URL was notexpanded in the clone:

> hg clone ups: u
> cd u
> hg paths
default = ups://

Or in WorkDir/.hg/hgrc

default = ups:

PRO: when the remote repository changges location, this *might* allow you to change the scheme URL shorthand in hgrc, and have things work in the possibly multiple clones you have outstanding.

CON: it loses some documentation. If I got run over by a beer truck, my replacement might have trouble finding where it was from.  Worse, if a repo was restored from backup (particularly if people keep branches as repos), and my home directory with the ~/.hgrc enabling SchemesExtension was  not present.

I'm not sure what I would like. Possibly always expand the shorthand.  Possibly record the shorthand with the long path as a comment:
default = ups: # ssh://my-uarch-performance-simulator/...
> hg paths
default = ups:// # ssh://my-uarch-performance-simulator/...

TBD: move this to my wiki Category:VCS.

No comments: