setup.py
branchstable
changeset 49970 8d390a13474d
parent 49830 bc59c1e5dd01
child 49971 ac93876ea2df
equal deleted inserted replaced
49969:84680c003d44 49970:8d390a13474d
   335         if hgid.endswith('+'):  # propagate the dirty status to the tag
   335         if hgid.endswith('+'):  # propagate the dirty status to the tag
   336             version += '+'
   336             version += '+'
   337     else:  # no tag found
   337     else:  # no tag found
   338         ltagcmd = ['parents', '--template', '{latesttag}']
   338         ltagcmd = ['parents', '--template', '{latesttag}']
   339         ltag = sysstr(hg.run(ltagcmd))
   339         ltag = sysstr(hg.run(ltagcmd))
       
   340         if not ltag:
       
   341             ltag = 'null'
   340         changessincecmd = ['log', '-T', 'x\n', '-r', "only(.,'%s')" % ltag]
   342         changessincecmd = ['log', '-T', 'x\n', '-r', "only(.,'%s')" % ltag]
   341         changessince = len(hg.run(changessincecmd).splitlines())
   343         changessince = len(hg.run(changessincecmd).splitlines())
       
   344         if ltag == 'null':
       
   345             ltag = '0.0'
   342         version = '%s+hg%s.%s' % (ltag, changessince, hgid)
   346         version = '%s+hg%s.%s' % (ltag, changessince, hgid)
   343     if version.endswith('+'):
   347     if version.endswith('+'):
   344         version = version[:-1] + 'local' + time.strftime('%Y%m%d')
   348         version = version[:-1] + 'local' + time.strftime('%Y%m%d')
   345 elif os.path.exists('.hg_archival.txt'):
   349 elif os.path.exists('.hg_archival.txt'):
   346     kw = dict(
   350     kw = dict(