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.
# thgstatus.py - TortoiseHg status cache extension for Mercurial## Copyright (C) 2009 Adrian Buehlmann## This program is free software: you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation, either version 2 of the License, or# (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program. If not, see <http://www.gnu.org/licenses/>.frommercurial.i18nimport_frommercurialimportcommandsimportosimport time
def cachefilepath(repo):
- return repo.root + "/.hg/thgstatus"
+ return repo.join("thgstatus")def dirname(f):
return '/'.join(f.split('/')[:-1])
defshowentry(f,e):f("%s%s\n"%(e[0],e[1:-1]))defthgstatus(ui,repo,**opts):'''update directory status cache for TortoiseHg Caches the information provided by 'hg status' in the file .hg/thgstatus which can then be used by the TortoiseHg shell extension to display overlay icons for directories. The file .hg/thgstatus contains one line for each directory that has removed, modified or added files (in that order of preference). Each line consists of one char for the status of the directory (r, m or a), followed by the relative path of the directory in the repo. If the file is empty, then the repo is clean. Specify --delay to wait until the system clock ticks to the next second before accessing the dirstate. This is useful when the dirstate contains unset entries (in output of "hg debugstate"). unset entries happen if the dirstate was updated within the same second as the respective file in the working tree was updated. This happens with a high probability for example when cloning a repo. The TortoiseHg shell extension will display unset dirstate entries as (potentially false) modified. Specifying --delay ensures that there are no unset entries in the dirstate. '''ifopts.get('remove'):try:os.remove(cachefilepath(repo))exceptOSError:passreturnifopts.get('show'):try:f=open(cachefilepath(repo),'rb')foreinf:showentry(ui.status,e)f.close()exceptIOError:ui.status("*no status*\n")returnifopts.get('delay'):tref=time.time()tdelta=float(int(tref))+1.0-trefif(tdelta>0.0):time.sleep(tdelta)repostate=repo.status()modified,added,removed,deleted,unknown,ignored,clean=repostatedirstatus={}forfninadded:dirstatus[dirname(fn)]='a'forfninmodified:dirstatus[dirname(fn)]='m'forfninremoved:dirstatus[dirname(fn)]='r'f=open(cachefilepath(repo),'wb')fordninsorted(dirstatus):e=dirstatus[dn]+dn+'\n'f.write(e)showentry(ui.note,e)f.close()cmdtable={'thgstatus':(thgstatus,[('','delay',None,_('wait until the second ticks over')),('','remove',None,_('remove the status file')),('s','show',None,_('just show the contents of ''the status file (no update)'))],_('hg thgstatus')),}
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.