[MERGE] Add add_commit_revprops hook so plugins can set their own revprops.

John Arbash Meinel john at arbash-meinel.com
Tue Feb 24 17:21:57 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> This patch raise adjacent question in my head: may I use any arbitrary
> revision properties for my own needs? It won't screw up anything important
> in the bzr itself?
> 
> I'd like to use special [hidden] revision property as additional id of
> commit.
> So then I can use it in my scmproj plugin to find common commits in several
> components.

Generally that should be fine. Try to use reasonable names to avoid the
possibility of collisions (scmproj-commit-id, for example).

> 
> I wonder how cvs2svn detect common commits in the CVS history.
> I know that cvsnt has stored special unique id for each commit
> to easily find common commits. Perhaps cvs2svn uses approximation
> by exact match of commit message and commit time hit the
> same short range?


Magic :)

In general, the same approximate heuristics that all the other systems
do. Is the commit at ~the same time? Does it have the same commit
message? By the same author?

There are some non-trivial issues. Like because CVS is not atomic and
somewhat slow, two commits over many files can actually 'intersect'.
Meaning if I start committing foo and bar, and you commit baz and bing,
my foo can occur before your baz, but my bar comes *after* your bing. Or
graphically:

  foo
      baz
      bing
  bar

Things get really bad when you get into "common practises" for renames
and copies.

Anyway, there are some heuristics that you can use to approximate the
commit log after the fact.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmkLLUACgkQJdeBCYSNAAMofQCglSlENPAswrmaGVJkWjlsJSon
enQAn0inABjU3YJLoEb83dxWFEXZtvu/
=+JFT
-----END PGP SIGNATURE-----



More information about the bazaar mailing list