[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Monotone ID shortener
From: |
Christof Petig |
Subject: |
[Monotone-devel] Monotone ID shortener |
Date: |
Fri, 30 Apr 2004 17:40:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux ppc; de-AT; rv:1.6) Gecko/20040414 Debian/1.6-5 |
Do you want to have easily rememberable version numbers in monotone?
Simply use sed to shorten the output (or the agraph, etc.).
Here is a small C++ program which accesses a monotone database and
outputs a sed script like:
s/00034855f9573489f08ddd9ba957d39f2b36b4ea/00034/g
s/0003bfa6a8fd2d33b803b336d24694b7354ec781/0003b/g
s/0004879dcf3992dd17db990425b3443bae8cd8e8/0004/g
s/00062ed82612a650e38ae57bd9a285a535a538f9/0006/g
s/0014396c1bcca5b8c78e431f5738310134bb5ba9/001/g
s/003095c568eebddd003be0f327ff7e5095068a84/0030/g
s/00328fc655e76cbcda4813acbe6e79fba5f74b10/0032/g
s/0056d2a7d3e56763250ad36c57ae5ba72f6853bb/0056/g
s/005c01967e6894380f3d1dd4cbea78ebddeb3afd/005c/g
s/006ccb597c0597649ae3e8658f77cb4c2c5cb1eb/006/g
... (5400 lines for the current development tree)
use like:
monoshort "monotone --db monotone.db" > short.sed
monotone log | sed --file short.sed | less
Enjoy
Christof
PS: No, _I_ did _not_ design the semantics of underflow/uflow, I only
struggled to implement them.
monoshort.cc.gz
Description: GNU Zip compressed data
- [Monotone-devel] Monotone ID shortener,
Christof Petig <=