Darcs.eclass doesn't export current code revision after doing the checkout. This will allow programs to grab it from environment.bz2 and know which revision the package was built against. A similar feature is already provided by git (EGIT_VERSION), hg (HG_REV_ID), subversion (ESVN_WC_REVISION) and even cvs (ECVS_VERSION and ESCM_VERSION. Reproducible: Always
An idea to track darcs version is to check current number of patches, this will cover most of the darcs use cases. It can be done with next command: # darcs show repo | grep "Num Patches" | sed 's/ *//' | cut -s -d' ' -f3 alternatively md5 or sha for all files can be calculated.
Created attachment 252723 [details, diff] darcs.eclass.patch exports DARCS_REPO_ID as current ID What do you think of such thing?
I'd suggest naming it EDARCS_PATCHCOUNT or something like that. And if you really want to do implicit shell magic like that, you could make it simpler: set -- $(${EDARCS_DARCS_CMD} show repo | grep "Num Patches") echo ${3}
Created attachment 252799 [details, diff] darcs.eclass.patch - added proposed changes Yeah, changes sound fine. Attached another version. BEWARE, completely untested!. I'll thest it this evening (in 3-4 hours).
Created attachment 252803 [details, diff] Fixed patch Confirmed working.
Pushed to the tree. Thank you, guys!