[RFC]New style of revision id [Was Re: VCS comparison table]

Goffredo Baroncelli kreijack at alice.it
Tue Oct 24 21:10:37 BST 2006


Hi all,

enclose a little patch which shows an implementation of a revision-id which 
include an hash. The biggest problem of this patch is that the sha1 is computed 
on every file.

$ ~/bazaar/repo/bzr-sha1/bzr init .
$ echo 1 >>a
$ ~/bazaar/repo/bzr-sha1/bzr add a
added a
$ ~/bazaar/repo/bzr-sha1/bzr ci -m "a added"
added a
Committed revision 1.
$ bzr log --show-ids
------------------------------------------------------------
revno: 1
revision-id: ghigo at venice-20061024194142-ab95629418a97c1bdd76641e6bac0312ad782b36
committer: ghigo <ghigo at venice>
branch nick: 1
timestamp: Tue 2006-10-24 21:41:42 +0200
message:
  a added


The last part of the rev-id is the sha1sum of a manifest. The manifest used for the 
checksum can be found in the log

$ tail -27 ~/.bzr.log
preparing to commit
opening working tree '/tmp/1'
got branch format Bazaar-NG Metadir branch format 5
----
bazaar testament version 3 strict
revision-id:
committer: ghigo <ghigo at venice>
timestamp: 1161718902
timezone: 7200
parents:
message:
  a added
inventory:
  directory . TREE_ROOT  no
  file a a-20061024194131-cddh5uzyza28p87y-1 e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e  no
properties:
  branch-nick:
    1

---
chksum=ab95629418a97c1bdd76641e6bac0312ad782b36
Selecting files for commit with filter None
[ 6533] Tue 21:41:42.189 INFO: added a
added revision_id {ghigo at venice-20061024194142-ab95629418a97c1bdd76641e6bac0312ad782b36}
add {ghigo at venice-20061024194142-ab95629418a97c1bdd76641e6bac0312ad782b36} to revision-history
[ 6533] Tue 21:41:42.246 INFO: Committed revision 1.
return code 0


Goffredo

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack at inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sha1.diff
Type: text/x-diff
Size: 9669 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061024/341157e7/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sha1-test.diff
Type: text/x-diff
Size: 4514 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061024/341157e7/attachment-0001.bin 


More information about the bazaar mailing list