Mercurial and Git clients can push and pull from this alias URL to interact with this repository. You can change to which repository an alias points by going to the Aliases link on the project page.
# version.py - TortoiseHg version## Copyright 2009 Steve Borho <steve@borho.org>## This software may be used and distributed according to the terms of the# GNU General Public License version 2, incorporated herein by reference.importosfrommercurialimportui,hg,commands,errorfromtortoisehg.util.i18nimport_defliveversion():'Attempt to read the version from the live repository'utilpath=os.path.dirname(os.path.realpath(__file__))thgpath=os.path.dirname(os.path.dirname(utilpath))ifnotos.path.isdir(os.path.join(thgpath,'.hg')):raiseerror.RepoError(_('repository %s not found')%thgpath)u=ui.ui()repo=hg.repository(u,path=thgpath)u.pushbuffer()commands.identify(u,repo,id=True,tags=True)l=u.popbuffer().split()whilelen(l)>1andl[-1][0].isalpha():# remove non-numbered tagsl.pop()iflen(l)>1:# tag foundversion=l[-1]ifl[0].endswith('+'):# propagate the dirty status to the tagversion+='+'eliflen(l)==1:# no tag foundu.pushbuffer()commands.parents(u,repo,template='{latesttag}+{latesttagdistance}-')version=u.popbuffer()+l[0]returnrepo[None].branch(),versiondefversion():try:branch,version=liveversion()returnversionexcept:passtry:import__version__return__version__.versionexceptImportError:return_('unknown')def package_version():
try:
branch, version = liveversion()
- if '+' in version:
++ extra = None+ if '+' in version:
version, extra = version.split('+', 1)
- major, minor, periodic = version.split('.')++ v = [int(x) for x in version.split('.')]+ while len(v) < 3:+ v.append(0)+ major, minor, periodic = v++ if extra != None: tagdistance = int(extra.split('-', 1)[0])
- periodic = int(periodic) * 10000
+ periodic *= 10000
if branch == 'default':
periodic += tagdistance + 5000
else:
periodic += tagdistance + 1000
- version = '.'.join([major, minor, str(periodic)])- return version++ return '.'.join([str(x) for x in (major, minor, periodic)]) except:
pass
return _('unknown')
Attach a Trello Card
Add a tag
Your session has expired
You are no longer logged in. Please log in and try your request again.
Filter RSS Feed
This RSS feed URL allows you to see the contents of your current filter using any feed reader.
This link includes a special authentication token. If you share the URL with anyone else, they can see this RSS feed's activity. You can disable these tokens when needed.
Your current filter is unsaved; changing it won't affect this RSS feed.