mercurial - Automatically Tag changesets when commit or pushed to kiln -


i know if there way automatically tag changeset committed locally or when pushed kiln repository.

i every changeset have tag version/build number. planning store version/build numbers in database , have script retrieve value database , add tag changeset. possible invoke script automatically post-commit event or post-push event when pushed kiln repository?

i open other approaches achieve automatic tagging on every commit/push.

rather creating tag each changeset, why not try 1 of following:

  • use changeset hash identifier?
  • use string generated log identifier (see below)?

a descriptive string can generated log using command:

hg log -r 1.7.2 --template '{latesttag}-{latesttagdistance}-{node}\n' 

the result takes form:

<latest tag>-<# changesets since latest tag>-<changeset hash> 

for example, on local clone of mercurial repo, generates:

1.7.2-2-5e51254ad4d4c80669f462e310b2677f2b3c54a7 

which tells me there have been 2 commits since tag 1.7.2 , current changeset hash 5e51254a.

in mercurial, each tag creates new changeset. if tag every commit, double number of changesets in repo. should use built-in tools (as described above) rather try recreate wheel.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -