1. Greg Ward
  2. vcprompt
  3. Issues
Issue #8 new

Support for showing revision hash in hg

Augie Fackler
created an issue

Right now %r shows the revnum in hg repos, but I more frequently want the node|short (in hg terms) or similar. Perhaps we could have a %h that would print out the short sha, and %Nh where N would specify the number of bytes of the hash to print out?

Comments (1)

  1. Greg Ward repo owner

    Hmmmm. Revnum and hash are awfully similar concepts, and hg is really the only vc that distinguishes them. So I'd be more inclined to make this a config setting... except that vcprompt doesn't have config files. I have nothing against adding configuration, it's just something I haven't gotten around to yet (and nobody has provided patches).

    Making length of the changeset ID (or commit ID for git) configurable... meh. vcprompt hardcodes 12 hex digits for the commit ID for git, and I would just do the same thing for hg. Complicating the formatting syntax for this feels not-worth-it.

  2. Log in to comment