On 2013-06-20 14:14, David Holmes wrote:
Hi Erik,

On 20/06/2013 6:07 PM, Erik Joelsson wrote:
Simple patch removing unnecessary check for existence of mercurial for
getting the hgtips for the release file. This check prevented the backup
solution of using the .hgtip files from working when building from
source bundles.

http://cr.openjdk.java.net/~erikj/8012564/webrev.root.01/

The change seems okay, but I'm unclear from here:

define GetSourceTips
$(CD) $(SRC_ROOT) ; \
for i in $(REPO_LIST) IGNORE ; do \
  if [ "$${i}" = "IGNORE" ] ; then \
    continue; \
  elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
    $(PRINTF) " %s:%s" \
"$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
  elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
    $(PRINTF) " %s:%s" \
      "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
  fi; \
done >> $@
$(PRINTF) "\n" >> $@
endef


what happens if hg does not exist? Will HG_VERSION be empty in that case so we branch to the HGTIP_FILENAME section?

Yes, that will make HG_VERSION empty. This logic was copied pretty straight from the old build, just renaming some variables to fit with the new build. I think the idea is that either you got the source using mercurial, in which case it should be available, or you got it through a source bundle, in which case there should be hgtip files. If there are no hgtip files, then the shell logic for finding the repos won't find any, so nothing will happpen.

/Erik

Reply via email to