Mercurial > hg > mercurial
changeset 295:8875a57ca5e2
Update hg distribution to 1.5.2
line wrap: on
line diff
--- a/mercurial-tests/testData/bin/Contributors.txt Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -[This file is here for historical purposes, all recent contributors -should appear in the changelog directly] - -Andrea Arcangeli <andrea at suse.de> -Thomas Arendsen Hein <thomas at intevation.de> -Goffredo Baroncelli <kreijack at libero.it> -Muli Ben-Yehuda <mulix at mulix.org> -Mikael Berthe <mikael at lilotux.net> -Benoit Boissinot <bboissin at gmail.com> -Brendan Cully <brendan at kublai.com> -Vincent Danjean <vdanjean.ml at free.fr> -Jake Edge <jake at edge2.net> -Michael Fetterman <michael.fetterman at intel.com> -Edouard Gomez <ed.gomez at free.fr> -Eric Hopper <hopper at omnifarious.org> -Alecs King <alecsk at gmail.com> -Volker Kleinfeld <Volker.Kleinfeld at gmx.de> -Vadim Lebedev <vadim at mbdsys.com> -Christopher Li <hg at chrisli.org> -Chris Mason <mason at suse.com> -Colin McMillen <mcmillen at cs.cmu.edu> -Wojciech Milkowski <wmilkowski at interia.pl> -Chad Netzer <chad.netzer at gmail.com> -Bryan O'Sullivan <bos at serpentine.com> -Vicent Seguà Pascual <vseguip at gmail.com> -Sean Perry <shaleh at speakeasy.net> -Nguyen Anh Quynh <aquynh at gmail.com> -Ollivier Robert <roberto at keltia.freenix.fr> -Alexander Schremmer <alex at alexanderweb.de> -Arun Sharma <arun at sharma-home.net> -Josef "Jeff" Sipek <jeffpc at optonline.net> -Kevin Smith <yarcs at qualitycode.com> -TK Soh <teekaysoh at yahoo.com> -Radoslaw Szkodzinski <astralstorm at gorzow.mm.pl> -Samuel Tardieu <sam at rfc1149.net> -K Thananchayan <thananck at yahoo.com> -Andrew Thompson <andrewkt at aktzero.com> -Michael S. Tsirkin <mst at mellanox.co.il> -Rafael Villar Burke <pachi at mmn-arquitectos.com> -Tristan Wibberley <tristan at wibberley.org> -Mark Williamson <mark.williamson at cl.cam.ac.uk>
--- a/mercurial-tests/testData/bin/Copying.txt Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License.
--- a/mercurial-tests/testData/bin/Mercurial.ini Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -; System-wide Mercurial config file. -; -; !!! Do Not Edit This File !!! -; -; This file will be replaced by the installer on every upgrade. -; Editing this file can cause strange side effects on Vista. -; -; http://bitbucket.org/tortoisehg/stable/issue/135 -; -; To change settings you see in this file, override (or enable) them in -; your user Mercurial.ini file, where USERNAME is your Windows user name: -; -; XP or older - C:\Documents and Settings\USERNAME\Mercurial.ini -; Vista or later - C:\Users\USERNAME\Mercurial.ini - - -[ui] -; editor used to enter commit logs, etc. Most text editors will work. -editor = notepad -; show changed files and be a bit more verbose if True -; verbose = True - -; username data to appear in commits -; it usually takes the form: Joe User <joe.user@host.com> -; username = Joe User <j.user@example.com> - -; In order to push/pull over ssh you must specify an ssh tool -;ssh = "C:\Progra~1\TortoiseSVN\bin\TortoisePlink.exe" -ssh -2 -;ssh = C:\cygwin\bin\ssh - -; -; For more information about mercurial extensions, start here -; http://www.selenic.com/mercurial/wiki/index.cgi/UsingExtensions -; -; Extensions shipped with Mercurial -; -[extensions] -;acl = -;alias = -;bookmarks = -;bugzilla = -;children = -;churn = -;color = -;convert = -;extdiff = -;fetch = -;gpg = -;graphlog = -;hgcia = -;hgk = -;highlight = -;interhg = -;keyword = -;mq = -;notify = -;pager = -;parentrevspec = -;patchbomb = -;purge = -;rebase = -;record = -;transplant = -;win32mbcs = -;win32text = -;zeroconf = - -; To use cleverencode/cleverdecode, you must enable win32text extension - -[encode] -; Encode files that don't contain NUL characters. - -; ** = cleverencode: - -; Alternatively, you can explicitly specify each file extension that -; you want encoded (any you omit will be left untouched), like this: - -; *.txt = dumbencode: - - -[decode] -; Decode files that don't contain NUL characters. - -; ** = cleverdecode: - -; Alternatively, you can explicitly specify each file extension that -; you want decoded (any you omit will be left untouched), like this: - -; **.txt = dumbdecode: - -[patch] -; If you enable win32text filtering, you will want to enable this -; line as well to allow patching to work correctly. - -; eol = crlf - - -; -; Define external diff commands -; -[extdiff] -;cmd.bc3diff = C:\Program Files\Beyond Compare 3\BCompare.exe -;cmd.vdiff = C:\Progra~1\TortoiseSVN\bin\TortoiseMerge.exe -;cmd.vimdiff = gvim.exe -;opts.vimdiff = -f '+next' '+execute "DirDiff ".argv(0)." ".argv(1)' - - -[hgk] -; Replace the following with your path to hgk, uncomment it and -; install ActiveTcl (or another win32 port like tclkit) -; path="C:\Program Files\Mercurial\Contrib\hgk.tcl" -; vdiff=vdiff - - -; -; The git extended diff format can represent binary files, file -; permission changes, and rename information that the normal patch format -; cannot describe. However it is also not compatible with tools which -; expect normal patches. so enable git patches at your own risk. -; -[diff] -;git = false -;nodates = false - -# Some default global settings for common merge tools - -[merge-tools] -kdiff3.args=--auto --L1 base --L2 local --L3 other $base $local $other -o $output -kdiff3.regkey=Software\KDiff3 -kdiff3.regappend=\kdiff3.exe -kdiff3.fixeol=True -kdiff3.gui=True - -gvimdiff.args=--nofork -d -g -O $local $other $base -gvimdiff.regkey=Software\Vim\GVim -gvimdiff.regname=path -gvimdiff.priority=-9 - -merge.checkconflicts=True -merge.priority=-10 - -gpyfm.gui=True - -meld.gui=True - -tkdiff.args=$local $other -a $base -o $output -tkdiff.gui=True -tkdiff.priority=-8 - -xxdiff.args=--show-merged-pane --exit-with-merge-status --title1 local --title2 base --title3 other --merged-filename $output --merge $local $base $other -xxdiff.gui=True -xxdiff.priority=-8 - -diffmerge.args=--nosplash --merge --title1=base --title2=local --title3=other $base $local $other -diffmerge.checkchanged=True -diffmerge.gui=True - -p4merge.args=$base $local $other $output -p4merge.regkey=Software\Perforce\Environment -p4merge.regname=P4INSTROOT -p4merge.regappend=\p4merge.exe -p4merge.gui=True -p4merge.priority=-8 - -tortoisemerge.args=/base:$base /mine:$local /theirs:$other /merged:$output -tortoisemerge.regkey=Software\TortoiseSVN -tortoisemerge.checkchanged=True -tortoisemerge.gui=True - -ecmerge.args=$base $local $other --mode=merge3 --title0=base --title1=local --title2=other --to=$output -ecmerge.regkey=Software\Elli\xc3\xa9 Computing\Merge -ecmerge.gui=True - -filemerge.executable=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge -filemerge.args=-left $other -right $local -ancestor $base -merge $output -filemerge.gui=True - -beyondcompare3.args=$local $other $base $output /ro /lefttitle=local /centertitle=base /righttitle=other /automerge /reviewconflicts /solo -beyondcompare3.regkey=Software\Scooter Software\Beyond Compare 3 -beyondcompare3.regname=ExePath -beyondcompare3.gui=True - -winmerge.args=/e /u /dl local /dr other /wr $local $other $output -winmerge.regkey=Software\Thingamahoochie\WinMerge -winmerge.regname=Executable -winmerge.checkchanged=True -winmerge.gui=True
--- a/mercurial-tests/testData/bin/Mercurial.url Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -[InternetShortcut] -URL=http://mercurial.selenic.com/
--- a/mercurial-tests/testData/bin/ReadMe.html Fri Aug 19 15:21:38 2011 +0400 +++ b/mercurial-tests/testData/bin/ReadMe.html Wed Sep 07 19:58:38 2011 +0400 @@ -140,7 +140,7 @@ </p> <p> - Mercurial is Copyright 2005-2009 Matt Mackall and others. See + Mercurial is Copyright 2005-2010 Matt Mackall and others. See the <tt>Contributors.txt</tt> file for a list of contributors. </p> @@ -148,8 +148,7 @@ Mercurial is free software; you can redistribute it and/or modify it under the terms of the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt">GNU - General Public License version 2</a> as published by the Free - Software Foundation. + General Public License version 2</a> or any later version. </p> <p>
--- a/mercurial-tests/testData/bin/ReleaseNotes.txt Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -Welcome to Mercurial for Windows! ---------------------------------- - -For configuration and usage directions, please read the ReadMe.html -file that comes with this package. - -Also check the release notes at: - - http://mercurial.selenic.com/wiki/WhatsNew
--- a/mercurial-tests/testData/bin/Templates/atom/changelog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -{header} - <!-- Changelog --> - <id>{urlbase}{url}</id> - <link rel="self" href="{urlbase}{url}atom-log"/> - <link rel="alternate" href="{urlbase}{url}"/> - <title>{repo|escape} Changelog</title> - {latestentry%feedupdated} - -{entries%changelogentry} -</feed>
--- a/mercurial-tests/testData/bin/Templates/atom/changelogentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - <entry> - <title>{desc|strip|firstline|strip|escape|nonempty}</title> - <id>{urlbase}{url}#changeset-{node}</id> - <link href="{urlbase}{url}rev/{node|short}"/> - <author> - <name>{author|person|escape}</name> - <email>{author|email|obfuscate}</email> - </author> - <updated>{date|rfc3339date}</updated> - <published>{date|rfc3339date}</published> - <content type="xhtml"> - <div xmlns="http://www.w3.org/1999/xhtml"> - <pre xml:space="preserve">{desc|escape|nonempty}</pre> - </div> - </content> - </entry>
--- a/mercurial-tests/testData/bin/Templates/atom/error.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -{header} - <!-- Error --> - <id>{urlbase}{url}</id> - <link rel="self" href="{urlbase}{url}atom-log"/> - <link rel="alternate" href="{urlbase}{url}"/> - <title>Error</title> - <updated>1970-01-01T00:00:00+00:00</updated> - <entry> - <title>Error</title> - <id>http://mercurial.selenic.com/#error</id> - <author> - <name>mercurial</name> - </author> - <updated>1970-01-01T00:00:00+00:00</updated> - <content type="text">{error|escape}</content> - </entry> -</feed>
--- a/mercurial-tests/testData/bin/Templates/atom/filelog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -{header} - <id>{urlbase}{url}atom-log/tip/{file|escape}</id> - <link rel="self" href="{urlbase}{url}atom-log/tip/{file|urlescape}"/> - <title>{repo|escape}: {file|escape} history</title> - {latestentry%feedupdated} - -{entries%changelogentry} -</feed>
--- a/mercurial-tests/testData/bin/Templates/atom/header.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="{encoding}"?> -<feed xmlns="http://www.w3.org/2005/Atom"> \ No newline at end of file
--- a/mercurial-tests/testData/bin/Templates/atom/map Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -default = 'changelog' -feedupdated = '<updated>{date|rfc3339date}</updated>' -mimetype = 'application/atom+xml; charset={encoding}' -header = header.tmpl -changelog = changelog.tmpl -changelogentry = changelogentry.tmpl -filelog = filelog.tmpl -filelogentry = filelogentry.tmpl -tags = tags.tmpl -tagentry = tagentry.tmpl -error = error.tmpl
--- a/mercurial-tests/testData/bin/Templates/atom/tagentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - <entry> - <title>{tag|escape}</title> - <link rel="alternate" href="{urlbase}{url}rev/{node|short}"/> - <id>{urlbase}{url}#tag-{node}</id> - <updated>{date|rfc3339date}</updated> - <published>{date|rfc3339date}</published> - <content type="text">{tag|strip|escape}</content> - </entry>
--- a/mercurial-tests/testData/bin/Templates/atom/tags.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -{header} - <id>{urlbase}{url}</id> - <link rel="self" href="{urlbase}{url}atom-tags"/> - <link rel="alternate" href="{urlbase}{url}tags"/> - <title>{repo|escape}: tags</title> - <summary>{repo|escape} tag history</summary> - <author><name>Mercurial SCM</name></author> - {latestentry%feedupdated} - -{entriesnotip%tagentry} -</feed>
--- a/mercurial-tests/testData/bin/Templates/changelog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -#header# -<title>#repo|escape#: changelog</title> -<link rel="alternate" type="application/atom+xml" - href="#url#atom-log" title="Atom feed for #repo|escape#"> -<link rel="alternate" type="application/rss+xml" - href="#url#rss-log" title="RSS feed for #repo|escape#"> -</head> -<body> - -<div class="buttons"> -<a href="#url#shortlog/#rev#{sessionvars%urlparameter}">shortlog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#file/#node|short#{sessionvars%urlparameter}">files</a> -#archives%archiveentry# -<a type="application/rss+xml" href="#url#rss-log">rss</a> -<a type="application/atom+xml" href="#url#atom-log" title="Atom feed for #repo|escape#">atom</a> -</div> - -<h2>changelog for #repo|escape#</h2> - -<form action="#url#log"> -{sessionvars%hiddenformentry} -<p> -<label for="search1">search:</label> -<input name="rev" id="search1" type="text" size="30"> -navigate: <small class="navigate">#changenav%naventry#</small> -</p> -</form> - -#entries%changelogentry# - -<form action="#url#log"> -{sessionvars%hiddenformentry} -<p> -<label for="search2">search:</label> -<input name="rev" id="search2" type="text" size="30"> -navigate: <small class="navigate">#changenav%naventry#</small> -</p> -</form> - -#footer#
--- a/mercurial-tests/testData/bin/Templates/changelogentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -<table class="logEntry parity#parity#"> - <tr> - <th class="age">#date|age# ago:</th> - <th class="firstline">#desc|strip|firstline|escape#</th> - </tr> - <tr> - <th class="revision">changeset #rev#:</th> - <td class="node"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td> - </tr> - #parent%changelogparent# - #child%changelogchild# - #changelogtag# - <tr> - <th class="author">author:</th> - <td class="author">#author|obfuscate#</td> - </tr> - <tr> - <th class="date">date:</th> - <td class="date">#date|date#</td> - </tr> - <tr> - <th class="files"><a href="#url#file/#node|short#{sessionvars%urlparameter}">files</a>:</th> - <td class="files">#files#</td> - </tr> -</table>
--- a/mercurial-tests/testData/bin/Templates/changeset.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -#header# -<title>#repo|escape#: changeset #node|short#</title> -</head> -<body> - -<div class="buttons"> -<a href="#url#log/#rev#{sessionvars%urlparameter}">changelog</a> -<a href="#url#shortlog/#rev#{sessionvars%urlparameter}">shortlog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#file/#node|short#{sessionvars%urlparameter}">files</a> -<a href="#url#raw-rev/#node|short#">raw</a> -#archives%archiveentry# -</div> - -<h2>changeset: #desc|strip|escape|firstline#</h2> - -<table id="changesetEntry"> -<tr> - <th class="changeset">changeset #rev#:</th> - <td class="changeset"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td> -</tr> -#parent%changesetparent# -#child%changesetchild# -#changesettag# -<tr> - <th class="author">author:</th> - <td class="author">#author|obfuscate#</td> -</tr> -<tr> - <th class="date">date:</th> - <td class="date">#date|date# (#date|age# ago)</td></tr> -<tr> - <th class="files">files:</th> - <td class="files">#files#</td></tr> -<tr> - <th class="description">description:</th> - <td class="description">#desc|strip|escape|addbreaks#</td> -</tr> -</table> - -<div id="changesetDiff"> -#diff# -</div> - -#footer# - -
--- a/mercurial-tests/testData/bin/Templates/error.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -#header# -<title>Mercurial Error</title> -</head> -<body> - -<h2>Mercurial Error</h2> - -<p> -An error occurred while processing your request: -</p> -<p> -#error|escape# -</p> - -#footer#
--- a/mercurial-tests/testData/bin/Templates/fileannotate.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -#header# -<title>#repo|escape#: #file|escape# annotate</title> -</head> -<body> - -<div class="buttons"> -<a href="#url#log/#rev#{sessionvars%urlparameter}">changelog</a> -<a href="#url#shortlog/#rev#{sessionvars%urlparameter}">shortlog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#rev/#node|short#{sessionvars%urlparameter}">changeset</a> -<a href="#url#file/#node|short##path|urlescape#{sessionvars%urlparameter}">files</a> -<a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> -<a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a> -<a href="#url#raw-annotate/#node|short#/#file|urlescape#">raw</a> -</div> - -<h2>Annotate #file|escape#</h2> - -<table> -<tr> - <td class="metatag">changeset #rev#:</td> - <td><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr> -#parent%fileannotateparent# -#child%fileannotatechild# -<tr> - <td class="metatag">author:</td> - <td>#author|obfuscate#</td></tr> -<tr> - <td class="metatag">date:</td> - <td>#date|date# (#date|age# ago)</td></tr> -<tr> - <td class="metatag">permissions:</td> - <td>#permissions|permissions#</td></tr> -<tr> - <td class="metatag">description:</td> - <td>{desc|strip|escape|addbreaks}</td> -</tr> -</table> - -<br/> - -<table cellspacing="0" cellpadding="0"> -#annotate%annotateline# -</table> - -#footer#
--- a/mercurial-tests/testData/bin/Templates/filediff.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -#header# -<title>#repo|escape#: #file|escape# diff</title> -</head> -<body> - -<div class="buttons"> -<a href="#url#log/#rev#{sessionvars%urlparameter}">changelog</a> -<a href="#url#shortlog/#rev#{sessionvars%urlparameter}">shortlog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#rev/#node|short#{sessionvars%urlparameter}">changeset</a> -<a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> -<a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a> -<a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> -<a href="#url#raw-diff/#node|short#/#file|urlescape#">raw</a> -</div> - -<h2>#file|escape#</h2> - -<table id="filediffEntry"> -<tr> - <th class="revision">revision #rev#:</th> - <td class="revision"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td> -</tr> -#parent%filediffparent# -#child%filediffchild# -</table> - -<div id="fileDiff"> -#diff# -</div> - -#footer# - -
--- a/mercurial-tests/testData/bin/Templates/filelog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -#header# -<title>#repo|escape#: #file|escape# history</title> -<link rel="alternate" type="application/atom+xml" - href="#url#atom-log/tip/#file|urlescape#" title="Atom feed for #repo|escape#:#file#"> -<link rel="alternate" type="application/rss+xml" - href="#url#rss-log/tip/#file|urlescape#" title="RSS feed for #repo|escape#:#file#"> -</head> -</head> -<body> - -<div class="buttons"> -<a href="#url#log{sessionvars%urlparameter}">changelog</a> -<a href="#url#shortlog{sessionvars%urlparameter}">shortlog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> -<a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> -<a type="application/rss+xml" href="#url#rss-log/tip/#file|urlescape#">rss</a> -<a type="application/atom+xml" href="#url#atom-log/tip/#file|urlescape#" title="Atom feed for #repo|escape#:#file#">atom</a> -</div> - -<h2>#file|escape# revision history</h2> - -<p>navigate: <small class="navigate">{nav%filenaventry}</small></p> - -#entries%filelogentry# - -#footer#
--- a/mercurial-tests/testData/bin/Templates/filelogentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -<table class="logEntry parity#parity#"> - <tr> - <th class="age">#date|age# ago:</th> - <th class="firstline"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#desc|strip|firstline|escape#</a></th> - </tr> - <tr> - <th class="revision">revision #filerev#:</td> - <td class="node"> - <a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a> - <a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">(diff)</a> - <a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">(annotate)</a> - </td> - </tr> - #rename%filelogrename# - <tr> - <th class="author">author:</th> - <td class="author">#author|obfuscate#</td> - </tr> - <tr> - <th class="date">date:</th> - <td class="date">#date|date#</td> - </tr> -</table> - -
--- a/mercurial-tests/testData/bin/Templates/filerevision.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -#header# -<title>#repo|escape#:#file|escape#</title> -</head> -<body> - -<div class="buttons"> -<a href="#url#log/#rev#{sessionvars%urlparameter}">changelog</a> -<a href="#url#shortlog/#rev#{sessionvars%urlparameter}">shortlog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#rev/#node|short#{sessionvars%urlparameter}">changeset</a> -<a href="#url#file/#node|short##path|urlescape#{sessionvars%urlparameter}">files</a> -<a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a> -<a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> -<a href="#url#raw-file/#node|short#/#file|urlescape#">raw</a> -</div> - -<h2>#file|escape#</h2> - -<table> -<tr> - <td class="metatag">changeset #rev#:</td> - <td><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr> -#parent%filerevparent# -#child%filerevchild# -<tr> - <td class="metatag">author:</td> - <td>#author|obfuscate#</td></tr> -<tr> - <td class="metatag">date:</td> - <td>#date|date# (#date|age# ago)</td></tr> -<tr> - <td class="metatag">permissions:</td> - <td>#permissions|permissions#</td></tr> -<tr> - <td class="metatag">description:</td> - <td>{desc|strip|escape|addbreaks}</td> -</tr> -</table> - -<pre> -#text%fileline# -</pre> - -#footer#
--- a/mercurial-tests/testData/bin/Templates/footer.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -#motd# -<div class="logo"> -<a href="http://www.selenic.com/mercurial/"> -<img src="#staticurl#hglogo.png" width=75 height=90 border=0 alt="mercurial"></a> -</div> - -</body> -</html>
--- a/mercurial-tests/testData/bin/Templates/gitweb/branches.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -{header} -<title>{repo|escape}: Branches</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-tags" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-tags" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / branches -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -branches | -<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> -<br/> -</div> - -<div class="title"> </div> -<table cellspacing="0"> -{entries%branchentry} -</table> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/changelog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -{header} -<title>{repo|escape}: Changelog</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog -</div> - -<form action="{url}log"> -{sessionvars%hiddenformentry} -<div class="search"> -<input type="text" name="rev" /> -</div> -</form> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a> | -changelog | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry} -<br/> -{changenav%naventry}<br/> -</div> - -{entries%changelogentry} - -<div class="page_nav"> -{changenav%naventry}<br/> -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/changelogentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<div> -<a class="title" href="{url}rev/{node|short}{sessionvars%urlparameter}"><span class="age">{date|age}</span>{desc|strip|firstline|escape|nonempty}<span class="logtags"> {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a> -</div> -<div class="title_text"> -<div class="log_link"> -<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a><br/> -</div> -<i>{author|obfuscate} [{date|rfc822date}] rev {rev}</i><br/> -</div> -<div class="log_body"> -{desc|strip|escape|addbreaks|nonempty} -<br/> -<br/> -</div>
--- a/mercurial-tests/testData/bin/Templates/gitweb/changeset.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -{header} -<title>{repo|escape}: changeset {rev}:{node|short}</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changeset -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> | -changeset | -<a href="{url}raw-rev/{node|short}">raw</a> {archives%archiveentry}<br/> -</div> - -<div> -<a class="title" href="{url}raw-rev/{node|short}">{desc|strip|escape|firstline|nonempty} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a> -</div> -<div class="title_text"> -<table cellspacing="0"> -<tr><td>author</td><td>{author|obfuscate}</td></tr> -<tr><td></td><td>{date|date} ({date|age})</td></tr> -{branch%changesetbranch} -<tr><td>changeset {rev}</td><td style="font-family:monospace">{node|short}</td></tr> -{parent%changesetparent} -{child%changesetchild} -</table></div> - -<div class="page_body"> -{desc|strip|escape|addbreaks|nonempty} -</div> -<div class="list_head"></div> -<div class="title_text"> -<table cellspacing="0"> -{files} -</table></div> - -<div class="page_body">{diff}</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/error.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -{header} -<title>{repo|escape}: Error</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / error -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | <a href="{url}log{sessionvars%urlparameter}">changelog</a> | <a href="{url}tags{sessionvars%urlparameter}">tags</a> | <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a><br/> -</div> - -<div class="page_body"> -<br/> -<i>An error occurred while processing your request</i><br/> -<br/> -{error|escape} -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/fileannotate.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -{header} -<title>{repo|escape}: {file|escape}@{node|short} (annotated)</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> | -<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | -<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | -<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | -annotate | -<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | -<a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a><br/> -</div> - -<div class="title">{file|escape}</div> - -<div class="title_text"> -<table cellspacing="0"> -<tr> - <td>author</td> - <td>{author|obfuscate}</td></tr> -<tr> - <td></td> - <td>{date|date} ({date|age})</td></tr> -{branch%filerevbranch} -<tr> - <td>changeset {rev}</td> - <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr> -{parent%fileannotateparent} -{child%fileannotatechild} -<tr> - <td>permissions</td> - <td style="font-family:monospace">{permissions|permissions}</td></tr> -</table> -</div> - -<div class="page_path"> -{desc|strip|escape|addbreaks|nonempty} -</div> -<div class="page_body"> -<table> -{annotate%annotateline} -</table> -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/filediff.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -{header} -<title>{repo|escape}: diff {file|escape}</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> | -<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | -<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | -<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | -<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> | -diff | -<a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a><br/> -</div> - -<div class="title">{file|escape}</div> - -<table> -{branch%filerevbranch} -<tr> - <td>changeset {rev}</td> - <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr> -{parent%filediffparent} -{child%filediffchild} -</table> - -<div class="list_head"></div> - -<div class="page_body"> -{diff} -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/filelog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -{header} -<title>{repo|escape}: File revisions</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | -revisions | -<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> | -<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | -<a href="{url}rss-log/{node|short}/{file|urlescape}">rss</a> -<br/> -{nav%filenaventry} -</div> - -<div class="title" >{file|urlescape}</div> - -<table> -{entries%filelogentry} -</table> - -<div class="page_nav"> -{nav%filenaventry} -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/filerevision.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -{header} -<title>{repo|escape}: {file|escape}@{node|short}</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> | -<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | -file | -<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | -<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> | -<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | -<a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a><br/> -</div> - -<div class="title">{file|escape}</div> - -<div class="title_text"> -<table cellspacing="0"> -<tr> - <td>author</td> - <td>{author|obfuscate}</td></tr> -<tr> - <td></td> - <td>{date|date} ({date|age})</td></tr> -{branch%filerevbranch} -<tr> - <td>changeset {rev}</td> - <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr> -{parent%filerevparent} -{child%filerevchild} -<tr> - <td>permissions</td> - <td style="font-family:monospace">{permissions|permissions}</td></tr> -</table> -</div> - -<div class="page_path"> -{desc|strip|escape|addbreaks|nonempty} -</div> - -<div class="page_body"> -{text%fileline} -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/footer.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -<div class="page_footer"> -<div class="page_footer_text">{repo|escape}</div> -<div class="rss_logo"> -<a href="{url}rss-log">RSS</a> -<a href="{url}atom-log">Atom</a> -</div> -<br /> -{motd} -</div> -</body> -</html>
--- a/mercurial-tests/testData/bin/Templates/gitweb/graph.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -{header} -<title>{repo|escape}: Graph</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]--> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph -</div> - -<form action="{url}log"> -{sessionvars%hiddenformentry} -<div class="search"> -<input type="text" name="rev" /> -</div> -</form> -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> | -graph | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> -<br/> -<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a> -<a href="{url}graph/{rev}{morevars%urlparameter}">more</a> -| {changenav%navgraphentry}<br/> -</div> - -<div class="title"> </div> - -<noscript>The revision graph only works with JavaScript-enabled browsers.</noscript> - -<div id="wrapper"> -<ul id="nodebgs"></ul> -<canvas id="graph" width="224" height="{canvasheight}"></canvas> -<ul id="graphnodes"></ul> -</div> - -<script type="text/javascript" src="{staticurl}graph.js"></script> -<script> -<!-- hide script content - -var data = {jsdata|json}; -var graph = new Graph(); -graph.scale({bg_height}); - -graph.edge = function(x0, y0, x1, y1, color) { - - this.setColor(color, 0.0, 0.65); - this.ctx.beginPath(); - this.ctx.moveTo(x0, y0); - this.ctx.lineTo(x1, y1); - this.ctx.stroke(); - -} - -var revlink = '<li style="_STYLE"><span class="desc">'; -revlink += '<a class="list" href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID"><b>_DESC</b></a>'; -revlink += '</span> _TAGS'; -revlink += '<span class="info">_DATE ago, by _USER</span></li>'; - -graph.vertex = function(x, y, color, parity, cur) { - - this.ctx.beginPath(); - color = this.setColor(color, 0.25, 0.75); - this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); - this.ctx.fill(); - - var bg = '<li class="bg parity' + parity + '"></li>'; - var left = (this.columns + 1) * this.bg_height; - var nstyle = 'padding-left: ' + left + 'px;'; - var item = revlink.replace(/_STYLE/, nstyle); - item = item.replace(/_PARITY/, 'parity' + parity); - item = item.replace(/_NODEID/, cur[0]); - item = item.replace(/_NODEID/, cur[0]); - item = item.replace(/_DESC/, cur[3]); - item = item.replace(/_USER/, cur[4]); - item = item.replace(/_DATE/, cur[5]); - - var tagspan = ''; - if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { - tagspan = '<span class="logtags">'; - if (cur[6][1]) { - tagspan += '<span class="branchtag" title="' + cur[6][0] + '">'; - tagspan += cur[6][0] + '</span> '; - } else if (!cur[6][1] && cur[6][0] != 'default') { - tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">'; - tagspan += cur[6][0] + '</span> '; - } - if (cur[7].length) { - for (var t in cur[7]) { - var tag = cur[7][t]; - tagspan += '<span class="tagtag">' + tag + '</span> '; - } - } - tagspan += '</span>'; - } - - item = item.replace(/_TAGS/, tagspan); - return [bg, item]; - -} - -graph.render(data); - -// stop hiding script --> -</script> - -<div class="page_nav"> -<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a> -<a href="{url}graph/{rev}{morevars%urlparameter}">more</a> -| {changenav%navgraphentry} -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/header.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="{encoding}"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> -<head> -<link rel="icon" href="{staticurl}hgicon.png" type="image/png" /> -<meta name="robots" content="index, nofollow"/> -<link rel="stylesheet" href="{staticurl}style-gitweb.css" type="text/css" /> -
--- a/mercurial-tests/testData/bin/Templates/gitweb/index.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -{header} -<title>Mercurial repositories index</title> -</head> -<body> - -<div class="page_header"> - <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a> - Repositories list -</div> - -<table cellspacing="0"> - <tr> - <td><a href="?sort={sort_name}">Name</a></td> - <td><a href="?sort={sort_description}">Description</a></td> - <td><a href="?sort={sort_contact}">Contact</a></td> - <td><a href="?sort={sort_lastchange}">Last change</a></td> - <td> </td> - <td> </td> - </tr> - {entries%indexentry} -</table> -<div class="page_footer"> -{motd} -</div> -</body> -</html>
--- a/mercurial-tests/testData/bin/Templates/gitweb/manifest.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -{header} -<title>{repo|escape}: files</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -files | -<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> {archives%archiveentry}<br/> -</div> - -<div class="title">{path|escape} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></div> -<table cellspacing="0"> -<tr class="parity{upparity}"> -<td style="font-family:monospace">drwxr-xr-x</td> -<td style="font-family:monospace"></td> -<td style="font-family:monospace"></td> -<td><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td> -<td class="link"> </td> -</tr> -{dentries%direntry} -{fentries%fileentry} -</table> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/map Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,248 +0,0 @@ -default = 'summary' -mimetype = 'text/html; charset={encoding}' -header = header.tmpl -footer = footer.tmpl -search = search.tmpl -changelog = changelog.tmpl -summary = summary.tmpl -error = error.tmpl -notfound = notfound.tmpl -naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> ' -navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> ' -navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> ' -filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> ' -filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> ' -filenodelink = ' - <tr class="parity{parity}"> - <td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td> - <td></td> - <td class="link"> - <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | - <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> | - <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | - <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> - </td> - </tr>' -filenolink = ' - <tr class="parity{parity}"> - <td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td> - <td></td> - <td class="link"> - file | - annotate | - <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | - <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> - </td> - </tr>' -fileellipses = '...' -changelogentry = changelogentry.tmpl -searchentry = changelogentry.tmpl -changeset = changeset.tmpl -manifest = manifest.tmpl -direntry = ' - <tr class="parity{parity}"> - <td style="font-family:monospace">drwxr-xr-x</td> - <td style="font-family:monospace"></td> - <td style="font-family:monospace"></td> - <td> - <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a> - <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">{emptydirs|escape}</a> - </td> - <td class="link"> - <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> - </td> - </tr>' -fileentry = ' - <tr class="parity{parity}"> - <td style="font-family:monospace">{permissions|permissions}</td> - <td style="font-family:monospace" align=right>{date|isodate}</td> - <td style="font-family:monospace" align=right>{size}</td> - <td class="list"> - <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a> - </td> - <td class="link"> - <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | - <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | - <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> - </td> - </tr>' -filerevision = filerevision.tmpl -fileannotate = fileannotate.tmpl -filediff = filediff.tmpl -filelog = filelog.tmpl -fileline = ' - <div style="font-family:monospace" class="parity{parity}"> - <pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</pre> - </div>' -annotateline = ' - <tr style="font-family:monospace" class="parity{parity}"> - <td class="linenr" style="text-align: right;"> - <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}" - title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a> - </td> - <td><pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a></pre></td> - <td><pre>{line|escape}</pre></td> - </tr>' -difflineplus = '<span style="color:#008800;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>' -difflineminus = '<span style="color:#cc0000;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>' -difflineat = '<span style="color:#990099;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>' -diffline = '<span><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>' -changelogparent = ' - <tr> - <th class="parent">parent {rev}:</th> - <td class="parent"> - <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> - </td> - </tr>' -changesetbranch = '<tr><td>branch</td><td>{name}</td></tr>' -changesetparent = ' - <tr> - <td>parent {rev}</td> - <td style="font-family:monospace"> - <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> - </td> - </tr>' -filerevbranch = '<tr><td>branch</td><td>{name}</td></tr>' -filerevparent = ' - <tr> - <td>parent {rev}</td> - <td style="font-family:monospace"> - <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}"> - {rename%filerename}{node|short} - </a> - </td> - </tr>' -filerename = '{file|escape}@' -filelogrename = '| <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">base</a>' -fileannotateparent = ' - <tr> - <td>parent {rev}</td> - <td style="font-family:monospace"> - <a class="list" href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}"> - {rename%filerename}{node|short} - </a> - </td> - </tr>' -changelogchild = ' - <tr> - <th class="child">child {rev}:</th> - <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td> - </tr>' -changesetchild = ' - <tr> - <td>child {rev}</td> - <td style="font-family:monospace"> - <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> - </td> - </tr>' -filerevchild = ' - <tr> - <td>child {rev}</td> - <td style="font-family:monospace"> - <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td> - </tr>' -fileannotatechild = ' - <tr> - <td>child {rev}</td> - <td style="font-family:monospace"> - <a class="list" href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td> - </tr>' -tags = tags.tmpl -tagentry = ' - <tr class="parity{parity}"> - <td class="age"><i>{date|age}</i></td> - <td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>{tag|escape}</b></a></td> - <td class="link"> - <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | - <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> | - <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> - </td> - </tr>' -branches = branches.tmpl -branchentry = ' - <tr class="parity{parity}"> - <td class="age"><i>{date|age}</i></td> - <td><a class="list" href="{url}shortlog/{node|short}{sessionvars%urlparameter}"><b>{node|short}</b></a></td> - <td class="{status}">{branch|escape}</td> - <td class="link"> - <a href="{url}changeset/{node|short}{sessionvars%urlparameter}">changeset</a> | - <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> | - <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> - </td> - </tr>' -diffblock = '<pre>{lines}</pre>' -filediffparent = ' - <tr> - <td>parent {rev}</td> - <td style="font-family:monospace"> - <a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}"> - {node|short} - </a> - </td> - </tr>' -filelogparent = ' - <tr> - <td align="right">parent {rev}: </td> - <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td> - </tr>' -filediffchild = ' - <tr> - <td>child {rev}</td> - <td style="font-family:monospace"> - <a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a> - </td> - </tr>' -filelogchild = ' - <tr> - <td align="right">child {rev}: </td> - <td><a href="{url}file{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td> - </tr>' -shortlog = shortlog.tmpl -graph = graph.tmpl -tagtag = '<span class="tagtag" title="{name}">{name}</span> ' -branchtag = '<span class="branchtag" title="{name}">{name}</span> ' -inbranchtag = '<span class="inbranchtag" title="{name}">{name}</span> ' -shortlogentry = ' - <tr class="parity{parity}"> - <td class="age"><i>{date|age}</i></td> - <td><i>{author|person}</i></td> - <td> - <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"> - <b>{desc|strip|firstline|escape|nonempty}</b> - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span> - </a> - </td> - <td class="link" nowrap> - <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | - <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> - </td> - </tr>' -filelogentry = ' - <tr class="parity{parity}"> - <td class="age"><i>{date|age}</i></td> - <td> - <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"> - <b>{desc|strip|firstline|escape|nonempty}</b> - </a> - </td> - <td class="link"> - <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> {rename%filelogrename}</td> - </tr>' -archiveentry = ' | <a href="{url}archive/{node|short}{extension}">{type|escape}</a> ' -indexentry = ' - <tr class="parity{parity}"> - <td> - <a class="list" href="{url}{sessionvars%urlparameter}"> - <b>{name|escape}</b> - </a> - </td> - <td>{description}</td> - <td>{contact|obfuscate}</td> - <td class="age">{lastchange|age}</td> - <td class="indexlinks">{archives%indexarchiveentry}</td> - <td><div class="rss_logo"><a href="{url}rss-log">RSS</a> <a href="{url}atom-log">Atom</a></div></td> - </tr>\n' -indexarchiveentry = ' <a href="{url}archive/{node|short}{extension}">{type|escape}</a> ' -index = index.tmpl -urlparameter = '{separator}{name}={value|urlescape}' -hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- a/mercurial-tests/testData/bin/Templates/gitweb/notfound.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -{header} -<title>Mercurial repository not found</title> -</head> - -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a> Not found: {repo|escape} -</div> - -<div class="page_body"> -The specified repository "{repo|escape}" is unknown, sorry. -<br/> -<br/> -Please go back to the <a href="{url}">main repository list page</a>. -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/search.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -{header} -<title>{repo|escape}: Search</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search - -<form action="{url}log"> -{sessionvars%hiddenformentry} -<div class="search"> -<input type="text" name="rev" value="{query|escape}" /> -</div> -</form> -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry} -<br/> -</div> - -<div class="title">searching for {query|escape}</div> - -{entries} - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/shortlog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -{header} -<title>{repo|escape}: Shortlog</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog -</div> - -<form action="{url}log"> -{sessionvars%hiddenformentry} -<div class="search"> -<input type="text" name="rev" /> -</div> -</form> -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -shortlog | -<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry} -<br/> -{changenav%navshortentry}<br/> -</div> - -<div class="title"> </div> -<table cellspacing="0"> -{entries%shortlogentry} -</table> - -<div class="page_nav"> -{changenav%navshortentry} -</div> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/summary.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -{header} -<title>{repo|escape}: Summary</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-log" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-log" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary - -<form action="{url}log"> -{sessionvars%hiddenformentry} -<div class="search"> -<input type="text" name="rev" /> -</div> -</form> -</div> - -<div class="page_nav"> -summary | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -<a href="{url}tags{sessionvars%urlparameter}">tags</a> | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry} -<br/> -</div> - -<div class="title"> </div> -<table cellspacing="0"> -<tr><td>description</td><td>{desc}</td></tr> -<tr><td>owner</td><td>{owner|obfuscate}</td></tr> -<tr><td>last change</td><td>{lastchange|rfc822date}</td></tr> -</table> - -<div><a class="title" href="{url}shortlog{sessionvars%urlparameter}">changes</a></div> -<table cellspacing="0"> -{shortlog} -<tr class="light"><td colspan="4"><a class="list" href="{url}shortlog{sessionvars%urlparameter}">...</a></td></tr> -</table> - -<div><a class="title" href="{url}tags{sessionvars%urlparameter}">tags</a></div> -<table cellspacing="0"> -{tags} -<tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr> -</table> - -<div><a class="title" href="#">branches</a></div> -<table cellspacing="0"> -{branches%branchentry} -<tr class="light"> - <td colspan="4"><a class="list" href="#">...</a></td> -</tr> -</table> -{footer}
--- a/mercurial-tests/testData/bin/Templates/gitweb/tags.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -{header} -<title>{repo|escape}: Tags</title> -<link rel="alternate" type="application/atom+xml" - href="{url}atom-tags" title="Atom feed for {repo|escape}"/> -<link rel="alternate" type="application/rss+xml" - href="{url}rss-tags" title="RSS feed for {repo|escape}"/> -</head> -<body> - -<div class="page_header"> -<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags -</div> - -<div class="page_nav"> -<a href="{url}summary{sessionvars%urlparameter}">summary</a> | -<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | -<a href="{url}log{sessionvars%urlparameter}">changelog</a> | -<a href="{url}graph{sessionvars%urlparameter}">graph</a> | -tags | -<a href="{url}branches{sessionvars%urlparameter}">branches</a> | -<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> -<br/> -</div> - -<div class="title"> </div> -<table cellspacing="0"> -{entries%tagentry} -</table> - -{footer}
--- a/mercurial-tests/testData/bin/Templates/header.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> -<link rel="icon" href="#staticurl#hgicon.png" type="image/png"> -<meta name="robots" content="index, nofollow" /> -<link rel="stylesheet" href="#staticurl#style.css" type="text/css" />
--- a/mercurial-tests/testData/bin/Templates/index.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -#header# -<title>Mercurial repositories index</title> -</head> -<body> - -<h2>Mercurial Repositories</h2> - -<table> - <tr> - <td><a href="?sort=#sort_name#">Name</a></td> - <td><a href="?sort=#sort_description#">Description</a></td> - <td><a href="?sort=#sort_contact#">Contact</a></td> - <td><a href="?sort=#sort_lastchange#">Last change</a></td> - <td> </td> - <tr> - #entries%indexentry# -</table> - -#footer#
--- a/mercurial-tests/testData/bin/Templates/manifest.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -#header# -<title>#repo|escape#: files for changeset #node|short#</title> -</head> -<body> - -<div class="buttons"> -<a href="#url#log/#rev#{sessionvars%urlparameter}">changelog</a> -<a href="#url#shortlog/#rev#{sessionvars%urlparameter}">shortlog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#rev/#node|short#{sessionvars%urlparameter}">changeset</a> -#archives%archiveentry# -</div> - -<h2>files for changeset #node|short#: #path|escape#</h2> - -<table cellpadding="0" cellspacing="0"> -<tr class="parity#upparity#"> - <td><tt>drwxr-xr-x</tt> - <td> - <td> - <td><a href="#url#file/#node|short##up|urlescape#{sessionvars%urlparameter}">[up]</a> -</tr> -#dentries%direntry# -#fentries%fileentry# -</table> -#footer#
--- a/mercurial-tests/testData/bin/Templates/map Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -default = 'shortlog' -mimetype = 'text/html; charset={encoding}' -header = header.tmpl -footer = footer.tmpl -search = search.tmpl -changelog = changelog.tmpl -shortlog = shortlog.tmpl -shortlogentry = shortlogentry.tmpl -naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> ' -navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> ' -filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> ' -filedifflink = '<a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#file|escape#</a> ' -filenodelink = '<a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#file|escape#</a> ' -fileellipses = '...' -changelogentry = changelogentry.tmpl -searchentry = changelogentry.tmpl -changeset = changeset.tmpl -manifest = manifest.tmpl -direntry = '<tr class="parity#parity#"><td><tt>drwxr-xr-x</tt> <td> <td> <td><a href="#url#file/#node|short##path|urlescape#{sessionvars%urlparameter}">#basename|escape#/</a>' -fileentry = '<tr class="parity#parity#"><td><tt>#permissions|permissions#</tt> <td align=right><tt class="date">#date|isodate#</tt> <td align=right><tt>#size#</tt> <td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#basename|escape#</a>' -filerevision = filerevision.tmpl -fileannotate = fileannotate.tmpl -filediff = filediff.tmpl -filelog = filelog.tmpl -fileline = '<div class="parity#parity#"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</div>' -filelogentry = filelogentry.tmpl -annotateline = '<tr class="parity#parity#"><td class="annotate"><a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}#l{targetline}">#author|obfuscate#@#rev#</a></td><td><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a></td><td><pre>#line|escape#</pre></td></tr>' -difflineplus = '<span class="plusline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' -difflineminus = '<span class="minusline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' -difflineat = '<span class="atline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' -diffline = '<a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#' -changelogparent = '<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -changesetparent = '<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -filerevparent = '<tr><td class="metatag">parent:</td><td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a></td></tr>' -filerename = '{file|escape}@' -filelogrename = '<tr><th>base:</th><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#file|escape#@#node|short#</a></td></tr>' -fileannotateparent = '<tr><td class="metatag">parent:</td><td><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a></td></tr>' -changesetchild = '<tr><th class="child">child #rev#:</th><td class="child"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -changelogchild = '<tr><th class="child">child #rev#:</th><td class="child"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -filerevchild = '<tr><td class="metatag">child:</td><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -fileannotatechild = '<tr><td class="metatag">child:</td><td><a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -tags = tags.tmpl -tagentry = '<li class="tagEntry parity#parity#"><tt class="node">#node#</tt> <a href="#url#rev/#node|short#{sessionvars%urlparameter}">#tag|escape#</a></li>' -diffblock = '<pre class="parity#parity#">#lines#</pre>' -changelogtag = '<tr><th class="tag">tag:</th><td class="tag">#tag|escape#</td></tr>' -changesettag = '<tr><th class="tag">tag:</th><td class="tag">#tag|escape#</td></tr>' -filediffparent = '<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -filelogparent = '<tr><th>parent #rev#:</th><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -filediffchild = '<tr><th class="child">child #rev#:</th><td class="child"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -filelogchild = '<tr><th>child #rev#:</th><td><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' -indexentry = '<tr class="parity#parity#"><td><a href="#url#{sessionvars%urlparameter}">#name|escape#</a></td><td>#description#</td><td>#contact|obfuscate#</td><td class="age">#lastchange|age# ago</td><td class="indexlinks"><a href="#url#rss-log">RSS</a> <a href="#url#atom-log">Atom</a> #archives%archiveentry#</td></tr>' -index = index.tmpl -archiveentry = '<a href="#url#archive/#node|short##extension|urlescape#">#type|escape#</a> ' -notfound = notfound.tmpl -error = error.tmpl -urlparameter = '#separator##name#=#value|urlescape#' -hiddenformentry = '<input type="hidden" name="#name#" value="#value|escape#" />'
--- a/mercurial-tests/testData/bin/Templates/map-cmdline.changelog Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -header = '{date|shortdate} {author|person} <{author|email}>\n\n' -header_verbose = '' -changeset = '\t* {files|stringify|fill68|tabindent}{desc|fill68|tabindent|strip}\n\t[{node|short}]{tags}\n\n' -changeset_quiet = '\t* {desc|firstline|fill68|tabindent|strip}\n\n' -changeset_verbose = '{date|isodate} {author|person} <{author|email}> ({node|short}{tags})\n\n\t* {file_adds|stringify|fill68|tabindent}{file_dels|stringify|fill68|tabindent}{files|stringify|fill68|tabindent}{desc|fill68|tabindent|strip}\n\n' -start_tags = ' [' -tag = '{tag}, ' -last_tag = '{tag}]' -file = '{file}, ' -last_file = '{file}:\n\t' -file_add = '{file_add}, ' -last_file_add = '{file_add}: new file.\n* ' -file_del = '{file_del}, ' -last_file_del = '{file_del}: deleted file.\n* '
--- a/mercurial-tests/testData/bin/Templates/map-cmdline.compact Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -changeset = '{rev}{tags}{parents} {node|short} {date|isodate} {author|user}\n {desc|firstline|strip}\n\n' -changeset_quiet = '{rev}:{node|short}\n' -changeset_verbose = '{rev}{tags}{parents} {node|short} {date|isodate} {author}\n {desc|strip}\n\n' -start_tags = '[' -tag = '{tag},' -last_tag = '{tag}]' -start_parents = ':' -parent = '{rev},' -last_parent = '{rev}'
--- a/mercurial-tests/testData/bin/Templates/map-cmdline.default Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -changeset = 'changeset: {rev}:{node|short}\n{branches}{tags}{parents}user: {author}\ndate: {date|date}\nsummary: {desc|firstline}\n\n' -changeset_quiet = '{rev}:{node|short}\n' -changeset_verbose = 'changeset: {rev}:{node|short}\n{branches}{tags}{parents}user: {author}\ndate: {date|date}\n{files}{file_copies}description:\n{desc|strip}\n\n\n' -changeset_debug = 'changeset: {rev}:{node}\n{branches}{tags}{parents}{manifest}user: {author}\ndate: {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies}{extras}description:\n{desc|strip}\n\n\n' -start_files = 'files: ' -file = ' {file}' -end_files = '\n' -start_file_mods = 'files: ' -file_mod = ' {file_mod}' -end_file_mods = '\n' -start_file_adds = 'files+: ' -file_add = ' {file_add}' -end_file_adds = '\n' -start_file_dels = 'files-: ' -file_del = ' {file_del}' -end_file_dels = '\n' -start_file_copies = 'copies: ' -file_copy = ' {name} ({source})' -end_file_copies = '\n' -parent = 'parent: {rev}:{node|formatnode}\n' -manifest = 'manifest: {rev}:{node}\n' -branch = 'branch: {branch}\n' -tag = 'tag: {tag}\n' -extra = 'extra: {key}={value|stringescape}\n'
--- a/mercurial-tests/testData/bin/Templates/notfound.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -#header# -<title>Mercurial repository not found</title> -</head> -<body> - -<h2>Mercurial repository not found</h2> - -The specified repository "#repo|escape#" is unknown, sorry. - -Please go back to the main repository list page. - -#footer#
--- a/mercurial-tests/testData/bin/Templates/raw/changeset.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -{header} -# HG changeset patch -# User {author} -# Date {date|hgdate} -# Node ID {node} -{parent%changesetparent} -{desc} - -{diff}
--- a/mercurial-tests/testData/bin/Templates/raw/error.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -{header} -error: {error}
--- a/mercurial-tests/testData/bin/Templates/raw/fileannotate.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -{header} -{annotate%annotateline} -{footer} - -
--- a/mercurial-tests/testData/bin/Templates/raw/filediff.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -{header} -{diff} -{footer} - -
--- a/mercurial-tests/testData/bin/Templates/raw/index.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -{header} -{entries%indexentry}
--- a/mercurial-tests/testData/bin/Templates/raw/manifest.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -{header} -{dentries%direntry}{fentries%fileentry} -{footer}
--- a/mercurial-tests/testData/bin/Templates/raw/map Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -mimetype = 'text/plain; charset={encoding}' -header = '' -footer = '' -changeset = changeset.tmpl -difflineplus = '{line}' -difflineminus = '{line}' -difflineat = '{line}' -diffline = '{line}' -changesetparent = '# Parent {node}' -changesetchild = '# Child {node}' -filenodelink = '' -fileline = '{line}' -diffblock = '{lines}' -filediff = filediff.tmpl -fileannotate = fileannotate.tmpl -annotateline = '{author|user}@{rev}: {line}' -manifest = manifest.tmpl -direntry = 'drwxr-xr-x {basename}\n' -fileentry = '{permissions|permissions} {size} {basename}\n' -index = index.tmpl -notfound = notfound.tmpl -error = error.tmpl -indexentry = '{url}\n'
--- a/mercurial-tests/testData/bin/Templates/raw/notfound.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -{header} -error: repository {repo} not found
--- a/mercurial-tests/testData/bin/Templates/rss/changelog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -{header} - <title>{repo|escape} Changelog</title> - <description>{repo|escape} Changelog</description> - {entries%changelogentry} - </channel> -</rss> \ No newline at end of file
--- a/mercurial-tests/testData/bin/Templates/rss/changelogentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -<item> - <title>{desc|strip|firstline|strip|escape}</title> - <guid isPermaLink="true">{urlbase}{url}rev/{node|short}</guid> - <description><![CDATA[{desc|strip|escape|addbreaks|nonempty}]]></description> - <author>{author|obfuscate}</author> - <pubDate>{date|rfc822date}</pubDate> -</item>
--- a/mercurial-tests/testData/bin/Templates/rss/error.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -{header} - <title>Error</title> - <description>Error</description> - <item> - <title>Error</title> - <description>{error|escape}</description> - <guid>http://mercurial.selenic.com/#error</guid> - </item> - </channel> -</rss>
--- a/mercurial-tests/testData/bin/Templates/rss/filelog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -{header} - <title>{repo|escape}: {file|escape} history</title> - <description>{file|escape} revision history</description> - {entries%filelogentry} - </channel> -</rss>
--- a/mercurial-tests/testData/bin/Templates/rss/filelogentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -<item> - <title>{desc|strip|firstline|strip|escape}</title> - <link>{urlbase}{url}log{{node|short}}/{file|urlescape}</link> - <description><![CDATA[{desc|strip|escape|addbreaks|nonempty}]]></description> - <author>{author|obfuscate}</author> - <pubDate>{date|rfc822date}</pubDate> -</item>
--- a/mercurial-tests/testData/bin/Templates/rss/header.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="{encoding}"?> -<rss version="2.0"> - <channel> - <link>{urlbase}{url}</link> - <language>en-us</language>
--- a/mercurial-tests/testData/bin/Templates/rss/map Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -default = 'changelog' -mimetype = 'text/xml; charset={encoding}' -header = header.tmpl -changelog = changelog.tmpl -changelogentry = changelogentry.tmpl -filelog = filelog.tmpl -filelogentry = filelogentry.tmpl -tags = tags.tmpl -tagentry = tagentry.tmpl -error = error.tmpl
--- a/mercurial-tests/testData/bin/Templates/rss/tagentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -<item> - <title>{tag|escape}</title> - <link>{urlbase}{url}rev/{node|short}</link> - <description><![CDATA[{tag|strip|escape|addbreaks}]]></description> - <pubDate>{date|rfc822date}</pubDate> -</item>
--- a/mercurial-tests/testData/bin/Templates/rss/tags.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -{header} - <title>{repo|escape}: tags </title> - <description>{repo|escape} tag history</description> - {entriesnotip%tagentry} - </channel> -</rss>
--- a/mercurial-tests/testData/bin/Templates/search.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -#header# -<title>#repo|escape#: searching for #query|escape#</title> -</head> -<body> - -<div class="buttons"> -<a href="#url#log{sessionvars%urlparameter}">changelog</a> -<a href="#url#shortlog{sessionvars%urlparameter}">shortlog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#file/#node|short#{sessionvars%urlparameter}">files</a> -#archives%archiveentry# -</div> - -<h2>searching for #query|escape#</h2> - -<form> -{sessionvars%hiddenformentry} -<p> -search: -<input name="rev" type="text" width="30" value="#query|escape#"> -</p> -</form> - -#entries# - -<form> -{sessionvars%hiddenformentry} -<p> -search: -<input name="rev" type="text" width="30" value="#query|escape#"> -</p> -</form> - -#footer#
--- a/mercurial-tests/testData/bin/Templates/shortlog.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -#header# -<title>#repo|escape#: shortlog</title> -<link rel="alternate" type="application/atom+xml" - href="#url#atom-log" title="Atom feed for #repo|escape#"> -<link rel="alternate" type="application/rss+xml" - href="#url#rss-log" title="RSS feed for #repo|escape#"> -</head> -<body> - -<div class="buttons"> -<a href="#url#log/#rev#{sessionvars%urlparameter}">changelog</a> -<a href="#url#tags{sessionvars%urlparameter}">tags</a> -<a href="#url#file/#node|short#/{sessionvars%urlparameter}">files</a> -#archives%archiveentry# -<a type="application/rss+xml" href="#url#rss-log">rss</a> -<a type="application/rss+xml" href="#url#atom-log" title="Atom feed for #repo|escape#">atom</a> -</div> - -<h2>shortlog for #repo|escape#</h2> - -<form action="#url#log"> -{sessionvars%hiddenformentry} -<p> -<label for="search1">search:</label> -<input name="rev" id="search1" type="text" size="30"> -navigate: <small class="navigate">#changenav%navshortentry#</small> -</p> -</form> - -#entries%shortlogentry# - -<form action="#url#log"> -{sessionvars%hiddenformentry} -<p> -<label for="search2">search:</label> -<input name="rev" id="search2" type="text" size="30"> -navigate: <small class="navigate">#changenav%navshortentry#</small> -</p> -</form> - -#footer#
--- a/mercurial-tests/testData/bin/Templates/shortlogentry.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -<table class="slogEntry parity#parity#"> - <tr> - <td class="age">#date|age#</td> - <td class="author">#author|person#</td> - <td class="node"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#desc|strip|firstline|escape#</a></td> - </tr> -</table>
--- a/mercurial-tests/testData/bin/Templates/static/excanvas.js Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -if(!window.CanvasRenderingContext2D){(function(){var I=Math,i=I.round,L=I.sin,M=I.cos,m=10,A=m/2,Q={init:function(a){var b=a||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var c=this;b.attachEvent("onreadystatechange",function(){c.r(b)})}},r:function(a){if(a.readyState=="complete"){if(!a.namespaces["s"]){a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var b=a.createStyleSheet();b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}"; -var c=a.getElementsByTagName("canvas");for(var d=0;d<c.length;d++){if(!c[d].getContext){this.initElement(c[d])}}}},q:function(a){var b=a.outerHTML,c=a.ownerDocument.createElement(b);if(b.slice(-2)!="/>"){var d="/"+a.tagName,e;while((e=a.nextSibling)&&e.tagName!=d){e.removeNode()}if(e){e.removeNode()}}a.parentNode.replaceChild(c,a);return c},initElement:function(a){a=this.q(a);a.getContext=function(){if(this.l){return this.l}return this.l=new K(this)};a.attachEvent("onpropertychange",V);a.attachEvent("onresize", -W);var b=a.attributes;if(b.width&&b.width.specified){a.style.width=b.width.nodeValue+"px"}else{a.width=a.clientWidth}if(b.height&&b.height.specified){a.style.height=b.height.nodeValue+"px"}else{a.height=a.clientHeight}return a}};function V(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function W(a){var b=a.srcElement; -if(b.firstChild){b.firstChild.style.width=b.clientWidth+"px";b.firstChild.style.height=b.clientHeight+"px"}}Q.init();var R=[];for(var E=0;E<16;E++){for(var F=0;F<16;F++){R[E*16+F]=E.toString(16)+F.toString(16)}}function J(){return[[1,0,0],[0,1,0],[0,0,1]]}function G(a,b){var c=J();for(var d=0;d<3;d++){for(var e=0;e<3;e++){var g=0;for(var h=0;h<3;h++){g+=a[d][h]*b[h][e]}c[d][e]=g}}return c}function N(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit= -a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.d=a.d;b.e=a.e}function O(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),g=a.substring(d+1,e).split(",");b="#";for(var h=0;h<3;h++){b+=R[Number(g[h])]}if(g.length==4&&a.substr(3,1)=="a"){c=g[3]}}else{b=a}return[b,c]}function S(a){switch(a){case "butt":return"flat";case "round":return"round"; -case "square":default:return"square"}}function K(a){this.a=J();this.m=[];this.k=[];this.c=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=m*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.j=b;this.d=1;this.e=1}var j=K.prototype;j.clearRect=function(){this.j.innerHTML= -"";this.c=[]};j.beginPath=function(){this.c=[]};j.moveTo=function(a,b){this.c.push({type:"moveTo",x:a,y:b});this.f=a;this.g=b};j.lineTo=function(a,b){this.c.push({type:"lineTo",x:a,y:b});this.f=a;this.g=b};j.bezierCurveTo=function(a,b,c,d,e,g){this.c.push({type:"bezierCurveTo",cp1x:a,cp1y:b,cp2x:c,cp2y:d,x:e,y:g});this.f=e;this.g=g};j.quadraticCurveTo=function(a,b,c,d){var e=this.f+0.6666666666666666*(a-this.f),g=this.g+0.6666666666666666*(b-this.g),h=e+(c-this.f)/3,l=g+(d-this.g)/3;this.bezierCurveTo(e, -g,h,l,c,d)};j.arc=function(a,b,c,d,e,g){c*=m;var h=g?"at":"wa",l=a+M(d)*c-A,n=b+L(d)*c-A,o=a+M(e)*c-A,f=b+L(e)*c-A;if(l==o&&!g){l+=0.125}this.c.push({type:h,x:a,y:b,radius:c,xStart:l,yStart:n,xEnd:o,yEnd:f})};j.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};j.strokeRect=function(a,b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke()};j.fillRect=function(a, -b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill()};j.createLinearGradient=function(a,b,c,d){var e=new H("gradient");return e};j.createRadialGradient=function(a,b,c,d,e,g){var h=new H("gradientradial");h.n=c;h.o=g;h.i.x=a;h.i.y=b;return h};j.drawImage=function(a,b){var c,d,e,g,h,l,n,o,f=a.runtimeStyle.width,k=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var q=a.width,r=a.height;a.runtimeStyle.width= -f;a.runtimeStyle.height=k;if(arguments.length==3){c=arguments[1];d=arguments[2];h=(l=0);n=(e=q);o=(g=r)}else if(arguments.length==5){c=arguments[1];d=arguments[2];e=arguments[3];g=arguments[4];h=(l=0);n=q;o=r}else if(arguments.length==9){h=arguments[1];l=arguments[2];n=arguments[3];o=arguments[4];c=arguments[5];d=arguments[6];e=arguments[7];g=arguments[8]}else{throw"Invalid number of arguments";}var s=this.b(c,d),t=[],v=10,w=10;t.push(" <g_vml_:group",' coordsize="',m*v,",",m*w,'"',' coordorigin="0,0"', -' style="width:',v,";height:",w,";position:absolute;");if(this.a[0][0]!=1||this.a[0][1]){var x=[];x.push("M11='",this.a[0][0],"',","M12='",this.a[1][0],"',","M21='",this.a[0][1],"',","M22='",this.a[1][1],"',","Dx='",i(s.x/m),"',","Dy='",i(s.y/m),"'");var p=s,y=this.b(c+e,d),z=this.b(c,d+g),B=this.b(c+e,d+g);p.x=Math.max(p.x,y.x,z.x,B.x);p.y=Math.max(p.y,y.y,z.y,B.y);t.push("padding:0 ",i(p.x/m),"px ",i(p.y/m),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",x.join(""),", sizingmethod='clip');")}else{t.push("top:", -i(s.y/m),"px;left:",i(s.x/m),"px;")}t.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',m*e,";"," height:",m*g,';"',' cropleft="',h/q,'"',' croptop="',l/r,'"',' cropright="',(q-h-n)/q,'"',' cropbottom="',(r-l-o)/r,'"'," />","</g_vml_:group>");this.j.insertAdjacentHTML("BeforeEnd",t.join(""))};j.stroke=function(a){var b=[],c=O(a?this.fillStyle:this.strokeStyle),d=c[0],e=c[1]*this.globalAlpha,g=10,h=10;b.push("<g_vml_:shape",' fillcolor="',d,'"',' filled="',Boolean(a),'"',' style="position:absolute;width:', -g,";height:",h,';"',' coordorigin="0 0" coordsize="',m*g," ",m*h,'"',' stroked="',!a,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',d,'"',' path="');var l={x:null,y:null},n={x:null,y:null};for(var o=0;o<this.c.length;o++){var f=this.c[o];if(f.type=="moveTo"){b.push(" m ");var k=this.b(f.x,f.y);b.push(i(k.x),",",i(k.y))}else if(f.type=="lineTo"){b.push(" l ");var k=this.b(f.x,f.y);b.push(i(k.x),",",i(k.y))}else if(f.type=="close"){b.push(" x ")}else if(f.type=="bezierCurveTo"){b.push(" c "); -var k=this.b(f.x,f.y),q=this.b(f.cp1x,f.cp1y),r=this.b(f.cp2x,f.cp2y);b.push(i(q.x),",",i(q.y),",",i(r.x),",",i(r.y),",",i(k.x),",",i(k.y))}else if(f.type=="at"||f.type=="wa"){b.push(" ",f.type," ");var k=this.b(f.x,f.y),s=this.b(f.xStart,f.yStart),t=this.b(f.xEnd,f.yEnd);b.push(i(k.x-this.d*f.radius),",",i(k.y-this.e*f.radius)," ",i(k.x+this.d*f.radius),",",i(k.y+this.e*f.radius)," ",i(s.x),",",i(s.y)," ",i(t.x),",",i(t.y))}if(k){if(l.x==null||k.x<l.x){l.x=k.x}if(n.x==null||k.x>n.x){n.x=k.x}if(l.y== -null||k.y<l.y){l.y=k.y}if(n.y==null||k.y>n.y){n.y=k.y}}}b.push(' ">');if(typeof this.fillStyle=="object"){var v={x:"50%",y:"50%"},w=n.x-l.x,x=n.y-l.y,p=w>x?w:x;v.x=i(this.fillStyle.i.x/w*100+50)+"%";v.y=i(this.fillStyle.i.y/x*100+50)+"%";var y=[];if(this.fillStyle.p=="gradientradial"){var z=this.fillStyle.n/p*100,B=this.fillStyle.o/p*100-z}else{var z=0,B=100}var C={offset:null,color:null},D={offset:null,color:null};this.fillStyle.h.sort(function(T,U){return T.offset-U.offset});for(var o=0;o<this.fillStyle.h.length;o++){var u= -this.fillStyle.h[o];y.push(u.offset*B+z,"% ",u.color,",");if(u.offset>C.offset||C.offset==null){C.offset=u.offset;C.color=u.color}if(u.offset<D.offset||D.offset==null){D.offset=u.offset;D.color=u.color}}y.pop();b.push("<g_vml_:fill",' color="',D.color,'"',' color2="',C.color,'"',' type="',this.fillStyle.p,'"',' focusposition="',v.x,", ",v.y,'"',' colors="',y.join(""),'"',' opacity="',e,'" />')}else if(a){b.push('<g_vml_:fill color="',d,'" opacity="',e,'" />')}else{b.push("<g_vml_:stroke",' opacity="', -e,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',S(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',d,'" />')}b.push("</g_vml_:shape>");this.j.insertAdjacentHTML("beforeEnd",b.join(""));this.c=[]};j.fill=function(){this.stroke(true)};j.closePath=function(){this.c.push({type:"close"})};j.b=function(a,b){return{x:m*(a*this.a[0][0]+b*this.a[1][0]+this.a[2][0])-A,y:m*(a*this.a[0][1]+b*this.a[1][1]+this.a[2][1])-A}};j.save=function(){var a={};N(this,a); -this.k.push(a);this.m.push(this.a);this.a=G(J(),this.a)};j.restore=function(){N(this.k.pop(),this);this.a=this.m.pop()};j.translate=function(a,b){var c=[[1,0,0],[0,1,0],[a,b,1]];this.a=G(c,this.a)};j.rotate=function(a){var b=M(a),c=L(a),d=[[b,c,0],[-c,b,0],[0,0,1]];this.a=G(d,this.a)};j.scale=function(a,b){this.d*=a;this.e*=b;var c=[[a,0,0],[0,b,0],[0,0,1]];this.a=G(c,this.a)};j.clip=function(){};j.arcTo=function(){};j.createPattern=function(){return new P};function H(a){this.p=a;this.n=0;this.o= -0;this.h=[];this.i={x:0,y:0}}H.prototype.addColorStop=function(a,b){b=O(b);this.h.push({offset:1-a,color:b})};function P(){}G_vmlCanvasManager=Q;CanvasRenderingContext2D=K;CanvasGradient=H;CanvasPattern=P})()};
--- a/mercurial-tests/testData/bin/Templates/static/graph.js Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -// branch_renderer.js - Rendering of branch DAGs on the client side -// -// Copyright 2008 Dirkjan Ochtman <dirkjan AT ochtman DOT nl> -// Copyright 2006 Alexander Schremmer <alex AT alexanderweb DOT de> -// -// derived from code written by Scott James Remnant <scott@ubuntu.com> -// Copyright 2005 Canonical Ltd. -// -// This software may be used and distributed according to the terms -// of the GNU General Public License, incorporated herein by reference. - -var colors = [ - [ 1.0, 0.0, 0.0 ], - [ 1.0, 1.0, 0.0 ], - [ 0.0, 1.0, 0.0 ], - [ 0.0, 1.0, 1.0 ], - [ 0.0, 0.0, 1.0 ], - [ 1.0, 0.0, 1.0 ] -]; - -function Graph() { - - this.canvas = document.getElementById('graph'); - if (navigator.userAgent.indexOf('MSIE') >= 0) this.canvas = window.G_vmlCanvasManager.initElement(this.canvas); - this.ctx = this.canvas.getContext('2d'); - this.ctx.strokeStyle = 'rgb(0, 0, 0)'; - this.ctx.fillStyle = 'rgb(0, 0, 0)'; - this.cur = [0, 0]; - this.line_width = 3; - this.bg = [0, 4]; - this.cell = [2, 0]; - this.columns = 0; - this.revlink = ''; - - this.scale = function(height) { - this.bg_height = height; - this.box_size = Math.floor(this.bg_height / 1.2); - this.cell_height = this.box_size; - } - - function colorPart(num) { - num *= 255 - num = num < 0 ? 0 : num; - num = num > 255 ? 255 : num; - var digits = Math.round(num).toString(16); - if (num < 16) { - return '0' + digits; - } else { - return digits; - } - } - - this.setColor = function(color, bg, fg) { - - // Set the colour. - // - // Picks a distinct colour based on an internal wheel; the bg - // parameter provides the value that should be assigned to the 'zero' - // colours and the fg parameter provides the multiplier that should be - // applied to the foreground colours. - - color %= colors.length; - var red = (colors[color][0] * fg) || bg; - var green = (colors[color][1] * fg) || bg; - var blue = (colors[color][2] * fg) || bg; - red = Math.round(red * 255); - green = Math.round(green * 255); - blue = Math.round(blue * 255); - var s = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - this.ctx.strokeStyle = s; - this.ctx.fillStyle = s; - return s; - - } - - this.render = function(data) { - - var backgrounds = ''; - var nodedata = ''; - - for (var i in data) { - - var parity = i % 2; - this.cell[1] += this.bg_height; - this.bg[1] += this.bg_height; - - var cur = data[i]; - var node = cur[1]; - var edges = cur[2]; - var fold = false; - - for (var j in edges) { - - line = edges[j]; - start = line[0]; - end = line[1]; - color = line[2]; - - if (end > this.columns || start > this.columns) { - this.columns += 1; - } - - if (start == this.columns && start > end) { - var fold = true; - } - - x0 = this.cell[0] + this.box_size * start + this.box_size / 2; - y0 = this.bg[1] - this.bg_height / 2; - x1 = this.cell[0] + this.box_size * end + this.box_size / 2; - y1 = this.bg[1] + this.bg_height / 2; - - this.edge(x0, y0, x1, y1, color); - - } - - // Draw the revision node in the right column - - column = node[0] - color = node[1] - - radius = this.box_size / 8; - x = this.cell[0] + this.box_size * column + this.box_size / 2; - y = this.bg[1] - this.bg_height / 2; - var add = this.vertex(x, y, color, parity, cur); - backgrounds += add[0]; - nodedata += add[1]; - - if (fold) this.columns -= 1; - - } - - document.getElementById('nodebgs').innerHTML += backgrounds; - document.getElementById('graphnodes').innerHTML += nodedata; - - } - -}
--- a/mercurial-tests/testData/bin/Templates/static/highlight.css Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -.c { color: #808080 } /* Comment */ -.err { color: #F00000; background-color: #F0A0A0 } /* Error */ -.k { color: #008000; font-weight: bold } /* Keyword */ -.o { color: #303030 } /* Operator */ -.cm { color: #808080 } /* Comment.Multiline */ -.cp { color: #507090 } /* Comment.Preproc */ -.c1 { color: #808080 } /* Comment.Single */ -.cs { color: #cc0000; font-weight: bold } /* Comment.Special */ -.gd { color: #A00000 } /* Generic.Deleted */ -.ge { font-style: italic } /* Generic.Emph */ -.gr { color: #FF0000 } /* Generic.Error */ -.gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.gi { color: #00A000 } /* Generic.Inserted */ -.go { color: #808080 } /* Generic.Output */ -.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ -.gs { font-weight: bold } /* Generic.Strong */ -.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.gt { color: #0040D0 } /* Generic.Traceback */ -.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ -.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ -.kp { color: #003080; font-weight: bold } /* Keyword.Pseudo */ -.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ -.kt { color: #303090; font-weight: bold } /* Keyword.Type */ -.m { color: #6000E0; font-weight: bold } /* Literal.Number */ -.s { background-color: #fff0f0 } /* Literal.String */ -.na { color: #0000C0 } /* Name.Attribute */ -.nb { color: #007020 } /* Name.Builtin */ -.nc { color: #B00060; font-weight: bold } /* Name.Class */ -.no { color: #003060; font-weight: bold } /* Name.Constant */ -.nd { color: #505050; font-weight: bold } /* Name.Decorator */ -.ni { color: #800000; font-weight: bold } /* Name.Entity */ -.ne { color: #F00000; font-weight: bold } /* Name.Exception */ -.nf { color: #0060B0; font-weight: bold } /* Name.Function */ -.nl { color: #907000; font-weight: bold } /* Name.Label */ -.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ -.nt { color: #007000 } /* Name.Tag */ -.nv { color: #906030 } /* Name.Variable */ -.ow { color: #000000; font-weight: bold } /* Operator.Word */ -.w { color: #bbbbbb } /* Text.Whitespace */ -.mf { color: #6000E0; font-weight: bold } /* Literal.Number.Float */ -.mh { color: #005080; font-weight: bold } /* Literal.Number.Hex */ -.mi { color: #0000D0; font-weight: bold } /* Literal.Number.Integer */ -.mo { color: #4000E0; font-weight: bold } /* Literal.Number.Oct */ -.sb { background-color: #fff0f0 } /* Literal.String.Backtick */ -.sc { color: #0040D0 } /* Literal.String.Char */ -.sd { color: #D04020 } /* Literal.String.Doc */ -.s2 { background-color: #fff0f0 } /* Literal.String.Double */ -.se { color: #606060; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ -.sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ -.si { background-color: #e0e0e0 } /* Literal.String.Interpol */ -.sx { color: #D02000; background-color: #fff0f0 } /* Literal.String.Other */ -.sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ -.s1 { background-color: #fff0f0 } /* Literal.String.Single */ -.ss { color: #A06000 } /* Literal.String.Symbol */ -.bp { color: #007020 } /* Name.Builtin.Pseudo */ -.vc { color: #306090 } /* Name.Variable.Class */ -.vg { color: #d07000; font-weight: bold } /* Name.Variable.Global */ -.vi { color: #3030B0 } /* Name.Variable.Instance */ -.il { color: #0000D0; font-weight: bold } /* Literal.Number.Integer.Long */
--- a/mercurial-tests/testData/bin/Templates/static/style-coal.css Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,265 +0,0 @@ -body { - margin: 0; - padding: 0; - background: black url(background.png) repeat-x; - font-family: sans-serif; -} - -.container { - padding-right: 150px; -} - -.main { - position: relative; - background: white; - padding: 2em; - border-right: 15px solid black; - border-bottom: 15px solid black; -} - -#.main { - width: 98%; -} - -.overflow { - width: 100%; - overflow: auto; -} - -.menu { - background: #999; - padding: 10px; - width: 75px; - margin: 0; - font-size: 80%; - text-align: left; - position: fixed; - top: 27px; - left: auto; - right: 27px; -} - -#.menu { - position: absolute !important; - top:expression(eval(document.body.scrollTop + 27)); -} - -.menu ul { - list-style: none; - padding: 0; - margin: 10px 0 0 0; -} - -.menu li { - margin-bottom: 3px; - padding: 2px 4px; - background: white; - color: black; - font-weight: normal; -} - -.menu li.active { - background: black; - color: white; -} - -.menu img { - width: 75px; - height: 90px; - border: 0; -} - -.menu a { color: black; display: block; } - -.search { - position: absolute; - top: .7em; - right: 2em; -} - -form.search div#hint { - display: none; - position: absolute; - top: 40px; - right: 0px; - width: 190px; - padding: 5px; - background: #ffc; - font-size: 70%; - border: 1px solid yellow; - -moz-border-radius: 5px; /* this works only in camino/firefox */ - -webkit-border-radius: 5px; /* this is just for Safari */ -} - -form.search:hover div#hint { display: block; } - -a { text-decoration:none; } -.age { white-space:nowrap; } -.date { white-space:nowrap; } -.indexlinks { white-space:nowrap; } -.parity0 { background-color: #f0f0f0; } -.parity1 { background-color: white; } -.plusline { color: green; } -.minusline { color: #dc143c; } /* crimson */ -.atline { color: purple; } - -.navigate { - text-align: right; - font-size: 60%; - margin: 1em 0; -} - -.tag { - color: #999; - font-size: 70%; - font-weight: normal; - margin-left: .5em; - vertical-align: baseline; -} - -.branchhead { - color: #000; - font-size: 80%; - font-weight: normal; - margin-left: .5em; - vertical-align: baseline; -} - -ul#graphnodes .branchhead { - font-size: 75%; -} - -.branchname { - color: #000; - font-size: 60%; - font-weight: normal; - margin-left: .5em; - vertical-align: baseline; -} - -h3 .branchname { - font-size: 80%; -} - -/* Common */ -pre { margin: 0; } - -h2 { font-size: 120%; border-bottom: 1px solid #999; } -h2 a { color: #000; } -h3 { - margin-top: -.7em; - font-size: 100%; -} - -/* log and tags tables */ -.bigtable { - border-bottom: 1px solid #999; - border-collapse: collapse; - font-size: 90%; - width: 100%; - font-weight: normal; - text-align: left; -} - -.bigtable td { - vertical-align: top; -} - -.bigtable th { - padding: 1px 4px; - border-bottom: 1px solid #999; -} -.bigtable tr { border: none; } -.bigtable .age { width: 6em; } -.bigtable .author { width: 12em; } -.bigtable .description { } -.bigtable .node { width: 5em; font-family: monospace;} -.bigtable .lineno { width: 2em; text-align: right;} -.bigtable .lineno a { color: #999; font-size: smaller; font-family: monospace;} -.bigtable .permissions { width: 8em; text-align: left;} -.bigtable .size { width: 5em; text-align: right; } -.bigtable .annotate { text-align: right; } -.bigtable td.annotate { font-size: smaller; } -.bigtable td.source { font-size: inherit; } - -.source, .sourcefirst, .sourcelast { - font-family: monospace; - white-space: pre; - padding: 1px 4px; - font-size: 90%; -} -.sourcefirst { border-bottom: 1px solid #999; font-weight: bold; } -.sourcelast { border-top: 1px solid #999; } -.source a { color: #999; font-size: smaller; font-family: monospace;} -.bottomline { border-bottom: 1px solid #999; } - -.fileline { font-family: monospace; } -.fileline img { border: 0; } - -.tagEntry .closed { color: #99f; } - -/* Changeset entry */ -#changesetEntry { - border-collapse: collapse; - font-size: 90%; - width: 100%; - margin-bottom: 1em; -} - -#changesetEntry th { - padding: 1px 4px; - width: 4em; - text-align: right; - font-weight: normal; - color: #999; - margin-right: .5em; - vertical-align: top; -} - -div.description { - border-left: 3px solid #999; - margin: 1em 0 1em 0; - padding: .3em; -} - -/* Graph */ -div#wrapper { - position: relative; - border-top: 1px solid black; - border-bottom: 1px solid black; - margin: 0; - padding: 0; -} - -canvas { - position: absolute; - z-index: 5; - top: -0.7em; - margin: 0; -} - -ul#graphnodes { - position: absolute; - z-index: 10; - top: -1.0em; - list-style: none inside none; - padding: 0; -} - -ul#nodebgs { - list-style: none inside none; - padding: 0; - margin: 0; - top: -0.7em; -} - -ul#graphnodes li, ul#nodebgs li { - height: 39px; -} - -ul#graphnodes li .info { - display: block; - font-size: 70%; - position: relative; - top: -3px; -}
--- a/mercurial-tests/testData/bin/Templates/static/style-gitweb.css Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; } -a { color:#0000cc; } -a:hover, a:visited, a:active { color:#880000; } -div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; } -div.page_header a:visited { color:#0000cc; } -div.page_header a:hover { color:#880000; } -div.page_nav { padding:8px; } -div.page_nav a:visited { color:#0000cc; } -div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px} -div.page_footer { padding:4px 8px; background-color: #d9d8d1; } -div.page_footer_text { float:left; color:#555555; font-style:italic; } -div.page_body { padding:8px; } -div.title, a.title { - display:block; padding:6px 8px; - font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000; -} -a.title:hover { background-color: #d9d8d1; } -div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; } -div.log_body { padding:8px 8px 8px 150px; } -.age { white-space:nowrap; } -span.age { position:relative; float:left; width:142px; font-style:italic; } -div.log_link { - padding:0px 8px; - font-size:10px; font-family:sans-serif; font-style:normal; - position:relative; float:left; width:136px; -} -div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; } -a.list { text-decoration:none; color:#000000; } -a.list:hover { text-decoration:underline; color:#880000; } -table { padding:8px 4px; } -th { padding:2px 5px; font-size:12px; text-align:left; } -tr.light:hover, .parity0:hover { background-color:#edece6; } -tr.dark, .parity1 { background-color:#f6f6f0; } -tr.dark:hover, .parity1:hover { background-color:#edece6; } -td { padding:2px 5px; font-size:12px; vertical-align:top; } -td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; } -td.indexlinks { white-space: nowrap; } -td.indexlinks a { - padding: 2px 5px; line-height: 10px; - border: 1px solid; - color: #ffffff; background-color: #7777bb; - border-color: #aaaadd #333366 #333366 #aaaadd; - font-weight: bold; text-align: center; text-decoration: none; - font-size: 10px; -} -td.indexlinks a:hover { background-color: #6666aa; } -div.pre { font-family:monospace; font-size:12px; white-space:pre; } -div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; } -div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; } -div.search { margin:4px 8px; position:absolute; top:56px; right:12px } -.linenr { color:#999999; text-decoration:none } -div.rss_logo { float: right; white-space: nowrap; } -div.rss_logo a { - padding:3px 6px; line-height:10px; - border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e; - color:#ffffff; background-color:#ff6600; - font-weight:bold; font-family:sans-serif; font-size:10px; - text-align:center; text-decoration:none; -} -div.rss_logo a:hover { background-color:#ee5500; } -pre { margin: 0; } -span.logtags span { - padding: 0px 4px; - font-size: 10px; - font-weight: normal; - border: 1px solid; - background-color: #ffaaff; - border-color: #ffccff #ff00ee #ff00ee #ffccff; -} -span.logtags span.tagtag { - background-color: #ffffaa; - border-color: #ffffcc #ffee00 #ffee00 #ffffcc; -} -span.logtags span.branchtag { - background-color: #aaffaa; - border-color: #ccffcc #00cc33 #00cc33 #ccffcc; -} -span.logtags span.inbranchtag { - background-color: #d5dde6; - border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4; -} - -/* Graph */ -div#wrapper { - position: relative; - margin: 0; - padding: 0; - margin-top: 3px; -} - -canvas { - position: absolute; - z-index: 5; - top: -0.9em; - margin: 0; -} - -ul#nodebgs { - list-style: none inside none; - padding: 0; - margin: 0; - top: -0.7em; -} - -ul#graphnodes li, ul#nodebgs li { - height: 39px; -} - -ul#graphnodes { - position: absolute; - z-index: 10; - top: -0.8em; - list-style: none inside none; - padding: 0; -} - -ul#graphnodes li .info { - display: block; - font-size: 100%; - position: relative; - top: -3px; - font-style: italic; -}
--- a/mercurial-tests/testData/bin/Templates/static/style-monoblue.css Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,472 +0,0 @@ -/*** Initial Settings ***/ -* { - margin: 0; - padding: 0; - font-weight: normal; - font-style: normal; -} - -html { - font-size: 100%; - font-family: sans-serif; -} - -body { - font-size: 77%; - margin: 15px 50px; - background: #4B4B4C; -} - -a { - color:#0000cc; - text-decoration: none; -} -/*** end of Initial Settings ***/ - - -/** common settings **/ -div#container { - background: #FFFFFF; - position: relative; - color: #666; -} - -div.page-header { - padding: 50px 20px 0; - background: #006699 top left repeat-x; - position: relative; -} - div.page-header h1 { - margin: 10px 0 30px; - font-size: 1.8em; - font-weight: bold; - font-family: osaka,'MS P Gothic', Georgia, serif; - letter-spacing: 1px; - color: #DDD; - } - div.page-header h1 a { - font-weight: bold; - color: #FFF; - } - div.page-header a { - text-decoration: none; - } - - div.page-header form { - position: absolute; - margin-bottom: 2px; - bottom: 0; - right: 20px; - } - div.page-header form label { - color: #DDD; - } - div.page-header form input { - padding: 2px; - border: solid 1px #DDD; - } - div.page-header form dl { - overflow: hidden; - } - div.page-header form dl dt { - font-size: 1.2em; - } - div.page-header form dl dt, - div.page-header form dl dd { - margin: 0 0 0 5px; - float: left; - height: 24px; - line-height: 20px; - } - - ul.page-nav { - margin: 10px 0 0 0; - list-style-type: none; - overflow: hidden; - width: 800px; - } - ul.page-nav li { - margin: 0 2px 0 0; - float: left; - width: 80px; - height: 24px; - font-size: 1.1em; - line-height: 24px; - text-align: center; - } - ul.page-nav li.current { - background: #FFF; - } - ul.page-nav li a { - height: 24px; - color: #666; - background: #DDD; - display: block; - text-decoration: none; - } - ul.page-nav li a:hover { - color:#333; - background: #FFF; - } - -ul.submenu { - margin: 10px 0 -10px 20px; - list-style-type: none; -} -ul.submenu li { - margin: 0 10px 0 0; - font-size: 1.2em; - display: inline; -} - -h2 { - margin: 20px 0 10px; - height: 30px; - line-height: 30px; - text-indent: 20px; - background: #FFF; - font-size: 1.2em; - border-top: dotted 1px #D5E1E6; - font-weight: bold; -} -h2.no-link { - color:#006699; -} -h2.no-border { - color: #FFF; - background: #006699; - border: 0; -} -h2 a { - font-weight:bold; - color:#006699; -} - -div.page-path { - text-align: right; - padding: 20px 30px 10px 0; - border:solid #d9d8d1; - border-width:0px 0px 1px; - font-size: 1.2em; -} - -div.page-footer { - margin: 50px 0 0; - position: relative; -} - div.page-footer p { - position: relative; - left: 20px; - bottom: 5px; - font-size: 1.2em; - } - - ul.rss-logo { - position: absolute; - top: -10px; - right: 20px; - height: 20px; - list-style-type: none; - } - ul.rss-logo li { - display: inline; - } - ul.rss-logo li a { - padding: 3px 6px; - line-height: 10px; - border:1px solid; - border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e; - color:#ffffff; - background-color:#ff6600; - font-weight:bold; - font-family:sans-serif; - font-size:10px; - text-align:center; - text-decoration:none; - } - div.rss-logo li a:hover { - background-color:#ee5500; - } - -p.normal { - margin: 20px 0 20px 30px; - font-size: 1.2em; -} - -table { - margin: 10px 0 0 20px; - width: 95%; - border-collapse: collapse; -} -table tr td { - font-size: 1.1em; -} -table tr td.nowrap { - white-space: nowrap; -} -/* -table tr.parity0:hover, -table tr.parity1:hover { - background: #D5E1E6; -} -*/ -table tr.parity0 { - background: #F1F6F7; -} -table tr.parity1 { - background: #FFFFFF; -} -table tr td { - padding: 5px 5px; -} -table.annotated tr td { - padding: 0px 5px; -} - -span.logtags span { - padding: 2px 6px; - font-weight: normal; - font-size: 11px; - border: 1px solid; - background-color: #ffaaff; - border-color: #ffccff #ff00ee #ff00ee #ffccff; -} -span.logtags span.tagtag { - background-color: #ffffaa; - border-color: #ffffcc #ffee00 #ffee00 #ffffcc; -} -span.logtags span.branchtag { - background-color: #aaffaa; - border-color: #ccffcc #00cc33 #00cc33 #ccffcc; -} -span.logtags span.inbranchtag { - background-color: #d5dde6; - border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4; -} - -div.diff pre { - margin: 10px 0 0 0; -} -div.diff pre span { - font-family: monospace; - white-space: pre; - font-size: 1.2em; - padding: 3px 0; -} -td.source { - white-space: pre; - font-family: monospace; - margin: 10px 30px 0; - font-size: 1.2em; - font-family: monospace; -} - div.source div.parity0, - div.source div.parity1 { - padding: 1px; - font-size: 1.2em; - } - div.source div.parity0 { - background: #F1F6F7; - } - div.source div.parity1 { - background: #FFFFFF; - } -div.parity0:hover, -div.parity1:hover { - background: #D5E1E6; -} -.linenr { - color: #999; - text-align: right; -} -.lineno { - text-align: right; -} -.lineno a { - color: #999; -} -td.linenr { - width: 60px; -} - -div#powered-by { - position: absolute; - width: 75px; - top: 15px; - right: 20px; - font-size: 1.2em; -} -div#powered-by a { - color: #EEE; - text-decoration: none; -} -div#powered-by a:hover { - text-decoration: underline; -} -/* -div#monoblue-corner-top-left { - position: absolute; - top: 0; - left: 0; - width: 10px; - height: 10px; - background: url(./monoblue-corner.png) top left no-repeat !important; - background: none; -} -div#monoblue-corner-top-right { - position: absolute; - top: 0; - right: 0; - width: 10px; - height: 10px; - background: url(./monoblue-corner.png) top right no-repeat !important; - background: none; -} -div#monoblue-corner-bottom-left { - position: absolute; - bottom: 0; - left: 0; - width: 10px; - height: 10px; - background: url(./monoblue-corner.png) bottom left no-repeat !important; - background: none; -} -div#monoblue-corner-bottom-right { - position: absolute; - bottom: 0; - right: 0; - width: 10px; - height: 10px; - background: url(./monoblue-corner.png) bottom right no-repeat !important; - background: none; -} -*/ -/** end of common settings **/ - -/** summary **/ -dl.overview { - margin: 0 0 0 30px; - font-size: 1.1em; - overflow: hidden; -} - dl.overview dt, - dl.overview dd { - margin: 5px 0; - float: left; - } - dl.overview dt { - clear: left; - font-weight: bold; - width: 150px; - } -/** end of summary **/ - -/** chagelog **/ -h3.changelog { - margin: 20px 0 5px 30px; - padding: 0 0 2px; - font-size: 1.4em; - border-bottom: dotted 1px #D5E1E6; -} -ul.changelog-entry { - margin: 0 0 10px 30px; - list-style-type: none; - position: relative; -} -ul.changelog-entry li span.revdate { - font-size: 1.1em; -} -ul.changelog-entry li.age { - position: absolute; - top: -25px; - right: 10px; - font-size: 1.4em; - color: #CCC; - font-weight: bold; - font-style: italic; -} -ul.changelog-entry li span.name { - font-size: 1.2em; - font-weight: bold; -} -ul.changelog-entry li.description { - margin: 10px 0 0; - font-size: 1.1em; -} -/** end of changelog **/ - -/** file **/ -p.files { - margin: 0 0 0 20px; - font-size: 2.0em; - font-weight: bold; -} -/** end of file **/ - -/** changeset **/ -h3.changeset { - margin: 20px 0 5px 20px; - padding: 0 0 2px; - font-size: 1.6em; - border-bottom: dotted 1px #D5E1E6; -} -p.changeset-age { - position: relative; -} -p.changeset-age span { - position: absolute; - top: -25px; - right: 10px; - font-size: 1.4em; - color: #CCC; - font-weight: bold; - font-style: italic; -} -p.description { - margin: 10px 30px 0 30px; - padding: 10px; - border: solid 1px #CCC; - font-size: 1.2em; -} -/** end of changeset **/ - -/** canvas **/ -div#wrapper { - position: relative; - font-size: 1.2em; -} - -canvas { - position: absolute; - z-index: 5; - top: -0.7em; -} - -ul#nodebgs li.parity0 { - background: #F1F6F7; -} - -ul#nodebgs li.parity1 { - background: #FFFFFF; -} - -ul#graphnodes { - position: absolute; - z-index: 10; - top: 7px; - list-style: none inside none; -} - -ul#nodebgs { - list-style: none inside none; -} - -ul#graphnodes li, ul#nodebgs li { - height: 39px; -} - -ul#graphnodes li .info { - display: block; - position: relative; -} -/** end of canvas **/
--- a/mercurial-tests/testData/bin/Templates/static/style-paper.css Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,254 +0,0 @@ -body { - margin: 0; - padding: 0; - background: white; - font-family: sans-serif; -} - -.container { - padding-left: 115px; -} - -.main { - position: relative; - background: white; - padding: 2em 2em 2em 0; -} - -#.main { - width: 98%; -} - -.overflow { - width: 100%; - overflow: auto; -} - -.menu { - width: 90px; - margin: 0; - font-size: 80%; - text-align: left; - position: absolute; - top: 20px; - left: 20px; - right: auto; -} - -.menu ul { - list-style: none; - padding: 0; - margin: 10px 0 0 0; - border-left: 2px solid #999; -} - -.menu li { - margin-bottom: 3px; - padding: 2px 4px; - background: white; - color: black; - font-weight: normal; -} - -.menu li.active { - font-weight: bold; -} - -.menu img { - width: 75px; - height: 90px; - border: 0; -} - -.menu a { color: black; display: block; } - -.search { - position: absolute; - top: .7em; - right: 2em; -} - -form.search div#hint { - display: none; - position: absolute; - top: 40px; - right: 0px; - width: 190px; - padding: 5px; - background: #ffc; - font-size: 70%; - border: 1px solid yellow; - -moz-border-radius: 5px; /* this works only in camino/firefox */ - -webkit-border-radius: 5px; /* this is just for Safari */ -} - -form.search:hover div#hint { display: block; } - -a { text-decoration:none; } -.age { white-space:nowrap; } -.date { white-space:nowrap; } -.indexlinks { white-space:nowrap; } -.parity0 { background-color: #f0f0f0; } -.parity1 { background-color: white; } -.plusline { color: green; } -.minusline { color: #dc143c; } /* crimson */ -.atline { color: purple; } - -.navigate { - text-align: right; - font-size: 60%; - margin: 1em 0; -} - -.tag { - color: #999; - font-size: 70%; - font-weight: normal; - margin-left: .5em; - vertical-align: baseline; -} - -.branchhead { - color: #000; - font-size: 80%; - font-weight: normal; - margin-left: .5em; - vertical-align: baseline; -} - -ul#graphnodes .branchhead { - font-size: 75%; -} - -.branchname { - color: #000; - font-size: 60%; - font-weight: normal; - margin-left: .5em; - vertical-align: baseline; -} - -h3 .branchname { - font-size: 80%; -} - -/* Common */ -pre { margin: 0; } - -h2 { font-size: 120%; border-bottom: 1px solid #999; } -h2 a { color: #000; } -h3 { - margin-top: -.7em; - font-size: 100%; -} - -/* log and tags tables */ -.bigtable { - border-bottom: 1px solid #999; - border-collapse: collapse; - font-size: 90%; - width: 100%; - font-weight: normal; - text-align: left; -} - -.bigtable td { - vertical-align: top; -} - -.bigtable th { - padding: 1px 4px; - border-bottom: 1px solid #999; -} -.bigtable tr { border: none; } -.bigtable .age { width: 7em; } -.bigtable .author { width: 12em; } -.bigtable .description { } -.bigtable .node { width: 5em; font-family: monospace;} -.bigtable .permissions { width: 8em; text-align: left;} -.bigtable .size { width: 5em; text-align: right; } -.bigtable .annotate { text-align: right; } -.bigtable td.annotate { font-size: smaller; } -.bigtable td.source { font-size: inherit; } - -.source, .sourcefirst, .sourcelast { - font-family: monospace; - white-space: pre; - padding: 1px 4px; - font-size: 90%; -} -.sourcefirst { border-bottom: 1px solid #999; font-weight: bold; } -.sourcelast { border-top: 1px solid #999; } -.source a { color: #999; font-size: smaller; font-family: monospace;} -.bottomline { border-bottom: 1px solid #999; } - -.fileline { font-family: monospace; } -.fileline img { border: 0; } - -.tagEntry .closed { color: #99f; } - -/* Changeset entry */ -#changesetEntry { - border-collapse: collapse; - font-size: 90%; - width: 100%; - margin-bottom: 1em; -} - -#changesetEntry th { - padding: 1px 4px; - width: 4em; - text-align: right; - font-weight: normal; - color: #999; - margin-right: .5em; - vertical-align: top; -} - -div.description { - border-left: 2px solid #999; - margin: 1em 0 1em 0; - padding: .3em; -} - -/* Graph */ -div#wrapper { - position: relative; - border-top: 1px solid black; - border-bottom: 1px solid black; - margin: 0; - padding: 0; -} - -canvas { - position: absolute; - z-index: 5; - top: -0.7em; - margin: 0; -} - -ul#graphnodes { - position: absolute; - z-index: 10; - top: -1.0em; - list-style: none inside none; - padding: 0; -} - -ul#nodebgs { - list-style: none inside none; - padding: 0; - margin: 0; - top: -0.7em; -} - -ul#graphnodes li, ul#nodebgs li { - height: 39px; -} - -ul#graphnodes li .info { - display: block; - font-size: 70%; - position: relative; - top: -3px; -}
--- a/mercurial-tests/testData/bin/Templates/static/style.css Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -a { text-decoration:none; } -.age { white-space:nowrap; } -.date { white-space:nowrap; } -.indexlinks { white-space:nowrap; } -.parity0 { background-color: #ddd; } -.parity1 { background-color: #eee; } -.lineno { width: 60px; color: #aaa; font-size: smaller; - text-align: right; } -.plusline { color: green; } -.minusline { color: red; } -.atline { color: purple; } -.annotate { font-size: smaller; text-align: right; padding-right: 1em; } -.buttons a { - background-color: #666; - padding: 2pt; - color: white; - font-family: sans; - font-weight: bold; -} -.navigate a { - background-color: #ccc; - padding: 2pt; - font-family: sans; - color: black; -} - -.metatag { - background-color: #888; - color: white; - text-align: right; -} - -/* Common */ -pre { margin: 0; } - -.logo { - float: right; - clear: right; -} - -/* Changelog/Filelog entries */ -.logEntry { width: 100%; } -.logEntry .age { width: 15%; } -.logEntry th { font-weight: normal; text-align: right; vertical-align: top; } -.logEntry th.age, .logEntry th.firstline { font-weight: bold; } -.logEntry th.firstline { text-align: left; width: inherit; } - -/* Shortlog entries */ -.slogEntry { width: 100%; } -.slogEntry .age { width: 8em; } -.slogEntry td { font-weight: normal; text-align: left; vertical-align: top; } -.slogEntry td.author { width: 15em; } - -/* Tag entries */ -#tagEntries { list-style: none; margin: 0; padding: 0; } -#tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; } - -/* Changeset entry */ -#changesetEntry { } -#changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; } -#changesetEntry th.files, #changesetEntry th.description { vertical-align: top; } - -/* File diff view */ -#filediffEntry { } -#filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; } - -/* Graph */ -div#wrapper { - position: relative; - margin: 0; - padding: 0; -} - -canvas { - position: absolute; - z-index: 5; - top: -0.6em; - margin: 0; -} - -ul#nodebgs { - list-style: none inside none; - padding: 0; - margin: 0; - top: -0.7em; -} - -ul#graphnodes li, ul#nodebgs li { - height: 39px; -} - -ul#graphnodes { - position: absolute; - z-index: 10; - top: -0.85em; - list-style: none inside none; - padding: 0; -} - -ul#graphnodes li .info { - display: block; - font-size: 70%; - position: relative; - top: -1px; -}
--- a/mercurial-tests/testData/bin/Templates/tags.tmpl Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -#header# -<title>#repo|escape#: tags</title> -<link rel="alternate" type="application/atom+xml" - href="#url#atom-tags" title="Atom feed for #repo|escape#: tags"> -<link rel="alternate" type="application/rss+xml" - href="#url#rss-tags" title="RSS feed for #repo|escape#: tags"> -</head> -<body> - -<div class="buttons"> -<a href="#url#log{sessionvars%urlparameter}">changelog</a> -<a href="#url#shortlog{sessionvars%urlparameter}">shortlog</a> -<a href="#url#file/#node|short#/{sessionvars%urlparameter}">files</a> -<a type="application/rss+xml" href="#url#rss-tags">rss</a> -<a type="application/atom+xml" href="#url#atom-tags">atom</a> -</div> - -<h2>tags:</h2> - -<ul id="tagEntries"> -#entries%tagentry# -</ul> - -#footer#
--- a/mercurial-tests/testData/bin/Templates/template-vars.txt Fri Aug 19 15:21:38 2011 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -repo the name of the repo -rev a changeset.manifest revision -node a changeset node -changesets total number of changesets -file a filename -filerev a file revision -filerevs total number of file revisions -up the directory of the relevant file -path a path in the manifest, starting with "/" -basename a short pathname -date a date string -age age in hours, days, etc -line a line of text (escaped) -desc a description (escaped, with breaks) -shortdesc a short description (escaped) -author a name or email addressv(obfuscated) -parent a list of the parent -child a list of the children -tags a list of tag - -header the global page header -footer the global page footer - -files a list of file links -file_copies a list of pairs of name, source filenames -dirs a set of directory links -diff a diff of one or more files -annotate an annotated file -entries the entries relevant to the page - -Templates and commands: - changelog(rev) - a page for browsing changesets - naventry - a link for jumping to a changeset number - filenodelink - jump to file diff - fileellipses - printed after maxfiles - changelogentry - an entry in the log - manifest - browse a manifest as a directory tree
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/contrib/bash_completion Wed Sep 07 19:58:38 2011 +0400 @@ -0,0 +1,573 @@ +# bash completion for the Mercurial distributed SCM + +# Docs: +# +# If you source this file from your .bashrc, bash should be able to +# complete a command line that uses hg with all the available commands +# and options and sometimes even arguments. +# +# Mercurial allows you to define additional commands through extensions. +# Bash should be able to automatically figure out the name of these new +# commands and their options. See below for how to define _hg_opt_foo +# and _hg_cmd_foo functions to fine-tune the completion for option and +# non-option arguments, respectively. +# +# +# Notes about completion for specific commands: +# +# - the completion function for the email command from the patchbomb +# extension will try to call _hg_emails to get a list of e-mail +# addresses. It's up to the user to define this function. For +# example, put the addresses of the lists that you usually patchbomb +# in ~/.patchbomb-to and the addresses that you usually use to send +# the patchbombs in ~/.patchbomb-from and use something like this: +# +# _hg_emails() +# { +# if [ -r ~/.patchbomb-$1 ]; then +# cat ~/.patchbomb-$1 +# fi +# } +# +# +# Writing completion functions for additional commands: +# +# If it exists, the function _hg_cmd_foo will be called without +# arguments to generate the completion candidates for the hg command +# "foo". If the command receives some arguments that aren't options +# even though they start with a "-", you can define a function called +# _hg_opt_foo to generate the completion candidates. If _hg_opt_foo +# doesn't return 0, regular completion for options is attempted. +# +# In addition to the regular completion variables provided by bash, +# the following variables are also set: +# - $hg - the hg program being used (e.g. /usr/bin/hg) +# - $cmd - the name of the hg command being completed +# - $cmd_index - the index of $cmd in $COMP_WORDS +# - $cur - the current argument being completed +# - $prev - the argument before $cur +# - $global_args - "|"-separated list of global options that accept +# an argument (e.g. '--cwd|-R|--repository') +# - $canonical - 1 if we canonicalized $cmd before calling the function +# 0 otherwise +# + +shopt -s extglob + +_hg_commands() +{ + local commands + commands="$("$hg" debugcomplete "$cur" 2>/dev/null)" || commands="" + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$commands' -- "$cur")) +} + +_hg_paths() +{ + local paths="$("$hg" paths 2>/dev/null | sed -e 's/ = .*$//')" + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$paths' -- "$cur")) +} + +_hg_repos() +{ + local i + for i in $(compgen -d -- "$cur"); do + test ! -d "$i"/.hg || COMPREPLY=(${COMPREPLY[@]:-} "$i") + done +} + +_hg_status() +{ + local files="$("$hg" status -n$1 . 2>/dev/null)" + local IFS=$'\n' + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) +} + +_hg_tags() +{ + local tags="$("$hg" tags -q 2>/dev/null)" + local IFS=$'\n' + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$tags' -- "$cur")) +} + +_hg_branches() +{ + local branches="$("$hg" branches -q 2>/dev/null)" + local IFS=$'\n' + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$branches' -- "$cur")) +} + +# this is "kind of" ugly... +_hg_count_non_option() +{ + local i count=0 + local filters="$1" + + for ((i=1; $i<=$COMP_CWORD; i++)); do + if [[ "${COMP_WORDS[i]}" != -* ]]; then + if [[ ${COMP_WORDS[i-1]} == @($filters|$global_args) ]]; then + continue + fi + count=$(($count + 1)) + fi + done + + echo $(($count - 1)) +} + +_hg() +{ + local cur prev cmd cmd_index opts i + # global options that receive an argument + local global_args='--cwd|-R|--repository' + local hg="$1" + local canonical=0 + + COMPREPLY=() + cur="$2" + prev="$3" + + # searching for the command + # (first non-option argument that doesn't follow a global option that + # receives an argument) + for ((i=1; $i<=$COMP_CWORD; i++)); do + if [[ ${COMP_WORDS[i]} != -* ]]; then + if [[ ${COMP_WORDS[i-1]} != @($global_args) ]]; then + cmd="${COMP_WORDS[i]}" + cmd_index=$i + break + fi + fi + done + + if [[ "$cur" == -* ]]; then + if [ "$(type -t "_hg_opt_$cmd")" = function ] && "_hg_opt_$cmd"; then + return + fi + + opts=$("$hg" debugcomplete --options "$cmd" 2>/dev/null) + + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$opts' -- "$cur")) + return + fi + + # global options + case "$prev" in + -R|--repository) + _hg_paths + _hg_repos + return + ;; + --cwd) + # Stick with default bash completion + return + ;; + esac + + if [ -z "$cmd" ] || [ $COMP_CWORD -eq $i ]; then + _hg_commands + return + fi + + # try to generate completion candidates for whatever command the user typed + local help + if _hg_command_specific; then + return + fi + + # canonicalize the command name and try again + help=$("$hg" help "$cmd" 2>/dev/null) + if [ $? -ne 0 ]; then + # Probably either the command doesn't exist or it's ambiguous + return + fi + cmd=${help#hg } + cmd=${cmd%%[$' \n']*} + canonical=1 + _hg_command_specific +} + +_hg_command_specific() +{ + if [ "$(type -t "_hg_cmd_$cmd")" = function ]; then + "_hg_cmd_$cmd" + return 0 + fi + + if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" == --rev ]; then + if [ $canonical = 1 ]; then + _hg_tags + _hg_branches + return 0 + elif [[ status != "$cmd"* ]]; then + _hg_tags + _hg_branches + return 0 + else + return 1 + fi + fi + + case "$cmd" in + help) + _hg_commands + ;; + export) + if _hg_ext_mq_patchlist qapplied && [ "${COMPREPLY[*]}" ]; then + return 0 + fi + _hg_tags + _hg_branches + ;; + manifest|update) + _hg_tags + _hg_branches + ;; + pull|push|outgoing|incoming) + _hg_paths + _hg_repos + ;; + paths) + _hg_paths + ;; + add) + _hg_status "u" + ;; + merge) + _hg_tags + _hg_branches + ;; + commit) + _hg_status "mar" + ;; + remove) + _hg_status "d" + ;; + forget) + _hg_status "a" + ;; + diff) + _hg_status "mar" + ;; + revert) + _hg_status "mard" + ;; + clone) + local count=$(_hg_count_non_option) + if [ $count = 1 ]; then + _hg_paths + fi + _hg_repos + ;; + debugindex|debugindexdot) + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -f -X "!*.i" -- "$cur")) + ;; + debugdata) + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -f -X "!*.d" -- "$cur")) + ;; + *) + return 1 + ;; + esac + + return 0 +} + +complete -o bashdefault -o default -F _hg hg 2>/dev/null \ + || complete -o default -F _hg hg + + +# Completion for commands provided by extensions + +# bookmarks +_hg_bookmarks() +{ + local bookmarks="$("$hg" bookmarks --quiet 2>/dev/null )" + local IFS=$'\n' + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$bookmarks' -- "$cur")) +} + +_hg_cmd_bookmarks() +{ + if [[ "$prev" = @(-d|--delete|-m|--rename) ]]; then + _hg_bookmarks + return + fi +} + +# mq +_hg_ext_mq_patchlist() +{ + local patches + patches=$("$hg" $1 2>/dev/null) + if [ $? -eq 0 ] && [ "$patches" ]; then + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$patches' -- "$cur")) + return 0 + fi + return 1 +} + +_hg_ext_mq_queues() +{ + local root=$("$hg" root 2>/dev/null) + local n + for n in $(cd "$root"/.hg && compgen -d -- "$cur"); do + # I think we're usually not interested in the regular "patches" queue + # so just filter it. + if [ "$n" != patches ] && [ -e "$root/.hg/$n/series" ]; then + COMPREPLY=(${COMPREPLY[@]:-} "$n") + fi + done +} + +_hg_cmd_qpop() +{ + if [[ "$prev" = @(-n|--name) ]]; then + _hg_ext_mq_queues + return + fi + _hg_ext_mq_patchlist qapplied +} + +_hg_cmd_qpush() +{ + if [[ "$prev" = @(-n|--name) ]]; then + _hg_ext_mq_queues + return + fi + _hg_ext_mq_patchlist qunapplied +} + +_hg_cmd_qgoto() +{ + if [[ "$prev" = @(-n|--name) ]]; then + _hg_ext_mq_queues + return + fi + _hg_ext_mq_patchlist qseries +} + +_hg_cmd_qdelete() +{ + local qcmd=qunapplied + if [[ "$prev" = @(-r|--rev) ]]; then + qcmd=qapplied + fi + _hg_ext_mq_patchlist $qcmd +} + +_hg_cmd_qfinish() +{ + if [[ "$prev" = @(-a|--applied) ]]; then + return + fi + _hg_ext_mq_patchlist qapplied +} + +_hg_cmd_qsave() +{ + if [[ "$prev" = @(-n|--name) ]]; then + _hg_ext_mq_queues + return + fi +} + +_hg_cmd_strip() +{ + _hg_tags + _hg_branches +} + +_hg_cmd_qcommit() +{ + local root=$("$hg" root 2>/dev/null) + # this is run in a sub-shell, so we can't use _hg_status + local files=$(cd "$root/.hg/patches" 2>/dev/null && + "$hg" status -nmar 2>/dev/null) + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) +} + +_hg_cmd_qfold() +{ + _hg_ext_mq_patchlist qunapplied +} + +_hg_cmd_qrename() +{ + _hg_ext_mq_patchlist qseries +} + +_hg_cmd_qheader() +{ + _hg_ext_mq_patchlist qseries +} + +_hg_cmd_qclone() +{ + local count=$(_hg_count_non_option) + if [ $count = 1 ]; then + _hg_paths + fi + _hg_repos +} + +_hg_ext_mq_guards() +{ + "$hg" qselect --series 2>/dev/null | sed -e 's/^.//' +} + +_hg_cmd_qselect() +{ + local guards=$(_hg_ext_mq_guards) + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$guards' -- "$cur")) +} + +_hg_cmd_qguard() +{ + local prefix='' + + if [[ "$cur" == +* ]]; then + prefix=+ + elif [[ "$cur" == -* ]]; then + prefix=- + fi + local ncur=${cur#[-+]} + + if ! [ "$prefix" ]; then + _hg_ext_mq_patchlist qseries + return + fi + + local guards=$(_hg_ext_mq_guards) + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -P $prefix -W '$guards' -- "$ncur")) +} + +_hg_opt_qguard() +{ + local i + for ((i=cmd_index+1; i<=COMP_CWORD; i++)); do + if [[ ${COMP_WORDS[i]} != -* ]]; then + if [[ ${COMP_WORDS[i-1]} != @($global_args) ]]; then + _hg_cmd_qguard + return 0 + fi + elif [ "${COMP_WORDS[i]}" = -- ]; then + _hg_cmd_qguard + return 0 + fi + done + return 1 +} + + +# hbisect +_hg_cmd_bisect() +{ + local i subcmd + + # find the sub-command + for ((i=cmd_index+1; i<=COMP_CWORD; i++)); do + if [[ ${COMP_WORDS[i]} != -* ]]; then + if [[ ${COMP_WORDS[i-1]} != @($global_args) ]]; then + subcmd="${COMP_WORDS[i]}" + break + fi + fi + done + + if [ -z "$subcmd" ] || [ $COMP_CWORD -eq $i ] || [ "$subcmd" = help ]; then + COMPREPLY=(${COMPREPLY[@]:-} + $(compgen -W 'bad good help init next reset' -- "$cur")) + return + fi + + case "$subcmd" in + good|bad) + _hg_tags + _hg_branches + ;; + esac + + return +} + + +# patchbomb +_hg_cmd_email() +{ + case "$prev" in + -c|--cc|-t|--to|-f|--from|--bcc) + # we need an e-mail address. let the user provide a function + # to get them + if [ "$(type -t _hg_emails)" = function ]; then + local arg=to + if [[ "$prev" == @(-f|--from) ]]; then + arg=from + fi + local addresses=$(_hg_emails $arg) + COMPREPLY=(${COMPREPLY[@]:-} + $(compgen -W '$addresses' -- "$cur")) + fi + return + ;; + -m|--mbox) + # fallback to standard filename completion + return + ;; + -s|--subject) + # free form string + return + ;; + esac + + _hg_tags + _hg_branches + return +} + + +# gpg +_hg_cmd_sign() +{ + _hg_tags + _hg_branches +} + + +# transplant +_hg_cmd_transplant() +{ + case "$prev" in + -s|--source) + _hg_paths + _hg_repos + return + ;; + --filter) + # standard filename completion + return + ;; + esac + + # all other transplant options values and command parameters are revisions + _hg_tags + _hg_branches + return +} + +# shelve +_hg_shelves() +{ + local shelves="$("$hg" unshelve -l . 2>/dev/null)" + local IFS=$'\n' + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$shelves' -- "$cur")) +} + +_hg_cmd_shelve() +{ + _hg_status "mard" +} + +_hg_cmd_unshelve() +{ + _hg_shelves +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/contrib/hgk Wed Sep 07 19:58:38 2011 +0400 @@ -0,0 +1,4001 @@ +#!/usr/bin/env wish + +# Copyright (C) 2005 Paul Mackerras. All rights reserved. +# This program is free software; it may be used, copied, modified +# and distributed under the terms of the GNU General Public Licence, +# either version 2, or (at your option) any later version. +# +# See hgk.py for extension usage and configuration. + + +# Modified version of Tip 171: +# http://www.tcl.tk/cgi-bin/tct/tip/171.html +# +# The in_mousewheel global was added to fix strange reentrancy issues. +# The whole snipped is activated only under windows, mouse wheel +# bindings working already under MacOSX and Linux. + +if {[tk windowingsystem] eq "win32"} { + +set mw_classes [list Text Listbox Table TreeCtrl] + foreach class $mw_classes { bind $class <MouseWheel> {} } + +set in_mousewheel 0 + +proc ::tk::MouseWheel {wFired X Y D {shifted 0}} { + global in_mousewheel + if { $in_mousewheel != 0 } { return } + # Set event to check based on call + set evt "<[expr {$shifted?{Shift-}:{}}]MouseWheel>" + # do not double-fire in case the class already has a binding + if {[bind [winfo class $wFired] $evt] ne ""} { return } + # obtain the window the mouse is over + set w [winfo containing $X $Y] + # if we are outside the app, try and scroll the focus widget + if {![winfo exists $w]} { catch {set w [focus]} } + if {[winfo exists $w]} { + + if {[bind $w $evt] ne ""} { + # Awkward ... this widget has a MouseWheel binding, but to + # trigger successfully in it, we must give it focus. + catch {focus} old + if {$w ne $old} { focus $w } + set in_mousewheel 1 + event generate $w $evt -rootx $X -rooty $Y -delta $D + set in_mousewheel 0 + if {$w ne $old} { focus $old } + return + } + + # aqua and x11/win32 have different delta handling + if {[tk windowingsystem] ne "aqua"} { + set delta [expr {- ($D / 30)}] + } else { + set delta [expr {- ($D)}] + } + # scrollbars have different call conventions + if {[string match "*Scrollbar" [winfo class $w]]} { + catch {tk::ScrollByUnits $w \ + [string index [$w cget -orient] 0] $delta} + } else { + set cmd [list $w [expr {$shifted ? "xview" : "yview"}] \ + scroll $delta units] + # Walking up to find the proper widget (handles cases like + # embedded widgets in a canvas) + while {[catch $cmd] && [winfo toplevel $w] ne $w} { + set w [winfo parent $w] + } + } + } +} + +bind all <MouseWheel> [list ::tk::MouseWheel %W %X %Y %D 0] + +# end of win32 section +} + + +# Unify right mouse button handling. +# See "mouse buttons on macintosh" thread on comp.lang.tcl +if {[tk windowingsystem] eq "aqua"} { + event add <<B3>> <Control-ButtonPress-1> + event add <<B3>> <Button-2> +} else { + event add <<B3>> <Button-3> +} + +proc gitdir {} { + global env + if {[info exists env(GIT_DIR)]} { + return $env(GIT_DIR) + } else { + return ".hg" + } +} + +proc getcommits {rargs} { + global commits commfd phase canv mainfont env + global startmsecs nextupdate ncmupdate + global ctext maincursor textcursor leftover + + # check that we can find a .git directory somewhere... + set gitdir [gitdir] + if {![file isdirectory $gitdir]} { + error_popup "Cannot find the git directory \"$gitdir\"." + exit 1 + } + set commits {} + set phase getcommits + set startmsecs [clock clicks -milliseconds] + set nextupdate [expr $startmsecs + 100] + set ncmupdate 1 + set limit 0 + set revargs {} + for {set i 0} {$i < [llength $rargs]} {incr i} { + set opt [lindex $rargs $i] + if {$opt == "--limit"} { + incr i + set limit [lindex $rargs $i] + } else { + lappend revargs $opt + } + } + if [catch { + set parse_args [concat --default HEAD $revargs] + set parse_temp [eval exec {$env(HG)} --config ui.report_untrusted=false debug-rev-parse $parse_args] + regsub -all "\r\n" $parse_temp "\n" parse_temp + set parsed_args [split $parse_temp "\n"] + } err] { + # if git-rev-parse failed for some reason... + if {$rargs == {}} { + set revargs HEAD + } + set parsed_args $revargs + } + if {$limit > 0} { + set parsed_args [concat -n $limit $parsed_args] + } + if [catch { + set commfd [open "|{$env(HG)} --config ui.report_untrusted=false debug-rev-list --header --topo-order --parents $parsed_args" r] + } err] { + puts stderr "Error executing hg debug-rev-list: $err" + exit 1 + } + set leftover {} + fconfigure $commfd -blocking 0 -translation lf + fileevent $commfd readable [list getcommitlines $commfd] + $canv delete all + $canv create text 3 3 -anchor nw -text "Reading commits..." \ + -font $mainfont -tags textitems + . config -cursor watch + settextcursor watch +} + +proc getcommitlines {commfd} { + global commits parents cdate children + global commitlisted phase commitinfo nextupdate + global stopped redisplaying leftover + + set stuff [read $commfd] + if {$stuff == {}} { + if {![eof $commfd]} return + # set it blocking so we wait for the process to terminate + fconfigure $commfd -blocking 1 + if {![catch {close $commfd} err]} { + after idle finishcommits + return + } + if {[string range $err 0 4] == "usage"} { + set err \ +{Gitk: error reading commits: bad arguments to git-rev-list. +(Note: arguments to gitk are passed to git-rev-list +to allow selection of commits to be displayed.)} + } else { + set err "Error reading commits: $err" + } + error_popup $err + exit 1 + } + set start 0 + while 1 { + set i [string first "\0" $stuff $start] + if {$i < 0} { + append leftover [string range $stuff $start end] + return + } + set cmit [string range $stuff $start [expr {$i - 1}]] + if {$start == 0} { + set cmit "$leftover$cmit" + set leftover {} + } + set start [expr {$i + 1}] + regsub -all "\r\n" $cmit "\n" cmit + set j [string first "\n" $cmit] + set ok 0 + if {$j >= 0} { + set ids [string range $cmit 0 [expr {$j - 1}]] + set ok 1 + foreach id $ids { + if {![regexp {^[0-9a-f]{12}$} $id]} { + set ok 0 + break + } + } + } + if {!$ok} { + set shortcmit $cmit + if {[string length $shortcmit] > 80} { + set shortcmit "[string range $shortcmit 0 80]..." + } + error_popup "Can't parse hg debug-rev-list output: {$shortcmit}" + exit 1 + } + set id [lindex $ids 0] + set olds [lrange $ids 1 end] + set cmit [string range $cmit [expr {$j + 1}] end] + lappend commits $id + set commitlisted($id) 1 + parsecommit $id $cmit 1 [lrange $ids 1 end] + drawcommit $id + if {[clock clicks -milliseconds] >= $nextupdate} { + doupdate 1 + } + while {$redisplaying} { + set redisplaying 0 + if {$stopped == 1} { + set stopped 0 + set phase "getcommits" + foreach id $commits { + drawcommit $id + if {$stopped} break + if {[clock clicks -milliseconds] >= $nextupdate} { + doupdate 1 + } + } + } + } + } +} + +proc doupdate {reading} { + global commfd nextupdate numcommits ncmupdate + + if {$reading} { + fileevent $commfd readable {} + } + update + set nextupdate [expr {[clock clicks -milliseconds] + 100}] + if {$numcommits < 100} { + set ncmupdate [expr {$numcommits + 1}] + } elseif {$numcommits < 10000} { + set ncmupdate [expr {$numcommits + 10}] + } else { + set ncmupdate [expr {$numcommits + 100}] + } + if {$reading} { + fileevent $commfd readable [list getcommitlines $commfd] + } +} + +proc readcommit {id} { + global env + if [catch {set contents [exec $env(HG) --config ui.report_untrusted=false debug-cat-file commit $id]}] return + parsecommit $id $contents 0 {} +} + +proc parsecommit {id contents listed olds} { + global commitinfo children nchildren parents nparents cdate ncleft + global firstparents + + set inhdr 1 + set comment {} + set headline {} + set auname {} + set audate {} + set comname {} + set comdate {} + set rev {} + set branch {} + if {![info exists nchildren($id)]} { + set children($id) {} + set nchildren($id) 0 + set ncleft($id) 0 + } + set parents($id) $olds + set nparents($id) [llength $olds] + foreach p $olds { + if {![info exists nchildren($p)]} { + set children($p) [list $id] + set nchildren($p) 1 + set ncleft($p) 1 + } elseif {[lsearch -exact $children($p) $id] < 0} { + lappend children($p) $id + incr nchildren($p) + incr ncleft($p) + } + } + regsub -all "\r\n" $contents "\n" contents + foreach line [split $contents "\n"] { + if {$inhdr} { + set line [split $line] + if {$line == {}} { + set inhdr 0 + } else { + set tag [lindex $line 0] + if {$tag == "author"} { + set x [expr {[llength $line] - 2}] + set audate [lindex $line $x] + set auname [join [lrange $line 1 [expr {$x - 1}]]] + } elseif {$tag == "committer"} { + set x [expr {[llength $line] - 2}] + set comdate [lindex $line $x] + set comname [join [lrange $line 1 [expr {$x - 1}]]] + } elseif {$tag == "revision"} { + set rev [lindex $line 1] + } elseif {$tag == "branch"} { + set branch [join [lrange $line 1 end]] + } + } + } else { + if {$comment == {}} { + set headline [string trim $line] + } else { + append comment "\n" + } + if {!$listed} { + # git-rev-list indents the comment by 4 spaces; + # if we got this via git-cat-file, add the indentation + append comment " " + } + append comment $line + } + } + if {$audate != {}} { + set audate [clock format $audate -format "%Y-%m-%d %H:%M:%S"] + } + if {$comdate != {}} { + set cdate($id) $comdate + set comdate [clock format $comdate -format "%Y-%m-%d %H:%M:%S"] + } + set commitinfo($id) [list $headline $auname $audate \ + $comname $comdate $comment $rev $branch] + + if {[info exists firstparents]} { + set i [lsearch $firstparents $id] + if {$i != -1} { + # remove the parent from firstparents, possible building + # an empty list + set firstparents [concat \ + [lrange $firstparents 0 [expr $i - 1]] \ + [lrange $firstparents [expr $i + 1] end]] + if {$firstparents eq {}} { + # we have found all parents of the first changeset + # which means that we can safely select the first line + after idle { + selectline 0 0 + } + } + } + } else { + # this is the first changeset, save the parents + set firstparents $olds + if {$firstparents eq {}} { + # a repository with a single changeset + after idle { + selectline 0 0 + } + } + } +} + +proc readrefs {} { + global tagids idtags headids idheads tagcontents env curid + + set status [catch {exec $env(HG) --config ui.report_untrusted=false id} curid] + if { $status != 0 } { + puts $::errorInfo + if { ![string equal $::errorCode NONE] } { + exit 2 + } + } + regexp -- {[[:xdigit:]]+} $curid curid + + set status [catch {exec $env(HG) --config ui.report_untrusted=false tags} tags] + if { $status != 0 } { + puts $::errorInfo + if { ![string equal $::errorCode NONE] } { + exit 2 + } + } + regsub -all "\r\n" $tags "\n" tags + + set lines [split $tags "\n"] + foreach f $lines { + regexp {(\S+)$} $f full + regsub {\s+(\S+)$} $f "" direct + set sha [split $full ':'] + set tag [lindex $sha 1] + lappend tagids($direct) $tag + lappend idtags($tag) $direct + } + + set status [catch {exec $env(HG) --config ui.report_untrusted=false heads} heads] + if { $status != 0 } { + puts $::errorInfo + if { ![string equal $::errorCode NONE] } { + exit 2 + } + } + regsub -all "\r\n" $heads "\n" heads + + set lines [split $heads "\n"] + foreach f $lines { + set match "" + regexp {changeset:\s+(\S+):(\S+)$} $f match id sha + if {$match != ""} { + lappend idheads($sha) $id + } + } + +} + +proc readotherrefs {base dname excl} { + global otherrefids idotherrefs + + set git [gitdir] + set files [glob -nocomplain -types f [file join $git $base *]] + foreach f $files { + catch { + set fd [open $f r] + set line [read $fd 40] + if {[regexp {^[0-9a-f]{12}} $line id]} { + set name "$dname[file tail $f]" + set otherrefids($name) $id + lappend idotherrefs($id) $name + } + close $fd + } + } + set dirs [glob -nocomplain -types d [file join $git $base *]] + foreach d $dirs { + set dir [file tail $d] + if {[lsearch -exact $excl $dir] >= 0} continue + readotherrefs [file join $base $dir] "$dname$dir/" {} + } +} + +proc allcansmousewheel {delta} { + set delta [expr -5*(int($delta)/abs($delta))] + allcanvs yview scroll $delta units +} + +proc error_popup msg { + set w .error + toplevel $w + wm transient $w . + message $w.m -text $msg -justify center -aspect 400 + pack $w.m -side top -fill x -padx 20 -pady 20 + button $w.ok -text OK -command "destroy $w" + pack $w.ok -side bottom -fill x + bind $w <Visibility> "grab $w; focus $w" + tkwait window $w +} + +proc makewindow {} { + global canv canv2 canv3 linespc charspc ctext cflist textfont + global findtype findtypemenu findloc findstring fstring geometry + global entries sha1entry sha1string sha1but + global maincursor textcursor curtextcursor + global rowctxmenu gaudydiff mergemax + global hgvdiff bgcolor fgcolor diffremcolor diffaddcolor diffmerge1color + global diffmerge2color hunksepcolor + + menu .bar + .bar add cascade -label "File" -menu .bar.file + menu .bar.file + .bar.file add command -label "Reread references" -command rereadrefs + .bar.file add command -label "Quit" -command doquit + menu .bar.help + .bar add cascade -label "Help" -menu .bar.help + .bar.help add command -label "About gitk" -command about + . configure -menu .bar + + if {![info exists geometry(canv1)]} { + set geometry(canv1) [expr 45 * $charspc] + set geometry(canv2) [expr 30 * $charspc] + set geometry(canv3) [expr 15 * $charspc] + set geometry(canvh) [expr 25 * $linespc + 4] + set geometry(ctextw) 80 + set geometry(ctexth) 30 + set geometry(cflistw) 30 + } + panedwindow .ctop -orient vertical + if {[info exists geometry(width)]} { + .ctop conf -width $geometry(width) -height $geometry(height) + set texth [expr {$geometry(height) - $geometry(canvh) - 56}] + set geometry(ctexth) [expr {($texth - 8) / + [font metrics $textfont -linespace]}] + } + frame .ctop.top + frame .ctop.top.bar + pack .ctop.top.bar -side bottom -fill x + set cscroll .ctop.top.csb + scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0 + pack $cscroll -side right -fill y + panedwindow .ctop.top.clist -orient horizontal -sashpad 0 -handlesize 4 + pack .ctop.top.clist -side top -fill both -expand 1 + .ctop add .ctop.top + set canv .ctop.top.clist.canv + canvas $canv -height $geometry(canvh) -width $geometry(canv1) \ + -bg $bgcolor -bd 0 \ + -yscrollincr $linespc -yscrollcommand "$cscroll set" -selectbackground grey + .ctop.top.clist add $canv + set canv2 .ctop.top.clist.canv2 + canvas $canv2 -height $geometry(canvh) -width $geometry(canv2) \ + -bg $bgcolor -bd 0 -yscrollincr $linespc -selectbackground grey + .ctop.top.clist add $canv2 + set canv3 .ctop.top.clist.canv3 + canvas $canv3 -height $geometry(canvh) -width $geometry(canv3) \ + -bg $bgcolor -bd 0 -yscrollincr $linespc -selectbackground grey + .ctop.top.clist add $canv3 + bind .ctop.top.clist <Configure> {resizeclistpanes %W %w} + + set sha1entry .ctop.top.bar.sha1 + set entries $sha1entry + set sha1but .ctop.top.bar.sha1label + button $sha1but -text "SHA1 ID: " -state disabled -relief flat \ + -command gotocommit -width 8 + $sha1but conf -disabledforeground [$sha1but cget -foreground] + pack .ctop.top.bar.sha1label -side left + entry $sha1entry -width 40 -font $textfont -textvariable sha1string + trace add variable sha1string write sha1change + pack $sha1entry -side left -pady 2 + + image create bitmap bm-left -data { + #define left_width 16 + #define left_height 16 + static unsigned char left_bits[] = { + 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x00, 0x70, 0x00, 0x38, 0x00, 0x1c, 0x00, + 0x0e, 0x00, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x0e, 0x00, 0x1c, 0x00, + 0x38, 0x00, 0x70, 0x00, 0xe0, 0x00, 0xc0, 0x01}; + } + image create bitmap bm-right -data { + #define right_width 16 + #define right_height 16 + static unsigned char right_bits[] = { + 0x00, 0x00, 0xc0, 0x01, 0x80, 0x03, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x1c, + 0x00, 0x38, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x00, 0x38, 0x00, 0x1c, + 0x00, 0x0e, 0x00, 0x07, 0x80, 0x03, 0xc0, 0x01}; + } + button .ctop.top.bar.leftbut -image bm-left -command goback \ + -state disabled -width 26 + pack .ctop.top.bar.leftbut -side left -fill y + button .ctop.top.bar.rightbut -image bm-right -command goforw \ + -state disabled -width 26 + pack .ctop.top.bar.rightbut -side left -fill y + + button .ctop.top.bar.findbut -text "Find" -command dofind + pack .ctop.top.bar.findbut -side left + set findstring {} + set fstring .ctop.top.bar.findstring + lappend entries $fstring + entry $fstring -width 30 -font $textfont -textvariable findstring + pack $fstring -side left -expand 1 -fill x + set findtype Exact + set findtypemenu [tk_optionMenu .ctop.top.bar.findtype \ + findtype Exact IgnCase Regexp] + set findloc "All fields" + tk_optionMenu .ctop.top.bar.findloc findloc "All fields" Headline \ + Comments Author Committer Files Pickaxe + pack .ctop.top.bar.findloc -side right + pack .ctop.top.bar.findtype -side right + # for making sure type==Exact whenever loc==Pickaxe + trace add variable findloc write findlocchange + + panedwindow .ctop.cdet -orient horizontal + .ctop add .ctop.cdet + frame .ctop.cdet.left + set ctext .ctop.cdet.left.ctext + text $ctext -fg $fgcolor -bg $bgcolor -state disabled -font $textfont \ + -width $geometry(ctextw) -height $geometry(ctexth) \ + -yscrollcommand ".ctop.cdet.left.sb set" \ + -xscrollcommand ".ctop.cdet.left.hb set" -wrap none + scrollbar .ctop.cdet.left.sb -command "$ctext yview" + scrollbar .ctop.cdet.left.hb -orient horizontal -command "$ctext xview" + pack .ctop.cdet.left.sb -side right -fill y + pack .ctop.cdet.left.hb -side bottom -fill x + pack $ctext -side left -fill both -expand 1 + .ctop.cdet add .ctop.cdet.left + + $ctext tag conf filesep -font [concat $textfont bold] -back "#aaaaaa" + if {$gaudydiff} { + $ctext tag conf hunksep -back blue -fore white + $ctext tag conf d0 -back "#ff8080" + $ctext tag conf d1 -back green + } else { + $ctext tag conf hunksep -fore $hunksepcolor + $ctext tag conf d0 -fore $diffremcolor + $ctext tag conf d1 -fore $diffaddcolor + + # The mX colours seem to be used in merge changesets, where m0 + # is first parent, m1 is second parent and so on. Git can have + # several parents, Hg cannot, so I think the m2..mmax would be + # unused. + $ctext tag conf m0 -fore $diffmerge1color + $ctext tag conf m1 -fore $diffmerge2color + $ctext tag conf m2 -fore green + $ctext tag conf m3 -fore purple + $ctext tag conf m4 -fore brown + $ctext tag conf mmax -fore darkgrey + set mergemax 5 + $ctext tag conf mresult -font [concat $textfont bold] + $ctext tag conf msep -font [concat $textfont bold] + $ctext tag conf found -back yellow + } + + frame .ctop.cdet.right + set cflist .ctop.cdet.right.cfiles + listbox $cflist -fg $fgcolor -bg $bgcolor \ + -selectmode extended -width $geometry(cflistw) \ + -yscrollcommand ".ctop.cdet.right.sb set" + scrollbar .ctop.cdet.right.sb -command "$cflist yview" + pack .ctop.cdet.right.sb -side right -fill y + pack $cflist -side left -fill both -expand 1 + .ctop.cdet add .ctop.cdet.right + bind .ctop.cdet <Configure> {resizecdetpanes %W %w} + + pack .ctop -side top -fill both -expand 1 + + bindall <1> {selcanvline %W %x %y} + #bindall <B1-Motion> {selcanvline %W %x %y} + bindall <MouseWheel> "allcansmousewheel %D" + bindall <ButtonRelease-4> "allcanvs yview scroll -5 units" + bindall <ButtonRelease-5> "allcanvs yview scroll 5 units" + bindall <2> "allcanvs scan mark 0 %y" + bindall <B2-Motion> "allcanvs scan dragto 0 %y" + bind . <Key-Up> "selnextline -1" + bind . <Key-Down> "selnextline 1" + bind . <Key-Prior> "allcanvs yview scroll -1 pages" + bind . <Key-Next> "allcanvs yview scroll 1 pages" + bindkey <Key-Delete> "$ctext yview scroll -1 pages" + bindkey <Key-BackSpace> "$ctext yview scroll -1 pages" + bindkey <Key-space> "$ctext yview scroll 1 pages" + bindkey p "selnextline -1" + bindkey n "selnextline 1" + bindkey b "$ctext yview scroll -1 pages" + bindkey d "$ctext yview scroll 18 units" + bindkey u "$ctext yview scroll -18 units" + bindkey / {findnext 1} + bindkey <Key-Return> {findnext 0} + bindkey ? findprev + bindkey f nextfile + bind . <Control-q> doquit + bind . <Control-w> doquit + bind . <Control-f> dofind + bind . <Control-g> {findnext 0} + bind . <Control-r> findprev + bind . <Control-equal> {incrfont 1} + bind . <Control-KP_Add> {incrfont 1} + bind . <Control-minus> {incrfont -1} + bind . <Control-KP_Subtract> {incrfont -1} + bind $cflist <<ListboxSelect>> listboxsel + bind . <Destroy> {savestuff %W} + bind . <Button-1> "click %W" + bind $fstring <Key-Return> dofind + bind $sha1entry <Key-Return> gotocommit + bind $sha1entry <<PasteSelection>> clearsha1 + + set maincursor [. cget -cursor] + set textcursor [$ctext cget -cursor] + set curtextcursor $textcursor + + set rowctxmenu .rowctxmenu + menu $rowctxmenu -tearoff 0 + $rowctxmenu add command -label "Diff this -> selected" \ + -command {diffvssel 0} + $rowctxmenu add command -label "Diff selected -> this" \ + -command {diffvssel 1} + $rowctxmenu add command -label "Make patch" -command mkpatch + $rowctxmenu add command -label "Create tag" -command mktag + $rowctxmenu add command -label "Write commit to file" -command writecommit + if { $hgvdiff ne "" } { + $rowctxmenu add command -label "Visual diff with parent" \ + -command {vdiff 1} + $rowctxmenu add command -label "Visual diff with selected" \ + -command {vdiff 0} + } +} + +# when we make a key binding for the toplevel, make sure +# it doesn't get triggered when that key is pressed in the +# find string entry widget. +proc bindkey {ev script} { + global entries + bind . $ev $script + set escript [bind Entry $ev] + if {$escript == {}} { + set escript [bind Entry <Key>] + } + foreach e $entries { + bind $e $ev "$escript; break" + } +} + +# set the focus back to the toplevel for any click outside +# the entry widgets +proc click {w} { + global entries + foreach e $entries { + if {$w == $e} return + } + focus . +} + +proc savestuff {w} { + global canv canv2 canv3 ctext cflist mainfont textfont + global stuffsaved findmergefiles gaudydiff maxgraphpct + global maxwidth authorcolors curidfont bgcolor fgcolor + global diffremcolor diffaddcolor hunksepcolor + global diffmerge1color diffmerge2color + + if {$stuffsaved} return + if {![winfo viewable .]} return + catch { + set f [open "~/.hgk-new" w] + puts $f [list set mainfont $mainfont] + puts $f [list set curidfont $curidfont] + puts $f [list set textfont $textfont] + puts $f [list set findmergefiles $findmergefiles] + puts $f [list set gaudydiff $gaudydiff] + puts $f [list set maxgraphpct $maxgraphpct] + puts $f [list set maxwidth $maxwidth] + puts $f "set geometry(width) [winfo width .ctop]" + puts $f "set geometry(height) [winfo height .ctop]" + puts $f "set geometry(canv1) [expr [winfo width $canv]-2]" + puts $f "set geometry(canv2) [expr [winfo width $canv2]-2]" + puts $f "set geometry(canv3) [expr [winfo width $canv3]-2]" + puts $f "set geometry(canvh) [expr [winfo height $canv]-2]" + set wid [expr {([winfo width $ctext] - 8) \ + / [font measure $textfont "0"]}] + puts $f "set geometry(ctextw) $wid" + set wid [expr {([winfo width $cflist] - 11) \ + / [font measure [$cflist cget -font] "0"]}] + puts $f "set geometry(cflistw) $wid" + puts $f "#" + puts $f "# authorcolors format:" + puts $f "#" + puts $f "# zero or more sublists of" + puts $f "#" + puts $f "# { regex color }" + puts $f "#" + puts $f "# followed by a list of colors" + puts $f "#" + puts $f "# If the commit author matches a regex in a sublist," + puts $f "# the commit will be colored by that color" + puts $f "# otherwise the next unused entry from the list of colors" + puts $f "# will be assigned to this commit and also all other commits" + puts $f "# of the same author. When the list of colors is exhausted," + puts $f "# the last entry will be reused." + puts $f "#" + puts $f "set authorcolors {$authorcolors}" + puts $f "#" + puts $f "# The background color in the text windows" + puts $f "set bgcolor $bgcolor" + puts $f "#" + puts $f "# The text color used in the diff and file list view" + puts $f "set fgcolor $fgcolor" + puts $f "#" + puts $f "# Color to display + lines in diffs" + puts $f "set diffaddcolor $diffaddcolor" + puts $f "#" + puts $f "# Color to display - lines in diffs" + puts $f "set diffremcolor $diffremcolor" + puts $f "#" + puts $f "# Merge diffs: Color to signal lines from first parent" + puts $f "set diffmerge1color $diffmerge1color" + puts $f "#" + puts $f "# Merge diffs: Color to signal lines from second parent" + puts $f "set diffmerge2color $diffmerge2color" + puts $f "#" + puts $f "# Hunkseparator (@@ -lineno,lines +lineno,lines @@) color" + puts $f "set hunksepcolor $hunksepcolor" + close $f + file rename -force "~/.hgk-new" "~/.hgk" + } + set stuffsaved 1 +} + +proc resizeclistpanes {win w} { + global oldwidth + if [info exists oldwidth($win)] { + set s0 [$win sash coord 0] + set s1 [$win sash coord 1] + if {$w < 60} { + set sash0 [expr {int($w/2 - 2)}] + set sash1 [expr {int($w*5/6 - 2)}] + } else { + set factor [expr {1.0 * $w / $oldwidth($win)}] + set sash0 [expr {int($factor * [lindex $s0 0])}] + set sash1 [expr {int($factor * [lindex $s1 0])}] + if {$sash0 < 30} { + set sash0 30 + } + if {$sash1 < $sash0 + 20} { + set sash1 [expr $sash0 + 20] + } + if {$sash1 > $w - 10} { + set sash1 [expr $w - 10] + if {$sash0 > $sash1 - 20} { + set sash0 [expr $sash1 - 20] + } + } + } + $win sash place 0 $sash0 [lindex $s0 1] + $win sash place 1 $sash1 [lindex $s1 1] + } + set oldwidth($win) $w +} + +proc resizecdetpanes {win w} { + global oldwidth + if [info exists oldwidth($win)] { + set s0 [$win sash coord 0] + if {$w < 60} { + set sash0 [expr {int($w*3/4 - 2)}] + } else { + set factor [expr {1.0 * $w / $oldwidth($win)}] + set sash0 [expr {int($factor * [lindex $s0 0])}] + if {$sash0 < 45} { + set sash0 45 + } + if {$sash0 > $w - 15} { + set sash0 [expr $w - 15] + } + } + $win sash place 0 $sash0 [lindex $s0 1] + } + set oldwidth($win) $w +} + +proc allcanvs args { + global canv canv2 canv3 + eval $canv $args + eval $canv2 $args + eval $canv3 $args +} + +proc bindall {event action} { + global canv canv2 canv3 + bind $canv $event $action + bind $canv2 $event $action + bind $canv3 $event $action +} + +proc about {} { + set w .about + if {[winfo exists $w]} { + raise $w + return + } + toplevel $w + wm title $w "About gitk" + message $w.m -text { +Gitk version 1.2 + +Copyright © 2005 Paul Mackerras + +Use and redistribute under the terms of the GNU General Public License} \ + -justify center -aspect 400 + pack $w.m -side top -fill x -padx 20 -pady 20 + button $w.ok -text Close -command "destroy $w" + pack $w.ok -side bottom +} + +set aunextcolor 0 +proc assignauthorcolor {name} { + global authorcolors aucolormap aunextcolor + if [info exists aucolormap($name)] return + + set randomcolors {black} + for {set i 0} {$i < [llength $authorcolors]} {incr i} { + set col [lindex $authorcolors $i] + if {[llength $col] > 1} { + set re [lindex $col 0] + set c [lindex $col 1] + if {[regexp -- $re $name]} { + set aucolormap($name) $c + return + } + } else { + set randomcolors [lrange $authorcolors $i end] + break + } + } + + set ncolors [llength $randomcolors] + set c [lindex $randomcolors $aunextcolor] + if {[incr aunextcolor] >= $ncolors} { + incr aunextcolor -1 + } + set aucolormap($name) $c +} + +proc assigncolor {id} { + global commitinfo colormap commcolors colors nextcolor + global parents nparents children nchildren + global cornercrossings crossings + + if [info exists colormap($id)] return + set ncolors [llength $colors] + if {$nparents($id) <= 1 && $nchildren($id) == 1} { + set child [lindex $children($id) 0] + if {[info exists colormap($child)] + && $nparents($child) == 1} { + set colormap($id) $colormap($child) + return + } + } + set badcolors {} + if {[info exists cornercrossings($id)]} { + foreach x $cornercrossings($id) { + if {[info exists colormap($x)] + && [lsearch -exact $badcolors $colormap($x)] < 0} { + lappend badcolors $colormap($x) + } + } + if {[llength $badcolors] >= $ncolors} { + set badcolors {} + } + } + set origbad $badcolors + if {[llength $badcolors] < $ncolors - 1} { + if {[info exists crossings($id)]} { + foreach x $crossings($id) { + if {[info exists colormap($x)] + && [lsearch -exact $badcolors $colormap($x)] < 0} { + lappend badcolors $colormap($x) + } + } + if {[llength $badcolors] >= $ncolors} { + set badcolors $origbad + } + } + set origbad $badcolors + } + if {[llength $badcolors] < $ncolors - 1} { + foreach child $children($id) { + if {[info exists colormap($child)] + && [lsearch -exact $badcolors $colormap($child)] < 0} { + lappend badcolors $colormap($child) + } + if {[info exists parents($child)]} { + foreach p $parents($child) { + if {[info exists colormap($p)] + && [lsearch -exact $badcolors $colormap($p)] < 0} { + lappend badcolors $colormap($p) + } + } + } + } + if {[llength $badcolors] >= $ncolors} { + set badcolors $origbad + } + } + for {set i 0} {$i <= $ncolors} {incr i} { + set c [lindex $colors $nextcolor] + if {[incr nextcolor] >= $ncolors} { + set nextcolor 0 + } + if {[lsearch -exact $badcolors $c]} break + } + set colormap($id) $c +} + +proc initgraph {} { + global canvy canvy0 lineno numcommits nextcolor linespc + global mainline mainlinearrow sidelines + global nchildren ncleft + global displist nhyperspace + + allcanvs delete all + set nextcolor 0 + set canvy $canvy0 + set lineno -1 + set numcommits 0 + catch {unset mainline} + catch {unset mainlinearrow} + catch {unset sidelines} + foreach id [array names nchildren] { + set ncleft($id) $nchildren($id) + } + set displist {} + set nhyperspace 0 +} + +proc bindline {t id} { + global canv + + $canv bind $t <Enter> "lineenter %x %y $id" + $canv bind $t <Motion> "linemotion %x %y $id" + $canv bind $t <Leave> "lineleave $id" + $canv bind $t <Button-1> "lineclick %x %y $id 1" +} + +proc drawlines {id xtra} { + global mainline mainlinearrow sidelines lthickness colormap canv + + $canv delete lines.$id + if {[info exists mainline($id)]} { + set t [$canv create line $mainline($id) \ + -width [expr {($xtra + 1) * $lthickness}] \ + -fill $colormap($id) -tags lines.$id \ + -arrow $mainlinearrow($id)] + $canv lower $t + bindline $t $id + } + if {[info exists sidelines($id)]} { + foreach ls $sidelines($id) { + set coords [lindex $ls 0] + set thick [lindex $ls 1] + set arrow [lindex $ls 2] + set t [$canv create line $coords -fill $colormap($id) \ + -width [expr {($thick + $xtra) * $lthickness}] \ + -arrow $arrow -tags lines.$id] + $canv lower $t + bindline $t $id + } + } +} + +# level here is an index in displist +proc drawcommitline {level} { + global parents children nparents displist + global canv canv2 canv3 mainfont namefont canvy linespc + global lineid linehtag linentag linedtag commitinfo + global colormap numcommits currentparents dupparents + global idtags idline idheads idotherrefs + global lineno lthickness mainline mainlinearrow sidelines + global commitlisted rowtextx idpos lastuse displist + global oldnlines olddlevel olddisplist + global aucolormap curid curidfont + + incr numcommits + incr lineno + set id [lindex $displist $level] + set lastuse($id) $lineno + set lineid($lineno) $id + set idline($id) $lineno + set ofill [expr {[info exists commitlisted($id)]? "blue": "white"}] + if {![info exists commitinfo($id)]} { + readcommit $id + if {![info exists commitinfo($id)]} { + set commitinfo($id) {"No commit information available"} + set nparents($id) 0 + } + } + assigncolor $id + set currentparents {} + set dupparents {} + if {[info exists commitlisted($id)] && [info exists parents($id)]} { + foreach p $parents($id) { + if {[lsearch -exact $currentparents $p] < 0} { + lappend currentparents $p + } else { + # remember that this parent was listed twice + lappend dupparents $p + } + } + } + set x [xcoord $level $level $lineno] + set y1 $canvy + set canvy [expr $canvy + $linespc] + allcanvs conf -scrollregion \ + [list 0 0 0 [expr $y1 + 0.5 * $linespc + 2]] + if {[info exists mainline($id)]} { + lappend mainline($id) $x $y1 + if {$mainlinearrow($id) ne "none"} { + set mainline($id) [trimdiagstart $mainline($id)] + } + } + drawlines $id 0 + set orad [expr {$linespc / 3}] + set t [$canv create oval [expr $x - $orad] [expr $y1 - $orad] \ + [expr $x + $orad - 1] [expr $y1 + $orad - 1] \ + -fill $ofill -outline black -width 1] + $canv raise $t + $canv bind $t <1> {selcanvline {} %x %y} + set xt [xcoord [llength $displist] $level $lineno] + if {[llength $currentparents] > 2} { + set xt [expr {$xt + ([llength $currentparents] - 2) * $linespc}] + } + set rowtextx($lineno) $xt + set idpos($id) [list $x $xt $y1] + if {[info exists idtags($id)] || [info exists idheads($id)] + || [info exists idotherrefs($id)]} { + set xt [drawtags $id $x $xt $y1] + } + set headline [lindex $commitinfo($id) 0] + set name [lindex $commitinfo($id) 1] + assignauthorcolor $name + set fg $aucolormap($name) + if {$id == $curid} { + set fn $curidfont + } else { + set fn $mainfont + } + + set date [lindex $commitinfo($id) 2] + set linehtag($lineno) [$canv create text $xt $y1 -anchor w \ + -text $headline -font $fn \ + -fill $fg] + $canv bind $linehtag($lineno) <<B3>> "rowmenu %X %Y $id" + set linentag($lineno) [$canv2 create text 3 $y1 -anchor w \ + -text $name -font $namefont \ + -fill $fg] + set linedtag($lineno) [$canv3 create text 3 $y1 -anchor w \ + -text $date -font $mainfont \ + -fill $fg] + + set olddlevel $level + set olddisplist $displist + set oldnlines [llength $displist] +} + +proc drawtags {id x xt y1} { + global idtags idheads idotherrefs commitinfo + global linespc lthickness + global canv mainfont idline rowtextx + + set marks {} + set ntags 0 + set nheads 0 + if {[info exists idtags($id)]} { + set marks $idtags($id) + set ntags [llength $marks] + } + if {[info exists idheads($id)]} { + set headmark [lindex $commitinfo($id) 7] + if {$headmark ne "default"} { + lappend marks $headmark + set nheads 1 + } + } + if {[info exists idotherrefs($id)]} { + set marks [concat $marks $idotherrefs($id)] + } + if {$marks eq {}} { + return $xt + } + + set delta [expr {int(0.5 * ($linespc - $lthickness))}] + set yt [expr $y1 - 0.5 * $linespc] + set yb [expr $yt + $linespc - 1] + set xvals {} + set wvals {} + foreach tag $marks { + set wid [font measure $mainfont $tag] + lappend xvals $xt + lappend wvals $wid + set xt [expr {$xt + $delta + $wid + $lthickness + $linespc}] + } + set t [$canv create line $x $y1 [lindex $xvals end] $y1 \ + -width $lthickness -fill black -tags tag.$id] + $canv lower $t + foreach tag $marks x $xvals wid $wvals { + set xl [expr $x + $delta] + set xr [expr $x + $delta + $wid + $lthickness] + if {[incr ntags -1] >= 0} { + # draw a tag + set t [$canv create polygon $x [expr $yt + $delta] $xl $yt \ + $xr $yt $xr $yb $xl $yb $x [expr $yb - $delta] \ + -width 1 -outline black -fill yellow -tags tag.$id] + $canv bind $t <1> [list showtag $tag 1] + set rowtextx($idline($id)) [expr {$xr + $linespc}] + } else { + # draw a head or other ref + if {[incr nheads -1] >= 0} { + set col green + } else { + set col "#ddddff" + } + set xl [expr $xl - $delta/2] + $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \ + -width 1 -outline black -fill $col -tags tag.$id + } + set t [$canv create text $xl $y1 -anchor w -text $tag \ + -font $mainfont -tags tag.$id] + if {$ntags >= 0} { + $canv bind $t <1> [list showtag $tag 1] + } + } + return $xt +} + +proc notecrossings {id lo hi corner} { + global olddisplist crossings cornercrossings + + for {set i $lo} {[incr i] < $hi} {} { + set p [lindex $olddisplist $i] + if {$p == {}} continue + if {$i == $corner} { + if {![info exists cornercrossings($id)] + || [lsearch -exact $cornercrossings($id) $p] < 0} { + lappend cornercrossings($id) $p + } + if {![info exists cornercrossings($p)] + || [lsearch -exact $cornercrossings($p) $id] < 0} { + lappend cornercrossings($p) $id + } + } else { + if {![info exists crossings($id)] + || [lsearch -exact $crossings($id) $p] < 0} { + lappend crossings($id) $p + } + if {![info exists crossings($p)] + || [lsearch -exact $crossings($p) $id] < 0} { + lappend crossings($p) $id + } + } + } +} + +proc xcoord {i level ln} { + global canvx0 xspc1 xspc2 + + set x [expr {$canvx0 + $i * $xspc1($ln)}] + if {$i > 0 && $i == $level} { + set x [expr {$x + 0.5 * ($xspc2 - $xspc1($ln))}] + } elseif {$i > $level} { + set x [expr {$x + $xspc2 - $xspc1($ln)}] + } + return $x +} + +# it seems Tk can't draw arrows on the end of diagonal line segments... +proc trimdiagend {line} { + while {[llength $line] > 4} { + set x1 [lindex $line end-3] + set y1 [lindex $line end-2] + set x2 [lindex $line end-1] + set y2 [lindex $line end] + if {($x1 == $x2) != ($y1 == $y2)} break + set line [lreplace $line end-1 end] + } + return $line +} + +proc trimdiagstart {line} { + while {[llength $line] > 4} { + set x1 [lindex $line 0] + set y1 [lindex $line 1] + set x2 [lindex $line 2] + set y2 [lindex $line 3] + if {($x1 == $x2) != ($y1 == $y2)} break + set line [lreplace $line 0 1] + } + return $line +} + +proc drawslants {id needonscreen nohs} { + global canv mainline mainlinearrow sidelines + global canvx0 canvy xspc1 xspc2 lthickness + global currentparents dupparents + global lthickness linespc canvy colormap lineno geometry + global maxgraphpct maxwidth + global displist onscreen lastuse + global parents commitlisted + global oldnlines olddlevel olddisplist + global nhyperspace numcommits nnewparents + + if {$lineno < 0} { + lappend displist $id + set onscreen($id) 1 + return 0 + } + + set y1 [expr {$canvy - $linespc}] + set y2 $canvy + + # work out what we need to get back on screen + set reins {} + if {$onscreen($id) < 0} { + # next to do isn't displayed, better get it on screen... + lappend reins [list $id 0] + } + # make sure all the previous commits's parents are on the screen + foreach p $currentparents { + if {$onscreen($p) < 0} { + lappend reins [list $p 0] + } + } + # bring back anything requested by caller + if {$needonscreen ne {}} { + lappend reins $needonscreen + } + + # try the shortcut + if {$currentparents == $id && $onscreen($id) == 0 && $reins eq {}} { + set dlevel $olddlevel + set x [xcoord $dlevel $dlevel $lineno] + set mainline($id) [list $x $y1] + set mainlinearrow($id) none + set lastuse($id) $lineno + set displist [lreplace $displist $dlevel $dlevel $id] + set onscreen($id) 1 + set xspc1([expr {$lineno + 1}]) $xspc1($lineno) + return $dlevel + } + + # update displist + set displist [lreplace $displist $olddlevel $olddlevel] + set j $olddlevel + foreach p $currentparents { + set lastuse($p) $lineno + if {$onscreen($p) == 0} { + set displist [linsert $displist $j $p] + set onscreen($p) 1 + incr j + } + } + if {$onscreen($id) == 0} { + lappend displist $id + set onscreen($id) 1 + } + + # remove the null entry if present + set nullentry [lsearch -exact $displist {}] + if {$nullentry >= 0} { + set displist [lreplace $displist $nullentry $nullentry] + } + + # bring back the ones we need now (if we did it earlier + # it would change displist and invalidate olddlevel) + foreach pi $reins { + # test again in case of duplicates in reins + set p [lindex $pi 0] + if {$onscreen($p) < 0} { + set onscreen($p) 1 + set lastuse($p) $lineno + set displist [linsert $displist [lindex $pi 1] $p] + incr nhyperspace -1 + } + } + + set lastuse($id) $lineno + + # see if we need to make any lines jump off into hyperspace + set displ [llength $displist] + if {$displ > $maxwidth} { + set ages {} + foreach x $displist { + lappend ages [list $lastuse($x) $x] + } + set ages [lsort -integer -index 0 $ages] + set k 0 + while {$displ > $maxwidth} { + set use [lindex $ages $k 0] + set victim [lindex $ages $k 1] + if {$use >= $lineno - 5} break + incr k + if {[lsearch -exact $nohs $victim] >= 0} continue + set i [lsearch -exact $displist $victim] + set displist [lreplace $displist $i $i] + set onscreen($victim) -1 + incr nhyperspace + incr displ -1 + if {$i < $nullentry} { + incr nullentry -1 + } + set x [lindex $mainline($victim) end-1] + lappend mainline($victim) $x $y1 + set line [trimdiagend $mainline($victim)] + set arrow "last" + if {$mainlinearrow($victim) ne "none"} { + set line [trimdiagstart $line] + set arrow "both" + } + lappend sidelines($victim) [list $line 1 $arrow] + unset mainline($victim) + } + } + + set dlevel [lsearch -exact $displist $id] + + # If we are reducing, put in a null entry + if {$displ < $oldnlines} { + # does the next line look like a merge? + # i.e. does it have > 1 new parent? + if {$nnewparents($id) > 1} { + set i [expr {$dlevel + 1}] + } elseif {$nnewparents([lindex $olddisplist $olddlevel]) == 0} { + set i $olddlevel + if {$nullentry >= 0 && $nullentry < $i} { + incr i -1 + } + } elseif {$nullentry >= 0} { + set i $nullentry + while {$i < $displ + && [lindex $olddisplist $i] == [lindex $displist $i]} { + incr i + } + } else { + set i $olddlevel + if {$dlevel >= $i} { + incr i + } + } + if {$i < $displ} { + set displist [linsert $displist $i {}] + incr displ + if {$dlevel >= $i} { + incr dlevel + } + } + } + + # decide on the line spacing for the next line + set lj [expr {$lineno + 1}] + set maxw [expr {$maxgraphpct * $geometry(canv1) / 100}] + if {$displ <= 1 || $canvx0 + $displ * $xspc2 <= $maxw} { + set xspc1($lj) $xspc2 + } else { + set xspc1($lj) [expr {($maxw - $canvx0 - $xspc2) / ($displ - 1)}] + if {$xspc1($lj) < $lthickness} { + set xspc1($lj) $lthickness + } + } + + foreach idi $reins { + set id [lindex $idi 0] + set j [lsearch -exact $displist $id] + set xj [xcoord $j $dlevel $lj] + set mainline($id) [list $xj $y2] + set mainlinearrow($id) first + } + + set i -1 + foreach id $olddisplist { + incr i + if {$id == {}} continue + if {$onscreen($id) <= 0} continue + set xi [xcoord $i $olddlevel $lineno] + if {$i == $olddlevel} { + foreach p $currentparents { + set j [lsearch -exact $displist $p] + set coords [list $xi $y1] + set xj [xcoord $j $dlevel $lj] + if {$xj < $xi - $linespc} { + lappend coords [expr {$xj + $linespc}] $y1 + notecrossings $p $j $i [expr {$j + 1}] + } elseif {$xj > $xi + $linespc} { + lappend coords [expr {$xj - $linespc}] $y1 + notecrossings $p $i $j [expr {$j - 1}] + } + if {[lsearch -exact $dupparents $p] >= 0} { + # draw a double-width line to indicate the doubled parent + lappend coords $xj $y2 + lappend sidelines($p) [list $coords 2 none] + if {![info exists mainline($p)]} { + set mainline($p) [list $xj $y2] + set mainlinearrow($p) none + } + } else { + # normal case, no parent duplicated + set yb $y2 + set dx [expr {abs($xi - $xj)}] + if {0 && $dx < $linespc} { + set yb [expr {$y1 + $dx}] + } + if {![info exists mainline($p)]} { + if {$xi != $xj} { + lappend coords $xj $yb + } + set mainline($p) $coords + set mainlinearrow($p) none + } else { + lappend coords $xj $yb + if {$yb < $y2} { + lappend coords $xj $y2 + } + lappend sidelines($p) [list $coords 1 none] + } + } + } + } else { + set j $i + if {[lindex $displist $i] != $id} { + set j [lsearch -exact $displist $id] + } + if {$j != $i || $xspc1($lineno) != $xspc1($lj) + || ($olddlevel < $i && $i < $dlevel) + || ($dlevel < $i && $i < $olddlevel)} { + set xj [xcoord $j $dlevel $lj] + lappend mainline($id) $xi $y1 $xj $y2 + } + } + } + return $dlevel +} + +# search for x in a list of lists +proc llsearch {llist x} { + set i 0 + foreach l $llist { + if {$l == $x || [lsearch -exact $l $x] >= 0} { + return $i + } + incr i + } + return -1 +} + +proc drawmore {reading} { + global displayorder numcommits ncmupdate nextupdate + global stopped nhyperspace parents commitlisted + global maxwidth onscreen displist currentparents olddlevel + + set n [llength $displayorder] + while {$numcommits < $n} { + set id [lindex $displayorder $numcommits] + set ctxend [expr {$numcommits + 10}] + if {!$reading && $ctxend > $n} { + set ctxend $n + } + set dlist {} + if {$numcommits > 0} { + set dlist [lreplace $displist $olddlevel $olddlevel] + set i $olddlevel + foreach p $currentparents { + if {$onscreen($p) == 0} { + set dlist [linsert $dlist $i $p] + incr i + } + } + } + set nohs {} + set reins {} + set isfat [expr {[llength $dlist] > $maxwidth}] + if {$nhyperspace > 0 || $isfat} { + if {$ctxend > $n} break + # work out what to bring back and + # what we want to don't want to send into hyperspace + set room 1 + for {set k $numcommits} {$k < $ctxend} {incr k} { + set x [lindex $displayorder $k] + set i [llsearch $dlist $x] + if {$i < 0} { + set i [llength $dlist] + lappend dlist $x + } + if {[lsearch -exact $nohs $x] < 0} { + lappend nohs $x + } + if {$reins eq {} && $onscreen($x) < 0 && $room} { + set reins [list $x $i] + } + set newp {} + if {[info exists commitlisted($x)]} { + set right 0 + foreach p $parents($x) { + if {[llsearch $dlist $p] < 0} { + lappend newp $p + if {[lsearch -exact $nohs $p] < 0} { + lappend nohs $p + } + if {$reins eq {} && $onscreen($p) < 0 && $room} { + set reins [list $p [expr {$i + $right}]] + } + } + set right 1 + } + } + set l [lindex $dlist $i] + if {[llength $l] == 1} { + set l $newp + } else { + set j [lsearch -exact $l $x] + set l [concat [lreplace $l $j $j] $newp] + } + set dlist [lreplace $dlist $i $i $l] + if {$room && $isfat && [llength $newp] <= 1} { + set room 0 + } + } + } + + set dlevel [drawslants $id $reins $nohs] + drawcommitline $dlevel + if {[clock clicks -milliseconds] >= $nextupdate + && $numcommits >= $ncmupdate} { + doupdate $reading + if {$stopped} break + } + } +} + +# level here is an index in todo +proc updatetodo {level noshortcut} { + global ncleft todo nnewparents + global commitlisted parents onscreen + + set id [lindex $todo $level] + set olds {} + if {[info exists commitlisted($id)]} { + foreach p $parents($id) { + if {[lsearch -exact $olds $p] < 0} { + lappend olds $p + } + } + } + if {!$noshortcut && [llength $olds] == 1} { + set p [lindex $olds 0] + if {$ncleft($p) == 1 && [lsearch -exact $todo $p] < 0} { + set ncleft($p) 0 + set todo [lreplace $todo $level $level $p] + set onscreen($p) 0 + set nnewparents($id) 1 + return 0 + } + } + + set todo [lreplace $todo $level $level] + set i $level + set n 0 + foreach p $olds { + incr ncleft($p) -1 + set k [lsearch -exact $todo $p] + if {$k < 0} { + set todo [linsert $todo $i $p] + set onscreen($p) 0 + incr i + incr n + } + } + set nnewparents($id) $n + + return 1 +} + +proc decidenext {{noread 0}} { + global ncleft todo + global datemode cdate + global commitinfo + + # choose which one to do next time around + set todol [llength $todo] + set level -1 + set latest {} + for {set k $todol} {[incr k -1] >= 0} {} { + set p [lindex $todo $k] + if {$ncleft($p) == 0} { + if {$datemode} { + if {![info exists commitinfo($p)]} { + if {$noread} { + return {} + } + readcommit $p + } + if {$latest == {} || $cdate($p) > $latest} { + set level $k + set latest $cdate($p) + } + } else { + set level $k + break + } + } + } + if {$level < 0} { + if {$todo != {}} { + puts "ERROR: none of the pending commits can be done yet:" + foreach p $todo { + puts " $p ($ncleft($p))" + } + } + return -1 + } + + return $level +} + +proc drawcommit {id} { + global phase todo nchildren datemode nextupdate + global numcommits ncmupdate displayorder todo onscreen + + if {$phase != "incrdraw"} { + set phase incrdraw + set displayorder {} + set todo {} + initgraph + } + if {$nchildren($id) == 0} { + lappend todo $id + set onscreen($id) 0 + } + set level [decidenext 1] + if {$level == {} || $id != [lindex $todo $level]} { + return + } + while 1 { + lappend displayorder [lindex $todo $level] + if {[updatetodo $level $datemode]} { + set level [decidenext 1] + if {$level == {}} break + } + set id [lindex $todo $level] + if {![info exists commitlisted($id)]} { + break + } + } + drawmore 1 +} + +proc finishcommits {} { + global phase + global canv mainfont ctext maincursor textcursor + + if {$phase != "incrdraw"} { + $canv delete all + $canv create text 3 3 -anchor nw -text "No commits selected" \ + -font $mainfont -tags textitems + set phase {} + } else { + drawrest + } + . config -cursor $maincursor + settextcursor $textcursor +} + +# Don't change the text pane cursor if it is currently the hand cursor, +# showing that we are over a sha1 ID link. +proc settextcursor {c} { + global ctext curtextcursor + + if {[$ctext cget -cursor] == $curtextcursor} { + $ctext config -cursor $c + } + set curtextcursor $c +} + +proc drawgraph {} { + global nextupdate startmsecs ncmupdate + global displayorder onscreen + + if {$displayorder == {}} return + set startmsecs [clock clicks -milliseconds] + set nextupdate [expr $startmsecs + 100] + set ncmupdate 1 + initgraph + foreach id $displayorder { + set onscreen($id) 0 + } + drawmore 0 +} + +proc drawrest {} { + global phase stopped redisplaying selectedline + global datemode todo displayorder + global numcommits ncmupdate + global nextupdate startmsecs + + set level [decidenext] + if {$level >= 0} { + set phase drawgraph + while 1 { + lappend displayorder [lindex $todo $level] + set hard [updatetodo $level $datemode] + if {$hard} { + set level [decidenext] + if {$level < 0} break + } + } + drawmore 0 + } + set phase {} + set drawmsecs [expr [clock clicks -milliseconds] - $startmsecs] + #puts "overall $drawmsecs ms for $numcommits commits" + if {$redisplaying} { + if {$stopped == 0 && [info exists selectedline]} { + selectline $selectedline 0 + } + if {$stopped == 1} { + set stopped 0 + after idle drawgraph + } else { + set redisplaying 0 + } + } +} + +proc findmatches {f} { + global findtype foundstring foundstrlen + if {$findtype == "Regexp"} { + set matches [regexp -indices -all -inline $foundstring $f] + } else { + if {$findtype == "IgnCase"} { + set str [string tolower $f] + } else { + set str $f + } + set matches {} + set i 0 + while {[set j [string first $foundstring $str $i]] >= 0} { + lappend matches [list $j [expr $j+$foundstrlen-1]] + set i [expr $j + $foundstrlen] + } + } + return $matches +} + +proc dofind {} { + global findtype findloc findstring markedmatches commitinfo + global numcommits lineid linehtag linentag linedtag + global mainfont namefont canv canv2 canv3 selectedline + global matchinglines foundstring foundstrlen + + stopfindproc + unmarkmatches + focus . + set matchinglines {} + if {$findloc == "Pickaxe"} { + findpatches + return + } + if {$findtype == "IgnCase"} { + set foundstring [string tolower $findstring] + } else { + set foundstring $findstring + } + set foundstrlen [string length $findstring] + if {$foundstrlen == 0} return + if {$findloc == "Files"} { + findfiles + return + } + if {![info exists selectedline]} { + set oldsel -1 + } else { + set oldsel $selectedline + } + set didsel 0 + set fldtypes {Headline Author Date Committer CDate Comment} + for {set l 0} {$l < $numcommits} {incr l} { + set id $lineid($l) + set info $commitinfo($id) + set doesmatch 0 + foreach f $info ty $fldtypes { + if {$findloc != "All fields" && $findloc != $ty} { + continue + } + set matches [findmatches $f] + if {$matches == {}} continue + set doesmatch 1 + if {$ty == "Headline"} { + markmatches $canv $l $f $linehtag($l) $matches $mainfont + } elseif {$ty == "Author"} { + markmatches $canv2 $l $f $linentag($l) $matches $namefont + } elseif {$ty == "Date"} { + markmatches $canv3 $l $f $linedtag($l) $matches $mainfont + } + } + if {$doesmatch} { + lappend matchinglines $l + if {!$didsel && $l > $oldsel} { + findselectline $l + set didsel 1 + } + } + } + if {$matchinglines == {}} { + bell + } elseif {!$didsel} { + findselectline [lindex $matchinglines 0] + } +} + +proc findselectline {l} { + global findloc commentend ctext + selectline $l 1 + if {$findloc == "All fields" || $findloc == "Comments"} { + # highlight the matches in the comments + set f [$ctext get 1.0 $commentend] + set matches [findmatches $f] + foreach match $matches { + set start [lindex $match 0] + set end [expr [lindex $match 1] + 1] + $ctext tag add found "1.0 + $start c" "1.0 + $end c" + } + } +} + +proc findnext {restart} { + global matchinglines selectedline + if {![info exists matchinglines]} { + if {$restart} { + dofind + } + return + } + if {![info exists selectedline]} return + foreach l $matchinglines { + if {$l > $selectedline} { + findselectline $l + return + } + } + bell +} + +proc findprev {} { + global matchinglines selectedline + if {![info exists matchinglines]} { + dofind + return + } + if {![info exists selectedline]} return + set prev {} + foreach l $matchinglines { + if {$l >= $selectedline} break + set prev $l + } + if {$prev != {}} { + findselectline $prev + } else { + bell + } +} + +proc findlocchange {name ix op} { + global findloc findtype findtypemenu + if {$findloc == "Pickaxe"} { + set findtype Exact + set state disabled + } else { + set state normal + } + $findtypemenu entryconf 1 -state $state + $findtypemenu entryconf 2 -state $state +} + +proc stopfindproc {{done 0}} { + global findprocpid findprocfile findids + global ctext findoldcursor phase maincursor textcursor + global findinprogress + + catch {unset findids} + if {[info exists findprocpid]} { + if {!$done} { + catch {exec kill $findprocpid} + } + catch {close $findprocfile} + unset findprocpid + } + if {[info exists findinprogress]} { + unset findinprogress + if {$phase != "incrdraw"} { + . config -cursor $maincursor + settextcursor $textcursor + } + } +} + +proc findpatches {} { + global findstring selectedline numcommits + global findprocpid findprocfile + global finddidsel ctext lineid findinprogress + global findinsertpos + global env + + if {$numcommits == 0} return + + # make a list of all the ids to search, starting at the one + # after the selected line (if any) + if {[info exists selectedline]} { + set l $selectedline + } else { + set l -1 + } + set inputids {} + for {set i 0} {$i < $numcommits} {incr i} { + if {[incr l] >= $numcommits} { + set l 0 + } + append inputids $lineid($l) "\n" + } + + if {[catch { + set f [open [list | $env(HG) --config ui.report_untrusted=false debug-diff-tree --stdin -s -r -S$findstring << $inputids] r] + } err]} { + error_popup "Error starting search process: $err" + return + } + + set findinsertpos end + set findprocfile $f + set findprocpid [pid $f] + fconfigure $f -blocking 0 + fileevent $f readable readfindproc + set finddidsel 0 + . config -cursor watch + settextcursor watch + set findinprogress 1 +} + +proc readfindproc {} { + global findprocfile finddidsel + global idline matchinglines findinsertpos + + set n [gets $findprocfile line] + if {$n < 0} { + if {[eof $findprocfile]} { + stopfindproc 1 + if {!$finddidsel} { + bell + } + } + return + } + if {![regexp {^[0-9a-f]{12}} $line id]} { + error_popup "Can't parse git-diff-tree output: $line" + stopfindproc + return + } + if {![info exists idline($id)]} { + puts stderr "spurious id: $id" + return + } + set l $idline($id) + insertmatch $l $id +} + +proc insertmatch {l id} { + global matchinglines findinsertpos finddidsel + + if {$findinsertpos == "end"} { + if {$matchinglines != {} && $l < [lindex $matchinglines 0]} { + set matchinglines [linsert $matchinglines 0 $l] + set findinsertpos 1 + } else { + lappend matchinglines $l + } + } else { + set matchinglines [linsert $matchinglines $findinsertpos $l] + incr findinsertpos + } + markheadline $l $id + if {!$finddidsel} { + findselectline $l + set finddidsel 1 + } +} + +proc findfiles {} { + global selectedline numcommits lineid ctext + global ffileline finddidsel parents nparents + global findinprogress findstartline findinsertpos + global treediffs fdiffids fdiffsneeded fdiffpos + global findmergefiles + global env + + if {$numcommits == 0} return + + if {[info exists selectedline]} { + set l [expr {$selectedline + 1}] + } else { + set l 0 + } + set ffileline $l + set findstartline $l + set diffsneeded {} + set fdiffsneeded {} + while 1 { + set id $lineid($l) + if {$findmergefiles || $nparents($id) == 1} { + foreach p $parents($id) { + if {![info exists treediffs([list $id $p])]} { + append diffsneeded "$id $p\n" + lappend fdiffsneeded [list $id $p] + } + } + } + if {[incr l] >= $numcommits} { + set l 0 + } + if {$l == $findstartline} break + } + + # start off a git-diff-tree process if needed + if {$diffsneeded ne {}} { + if {[catch { + set df [open [list | $env(HG) --config ui.report_untrusted=false debug-diff-tree -r --stdin << $diffsneeded] r] + } err ]} { + error_popup "Error starting search process: $err" + return + } + catch {unset fdiffids} + set fdiffpos 0 + fconfigure $df -blocking 0 + fileevent $df readable [list readfilediffs $df] + } + + set finddidsel 0 + set findinsertpos end + set id $lineid($l) + set p [lindex $parents($id) 0] + . config -cursor watch + settextcursor watch + set findinprogress 1 + findcont [list $id $p] + update +} + +proc readfilediffs {df} { + global findids fdiffids fdiffs + + set n [gets $df line] + if {$n < 0} { + if {[eof $df]} { + donefilediff + if {[catch {close $df} err]} { + stopfindproc + bell + error_popup "Error in hg debug-diff-tree: $err" + } elseif {[info exists findids]} { + set ids $findids + stopfindproc + bell + error_popup "Couldn't find diffs for {$ids}" + } + } + return + } + if {[regexp {^([0-9a-f]{12}) \(from ([0-9a-f]{12})\)} $line match id p]} { + # start of a new string of diffs + donefilediff + set fdiffids [list $id $p] + set fdiffs {} + } elseif {[string match ":*" $line]} { + lappend fdiffs [lindex $line 5] + } +} + +proc donefilediff {} { + global fdiffids fdiffs treediffs findids + global fdiffsneeded fdiffpos + + if {[info exists fdiffids]} { + while {[lindex $fdiffsneeded $fdiffpos] ne $fdiffids + && $fdiffpos < [llength $fdiffsneeded]} { + # git-diff-tree doesn't output anything for a commit + # which doesn't change anything + set nullids [lindex $fdiffsneeded $fdiffpos] + set treediffs($nullids) {} + if {[info exists findids] && $nullids eq $findids} { + unset findids + findcont $nullids + } + incr fdiffpos + } + incr fdiffpos + + if {![info exists treediffs($fdiffids)]} { + set treediffs($fdiffids) $fdiffs + } + if {[info exists findids] && $fdiffids eq $findids} { + unset findids + findcont $fdiffids + } + } +} + +proc findcont {ids} { + global findids treediffs parents nparents + global ffileline findstartline finddidsel + global lineid numcommits matchinglines findinprogress + global findmergefiles + + set id [lindex $ids 0] + set p [lindex $ids 1] + set pi [lsearch -exact $parents($id) $p] + set l $ffileline + while 1 { + if {$findmergefiles || $nparents($id) == 1} { + if {![info exists treediffs($ids)]} { + set findids $ids + set ffileline $l + return + } + set doesmatch 0 + foreach f $treediffs($ids) { + set x [findmatches $f] + if {$x != {}} { + set doesmatch 1 + break + } + } + if {$doesmatch} { + insertmatch $l $id + set pi $nparents($id) + } + } else { + set pi $nparents($id) + } + if {[incr pi] >= $nparents($id)} { + set pi 0 + if {[incr l] >= $numcommits} { + set l 0 + } + if {$l == $findstartline} break + set id $lineid($l) + } + set p [lindex $parents($id) $pi] + set ids [list $id $p] + } + stopfindproc + if {!$finddidsel} { + bell + } +} + +# mark a commit as matching by putting a yellow background +# behind the headline +proc markheadline {l id} { + global canv mainfont linehtag commitinfo + + set bbox [$canv bbox $linehtag($l)] + set t [$canv create rect $bbox -outline {} -tags matches -fill yellow] + $canv lower $t +} + +# mark the bits of a headline, author or date that match a find string +proc markmatches {canv l str tag matches font} { + set bbox [$canv bbox $tag] + set x0 [lindex $bbox 0] + set y0 [lindex $bbox 1] + set y1 [lindex $bbox 3] + foreach match $matches { + set start [lindex $match 0] + set end [lindex $match 1] + if {$start > $end} continue + set xoff [font measure $font [string range $str 0 [expr $start-1]]] + set xlen [font measure $font [string range $str 0 [expr $end]]] + set t [$canv create rect [expr $x0+$xoff] $y0 [expr $x0+$xlen+2] $y1 \ + -outline {} -tags matches -fill yellow] + $canv lower $t + } +} + +proc unmarkmatches {} { + global matchinglines findids + allcanvs delete matches + catch {unset matchinglines} + catch {unset findids} +} + +proc selcanvline {w x y} { + global canv canvy0 ctext linespc + global lineid linehtag linentag linedtag rowtextx + set ymax [lindex [$canv cget -scrollregion] 3] + if {$ymax == {}} return + set yfrac [lindex [$canv yview] 0] + set y [expr {$y + $yfrac * $ymax}] + set l [expr {int(($y - $canvy0) / $linespc + 0.5)}] + if {$l < 0} { + set l 0 + } + if {$w eq $canv} { + if {![info exists rowtextx($l)] || $x < $rowtextx($l)} return + } + unmarkmatches + selectline $l 1 +} + +proc commit_descriptor {p} { + global commitinfo + set l "..." + if {[info exists commitinfo($p)]} { + set l [lindex $commitinfo($p) 0] + set r [lindex $commitinfo($p) 6] + } + return "$r:$p ($l)" +} + +# append some text to the ctext widget, and make any SHA1 ID +# that we know about be a clickable link. +proc appendwithlinks {text} { + global ctext idline linknum + + set start [$ctext index "end - 1c"] + $ctext insert end $text + $ctext insert end "\n" + set links [regexp -indices -all -inline {[0-9a-f]{12}} $text] + foreach l $links { + set s [lindex $l 0] + set e [lindex $l 1] + set linkid [string range $text $s $e] + if {![info exists idline($linkid)]} continue + incr e + $ctext tag add link "$start + $s c" "$start + $e c" + $ctext tag add link$linknum "$start + $s c" "$start + $e c" + $ctext tag bind link$linknum <1> [list selectline $idline($linkid) 1] + incr linknum + } + $ctext tag conf link -foreground blue -underline 1 + $ctext tag bind link <Enter> { %W configure -cursor hand2 } + $ctext tag bind link <Leave> { %W configure -cursor $curtextcursor } +} + +proc selectline {l isnew} { + global canv canv2 canv3 ctext commitinfo selectedline + global lineid linehtag linentag linedtag + global canvy0 linespc parents nparents children + global cflist currentid sha1entry + global commentend idtags idline linknum + + $canv delete hover + normalline + if {![info exists lineid($l)] || ![info exists linehtag($l)]} return + $canv delete secsel + set t [eval $canv create rect [$canv bbox $linehtag($l)] -outline {{}} \ + -tags secsel -fill [$canv cget -selectbackground]] + $canv lower $t + $canv2 delete secsel + set t [eval $canv2 create rect [$canv2 bbox $linentag($l)] -outline {{}} \ + -tags secsel -fill [$canv2 cget -selectbackground]] + $canv2 lower $t + $canv3 delete secsel + set t [eval $canv3 create rect [$canv3 bbox $linedtag($l)] -outline {{}} \ + -tags secsel -fill [$canv3 cget -selectbackground]] + $canv3 lower $t + set y [expr {$canvy0 + $l * $linespc}] + set ymax [lindex [$canv cget -scrollregion] 3] + set ytop [expr {$y - $linespc - 1}] + set ybot [expr {$y + $linespc + 1}] + set wnow [$canv yview] + set wtop [expr [lindex $wnow 0] * $ymax] + set wbot [expr [lindex $wnow 1] * $ymax] + set wh [expr {$wbot - $wtop}] + set newtop $wtop + if {$ytop < $wtop} { + if {$ybot < $wtop} { + set newtop [expr {$y - $wh / 2.0}] + } else { + set newtop $ytop + if {$newtop > $wtop - $linespc} { + set newtop [expr {$wtop - $linespc}] + } + } + } elseif {$ybot > $wbot} { + if {$ytop > $wbot} { + set newtop [expr {$y - $wh / 2.0}] + } else { + set newtop [expr {$ybot - $wh}] + if {$newtop < $wtop + $linespc} { + set newtop [expr {$wtop + $linespc}] + } + } + } + if {$newtop != $wtop} { + if {$newtop < 0} { + set newtop 0 + } + allcanvs yview moveto [expr $newtop * 1.0 / $ymax] + } + + if {$isnew} { + addtohistory [list selectline $l 0] + } + + set selectedline $l + + set id $lineid($l) + set currentid $id + $sha1entry delete 0 end + $sha1entry insert 0 $id + $sha1entry selection from 0 + $sha1entry selection to end + + $ctext conf -state normal + $ctext delete 0.0 end + set linknum 0 + $ctext mark set fmark.0 0.0 + $ctext mark gravity fmark.0 left + set info $commitinfo($id) + $ctext insert end "Revision: [lindex $info 6]\n" + if {[llength [lindex $info 7]] > 0} { + $ctext insert end "Branch: [lindex $info 7]\n" + } + $ctext insert end "Author: [lindex $info 1] [lindex $info 2]\n" + $ctext insert end "Committer: [lindex $info 3] [lindex $info 4]\n" + if {[info exists idtags($id)]} { + $ctext insert end "Tags:" + foreach tag $idtags($id) { + $ctext insert end " $tag" + } + $ctext insert end "\n" + } + + set comment {} + if {[info exists parents($id)]} { + foreach p $parents($id) { + append comment "Parent: [commit_descriptor $p]\n" + } + } + if {[info exists children($id)]} { + foreach c $children($id) { + append comment "Child: [commit_descriptor $c]\n" + } + } + append comment "\n" + append comment [lindex $info 5] + + # make anything that looks like a SHA1 ID be a clickable link + appendwithlinks $comment + + $ctext tag delete Comments + $ctext tag remove found 1.0 end + $ctext conf -state disabled + set commentend [$ctext index "end - 1c"] + + $cflist delete 0 end + $cflist insert end "Comments" + if {$nparents($id) <= 1} { + set parent "null" + if {$nparents($id) == 1} { + set parent $parents($id) + } + startdiff [concat $id $parent] + } elseif {$nparents($id) > 1} { + mergediff $id + } +} + +proc selnextline {dir} { + global selectedline + if {![info exists selectedline]} return + set l [expr $selectedline + $dir] + unmarkmatches + selectline $l 1 +} + +proc unselectline {} { + global selectedline + + catch {unset selectedline} + allcanvs delete secsel +} + +proc addtohistory {cmd} { + global history historyindex + + if {$historyindex > 0 + && [lindex $history [expr {$historyindex - 1}]] == $cmd} { + return + } + + if {$historyindex < [llength $history]} { + set history [lreplace $history $historyindex end $cmd] + } else { + lappend history $cmd + } + incr historyindex + if {$historyindex > 1} { + .ctop.top.bar.leftbut conf -state normal + } else { + .ctop.top.bar.leftbut conf -state disabled + } + .ctop.top.bar.rightbut conf -state disabled +} + +proc goback {} { + global history historyindex + + if {$historyindex > 1} { + incr historyindex -1 + set cmd [lindex $history [expr {$historyindex - 1}]] + eval $cmd + .ctop.top.bar.rightbut conf -state normal + } + if {$historyindex <= 1} { + .ctop.top.bar.leftbut conf -state disabled + } +} + +proc goforw {} { + global history historyindex + + if {$historyindex < [llength $history]} { + set cmd [lindex $history $historyindex] + incr historyindex + eval $cmd + .ctop.top.bar.leftbut conf -state normal + } + if {$historyindex >= [llength $history]} { + .ctop.top.bar.rightbut conf -state disabled + } +} + +proc mergediff {id} { + global parents diffmergeid diffmergegca mergefilelist diffpindex + + set diffmergeid $id + set diffpindex -1 + set diffmergegca [findgca $parents($id)] + if {[info exists mergefilelist($id)]} { + if {$mergefilelist($id) ne {}} { + showmergediff + } + } else { + contmergediff {} + } +} + +proc findgca {ids} { + global env + set gca {} + foreach id $ids { + if {$gca eq {}} { + set gca $id + } else { + if {[catch { + set gca [exec $env(HG) --config ui.report_untrusted=false debug-merge-base $gca $id] + } err]} { + return {} + } + } + } + return $gca +} + +proc contmergediff {ids} { + global diffmergeid diffpindex parents nparents diffmergegca + global treediffs mergefilelist diffids treepending + + # diff the child against each of the parents, and diff + # each of the parents against the GCA. + while 1 { + if {[lindex $ids 0] == $diffmergeid && $diffmergegca ne {}} { + set ids [list [lindex $ids 1] $diffmergegca] + } else { + if {[incr diffpindex] >= $nparents($diffmergeid)} break + set p [lindex $parents($diffmergeid) $diffpindex] + set ids [list $diffmergeid $p] + } + if {![info exists treediffs($ids)]} { + set diffids $ids + if {![info exists treepending]} { + gettreediffs $ids + } + return + } + } + + # If a file in some parent is different from the child and also + # different from the GCA, then it's interesting. + # If we don't have a GCA, then a file is interesting if it is + # different from the child in all the parents. + if {$diffmergegca ne {}} { + set files {} + foreach p $parents($diffmergeid) { + set gcadiffs $treediffs([list $p $diffmergegca]) + foreach f $treediffs([list $diffmergeid $p]) { + if {[lsearch -exact $files $f] < 0 + && [lsearch -exact $gcadiffs $f] >= 0} { + lappend files $f + } + } + } + set files [lsort $files] + } else { + set p [lindex $parents($diffmergeid) 0] + set files $treediffs([list $diffmergeid $p]) + for {set i 1} {$i < $nparents($diffmergeid) && $files ne {}} {incr i} { + set p [lindex $parents($diffmergeid) $i] + set df $treediffs([list $diffmergeid $p]) + set nf {} + foreach f $files { + if {[lsearch -exact $df $f] >= 0} { + lappend nf $f + } + } + set files $nf + } + } + + set mergefilelist($diffmergeid) $files + if {$files ne {}} { + showmergediff + } +} + +proc showmergediff {} { + global cflist diffmergeid mergefilelist parents + global diffopts diffinhunk currentfile currenthunk filelines + global diffblocked groupfilelast mergefds groupfilenum grouphunks + global env + + set files $mergefilelist($diffmergeid) + foreach f $files { + $cflist insert end $f + } + set env(GIT_DIFF_OPTS) $diffopts + set flist {} + catch {unset currentfile} + catch {unset currenthunk} + catch {unset filelines} + catch {unset groupfilenum} + catch {unset grouphunks} + set groupfilelast -1 + foreach p $parents($diffmergeid) { + set cmd [list | $env(HG) --config ui.report_untrusted=false debug-diff-tree -p $p $diffmergeid] + set cmd [concat $cmd $mergefilelist($diffmergeid)] + if {[catch {set f [open $cmd r]} err]} { + error_popup "Error getting diffs: $err" + foreach f $flist { + catch {close $f} + } + return + } + lappend flist $f + set ids [list $diffmergeid $p] + set mergefds($ids) $f + set diffinhunk($ids) 0 + set diffblocked($ids) 0 + fconfigure $f -blocking 0 + fileevent $f readable [list getmergediffline $f $ids $diffmergeid] + } +} + +proc getmergediffline {f ids id} { + global diffmergeid diffinhunk diffoldlines diffnewlines + global currentfile currenthunk + global diffoldstart diffnewstart diffoldlno diffnewlno + global diffblocked mergefilelist + global noldlines nnewlines difflcounts filelines + + set n [gets $f line] + if {$n < 0} { + if {![eof $f]} return + } + + if {!([info exists diffmergeid] && $diffmergeid == $id)} { + if {$n < 0} { + close $f + } + return + } + + if {$diffinhunk($ids) != 0} { + set fi $currentfile($ids) + if {$n > 0 && [regexp {^[-+ \\]} $line match]} { + # continuing an existing hunk + set line [string range $line 1 end] + set p [lindex $ids 1] + if {$match eq "-" || $match eq " "} { + set filelines($p,$fi,$diffoldlno($ids)) $line + incr diffoldlno($ids) + } + if {$match eq "+" || $match eq " "} { + set filelines($id,$fi,$diffnewlno($ids)) $line + incr diffnewlno($ids) + } + if {$match eq " "} { + if {$diffinhunk($ids) == 2} { + lappend difflcounts($ids) \ + [list $noldlines($ids) $nnewlines($ids)] + set noldlines($ids) 0 + set diffinhunk($ids) 1 + } + incr noldlines($ids) + } elseif {$match eq "-" || $match eq "+"} { + if {$diffinhunk($ids) == 1} { + lappend difflcounts($ids) [list $noldlines($ids)] + set noldlines($ids) 0 + set nnewlines($ids) 0 + set diffinhunk($ids) 2 + } + if {$match eq "-"} { + incr noldlines($ids) + } else { + incr nnewlines($ids) + } + } + # and if it's \ No newline at end of line, then what? + return + } + # end of a hunk + if {$diffinhunk($ids) == 1 && $noldlines($ids) != 0} { + lappend difflcounts($ids) [list $noldlines($ids)] + } elseif {$diffinhunk($ids) == 2 + && ($noldlines($ids) != 0 || $nnewlines($ids) != 0)} { + lappend difflcounts($ids) [list $noldlines($ids) $nnewlines($ids)] + } + set currenthunk($ids) [list $currentfile($ids) \ + $diffoldstart($ids) $diffnewstart($ids) \ + $diffoldlno($ids) $diffnewlno($ids) \ + $difflcounts($ids)] + set diffinhunk($ids) 0 + # -1 = need to block, 0 = unblocked, 1 = is blocked + set diffblocked($ids) -1 + processhunks + if {$diffblocked($ids) == -1} { + fileevent $f readable {} + set diffblocked($ids) 1 + } + } + + if {$n < 0} { + # eof + if {!$diffblocked($ids)} { + close $f + set currentfile($ids) [llength $mergefilelist($diffmergeid)] + set currenthunk($ids) [list $currentfile($ids) 0 0 0 0 {}] + processhunks + } + } elseif {[regexp {^diff --git a/(.*) b/} $line match fname]} { + # start of a new file + set currentfile($ids) \ + [lsearch -exact $mergefilelist($diffmergeid) $fname] + } elseif {[regexp {^@@ -([0-9]+),([0-9]+) \+([0-9]+),([0-9]+) @@(.*)} \ + $line match f1l f1c f2l f2c rest]} { + if {[info exists currentfile($ids)] && $currentfile($ids) >= 0} { + # start of a new hunk + if {$f1l == 0 && $f1c == 0} { + set f1l 1 + } + if {$f2l == 0 && $f2c == 0} { + set f2l 1 + } + set diffinhunk($ids) 1 + set diffoldstart($ids) $f1l + set diffnewstart($ids) $f2l + set diffoldlno($ids) $f1l + set diffnewlno($ids) $f2l + set difflcounts($ids) {} + set noldlines($ids) 0 + set nnewlines($ids) 0 + } + } +} + +proc processhunks {} { + global diffmergeid parents nparents currenthunk + global mergefilelist diffblocked mergefds + global grouphunks grouplinestart grouplineend groupfilenum + + set nfiles [llength $mergefilelist($diffmergeid)] + while 1 { + set fi $nfiles + set lno 0 + # look for the earliest hunk + foreach p $parents($diffmergeid) { + set ids [list $diffmergeid $p] + if {![info exists currenthunk($ids)]} return + set i [lindex $currenthunk($ids) 0] + set l [lindex $currenthunk($ids) 2] + if {$i < $fi || ($i == $fi && $l < $lno)} { + set fi $i + set lno $l + set pi $p + } + } + + if {$fi < $nfiles} { + set ids [list $diffmergeid $pi] + set hunk $currenthunk($ids) + unset currenthunk($ids) + if {$diffblocked($ids) > 0} { + fileevent $mergefds($ids) readable \ + [list getmergediffline $mergefds($ids) $ids $diffmergeid] + } + set diffblocked($ids) 0 + + if {[info exists groupfilenum] && $groupfilenum == $fi + && $lno <= $grouplineend} { + # add this hunk to the pending group + lappend grouphunks($pi) $hunk + set endln [lindex $hunk 4] + if {$endln > $grouplineend} { + set grouplineend $endln + } + continue + } + } + + # succeeding stuff doesn't belong in this group, so + # process the group now + if {[info exists groupfilenum]} { + processgroup + unset groupfilenum + unset grouphunks + } + + if {$fi >= $nfiles} break + + # start a new group + set groupfilenum $fi + set grouphunks($pi) [list $hunk] + set grouplinestart $lno + set grouplineend [lindex $hunk 4] + } +} + +proc processgroup {} { + global groupfilelast groupfilenum difffilestart + global mergefilelist diffmergeid ctext filelines + global parents diffmergeid diffoffset + global grouphunks grouplinestart grouplineend nparents + global mergemax + + $ctext conf -state normal + set id $diffmergeid + set f $groupfilenum + if {$groupfilelast != $f} { + $ctext insert end "\n" + set here [$ctext index "end - 1c"] + set difffilestart($f) $here + set mark fmark.[expr {$f + 1}] + $ctext mark set $mark $here + $ctext mark gravity $mark left + set header [lindex $mergefilelist($id) $f] + set l [expr {(78 - [string length $header]) / 2}] + set pad [string range "----------------------------------------" 1 $l] + $ctext insert end "$pad $header $pad\n" filesep + set groupfilelast $f + foreach p $parents($id) { + set diffoffset($p) 0 + } + } + + $ctext insert end "@@" msep + set nlines [expr {$grouplineend - $grouplinestart}] + set events {} + set pnum 0 + foreach p $parents($id) { + set startline [expr {$grouplinestart + $diffoffset($p)}] + set ol $startline + set nl $grouplinestart + if {[info exists grouphunks($p)]} { + foreach h $grouphunks($p) { + set l [lindex $h 2] + if {$nl < $l} { + for {} {$nl < $l} {incr nl} { + set filelines($p,$f,$ol) $filelines($id,$f,$nl) + incr ol + } + } + foreach chunk [lindex $h 5] { + if {[llength $chunk] == 2} { + set olc [lindex $chunk 0] + set nlc [lindex $chunk 1] + set nnl [expr {$nl + $nlc}] + lappend events [list $nl $nnl $pnum $olc $nlc] + incr ol $olc + set nl $nnl + } else { + incr ol [lindex $chunk 0] + incr nl [lindex $chunk 0] + } + } + } + } + if {$nl < $grouplineend} { + for {} {$nl < $grouplineend} {incr nl} { + set filelines($p,$f,$ol) $filelines($id,$f,$nl) + incr ol + } + } + set nlines [expr {$ol - $startline}] + $ctext insert end " -$startline,$nlines" msep + incr pnum + } + + set nlines [expr {$grouplineend - $grouplinestart}] + $ctext insert end " +$grouplinestart,$nlines @@\n" msep + + set events [lsort -integer -index 0 $events] + set nevents [llength $events] + set nmerge $nparents($diffmergeid) + set l $grouplinestart + for {set i 0} {$i < $nevents} {set i $j} { + set nl [lindex $events $i 0] + while {$l < $nl} { + $ctext insert end " $filelines($id,$f,$l)\n" + incr l + } + set e [lindex $events $i] + set enl [lindex $e 1] + set j $i + set active {} + while 1 { + set pnum [lindex $e 2] + set olc [lindex $e 3] + set nlc [lindex $e 4] + if {![info exists delta($pnum)]} { + set delta($pnum) [expr {$olc - $nlc}] + lappend active $pnum + } else { + incr delta($pnum) [expr {$olc - $nlc}] + } + if {[incr j] >= $nevents} break + set e [lindex $events $j] + if {[lindex $e 0] >= $enl} break + if {[lindex $e 1] > $enl} { + set enl [lindex $e 1] + } + } + set nlc [expr {$enl - $l}] + set ncol mresult + set bestpn -1 + if {[llength $active] == $nmerge - 1} { + # no diff for one of the parents, i.e. it's identical + for {set pnum 0} {$pnum < $nmerge} {incr pnum} { + if {![info exists delta($pnum)]} { + if {$pnum < $mergemax} { + lappend ncol m$pnum + } else { + lappend ncol mmax + } + break + } + } + } elseif {[llength $active] == $nmerge} { + # all parents are different, see if one is very similar + set bestsim 30 + for {set pnum 0} {$pnum < $nmerge} {incr pnum} { + set sim [similarity $pnum $l $nlc $f \ + [lrange $events $i [expr {$j-1}]]] + if {$sim > $bestsim} { + set bestsim $sim + set bestpn $pnum + } + } + if {$bestpn >= 0} { + lappend ncol m$bestpn + } + } + set pnum -1 + foreach p $parents($id) { + incr pnum + if {![info exists delta($pnum)] || $pnum == $bestpn} continue + set olc [expr {$nlc + $delta($pnum)}] + set ol [expr {$l + $diffoffset($p)}] + incr diffoffset($p) $delta($pnum) + unset delta($pnum) + for {} {$olc > 0} {incr olc -1} { + $ctext insert end "-$filelines($p,$f,$ol)\n" m$pnum + incr ol + } + } + set endl [expr {$l + $nlc}] + if {$bestpn >= 0} { + # show this pretty much as a normal diff + set p [lindex $parents($id) $bestpn] + set ol [expr {$l + $diffoffset($p)}] + incr diffoffset($p) $delta($bestpn) + unset delta($bestpn) + for {set k $i} {$k < $j} {incr k} { + set e [lindex $events $k] + if {[lindex $e 2] != $bestpn} continue + set nl [lindex $e 0] + set ol [expr {$ol + $nl - $l}] + for {} {$l < $nl} {incr l} { + $ctext insert end "+$filelines($id,$f,$l)\n" $ncol + } + set c [lindex $e 3] + for {} {$c > 0} {incr c -1} { + $ctext insert end "-$filelines($p,$f,$ol)\n" m$bestpn + incr ol + } + set nl [lindex $e 1] + for {} {$l < $nl} {incr l} { + $ctext insert end "+$filelines($id,$f,$l)\n" mresult + } + } + } + for {} {$l < $endl} {incr l} { + $ctext insert end "+$filelines($id,$f,$l)\n" $ncol + } + } + while {$l < $grouplineend} { + $ctext insert end " $filelines($id,$f,$l)\n" + incr l + } + $ctext conf -state disabled +} + +proc similarity {pnum l nlc f events} { + global diffmergeid parents diffoffset filelines + + set id $diffmergeid + set p [lindex $parents($id) $pnum] + set ol [expr {$l + $diffoffset($p)}] + set endl [expr {$l + $nlc}] + set same 0 + set diff 0 + foreach e $events { + if {[lindex $e 2] != $pnum} continue + set nl [lindex $e 0] + set ol [expr {$ol + $nl - $l}] + for {} {$l < $nl} {incr l} { + incr same [string length $filelines($id,$f,$l)] + incr same + } + set oc [lindex $e 3] + for {} {$oc > 0} {incr oc -1} { + incr diff [string length $filelines($p,$f,$ol)] + incr diff + incr ol + } + set nl [lindex $e 1] + for {} {$l < $nl} {incr l} { + incr diff [string length $filelines($id,$f,$l)] + incr diff + } + } + for {} {$l < $endl} {incr l} { + incr same [string length $filelines($id,$f,$l)] + incr same + } + if {$same == 0} { + return 0 + } + return [expr {200 * $same / (2 * $same + $diff)}] +} + +proc startdiff {ids} { + global treediffs diffids treepending diffmergeid + + set diffids $ids + catch {unset diffmergeid} + if {![info exists treediffs($ids)]} { + if {![info exists treepending]} { + gettreediffs $ids + } + } else { + addtocflist $ids + } +} + +proc addtocflist {ids} { + global treediffs cflist + foreach f $treediffs($ids) { + $cflist insert end $f + } + getblobdiffs $ids +} + +proc gettreediffs {ids} { + global treediff parents treepending env + set treepending $ids + set treediff {} + set id [lindex $ids 0] + set p [lindex $ids 1] + if [catch {set gdtf [open "|{$env(HG)} --config ui.report_untrusted=false debug-diff-tree -r $p $id" r]}] return + fconfigure $gdtf -blocking 0 + fileevent $gdtf readable [list gettreediffline $gdtf $ids] +} + +proc gettreediffline {gdtf ids} { + global treediff treediffs treepending diffids diffmergeid + + set n [gets $gdtf line] + if {$n < 0} { + if {![eof $gdtf]} return + close $gdtf + set treediffs($ids) $treediff + unset treepending + if {$ids != $diffids} { + gettreediffs $diffids + } else { + if {[info exists diffmergeid]} { + contmergediff $ids + } else { + addtocflist $ids + } + } + return + } + set tab1 [expr [string first "\t" $line] + 1] + set tab2 [expr [string first "\t" $line $tab1] - 1] + set file [string range $line $tab1 $tab2] + lappend treediff $file +} + +proc getblobdiffs {ids} { + global diffopts blobdifffd diffids env curdifftag curtagstart + global difffilestart nextupdate diffinhdr treediffs + + set id [lindex $ids 0] + set p [lindex $ids 1] + set env(GIT_DIFF_OPTS) $diffopts + set cmd [list | $env(HG) --config ui.report_untrusted=false debug-diff-tree -r -p -C $p $id] + if {[catch {set bdf [open $cmd r]} err]} { + puts "error getting diffs: $err" + return + } + set diffinhdr 0 + fconfigure $bdf -blocking 0 + set blobdifffd($ids) $bdf + set curdifftag Comments + set curtagstart 0.0 + catch {unset difffilestart} + fileevent $bdf readable [list getblobdiffline $bdf $diffids] + set nextupdate [expr {[clock clicks -milliseconds] + 100}] +} + +proc getblobdiffline {bdf ids} { + global diffids blobdifffd ctext curdifftag curtagstart + global diffnexthead diffnextnote difffilestart + global nextupdate diffinhdr treediffs + global gaudydiff + + set n [gets $bdf line] + if {$n < 0} { + if {[eof $bdf]} { + close $bdf + if {$ids == $diffids && $bdf == $blobdifffd($ids)} { + $ctext tag add $curdifftag $curtagstart end + } + } + return + } + if {$ids != $diffids || $bdf != $blobdifffd($ids)} { + return + } + regsub -all "\r" $line "" line + $ctext conf -state normal + if {[regexp {^diff --git a/(.*) b/(.*)} $line match fname newname]} { + # start of a new file + $ctext insert end "\n" + $ctext tag add $curdifftag $curtagstart end + set curtagstart [$ctext index "end - 1c"] + set header $newname + set here [$ctext index "end - 1c"] + set i [lsearch -exact $treediffs($diffids) $fname] + if {$i >= 0} { + set difffilestart($i) $here + incr i + $ctext mark set fmark.$i $here + $ctext mark gravity fmark.$i left + } + if {$newname != $fname} { + set i [lsearch -exact $treediffs($diffids) $newname] + if {$i >= 0} { + set difffilestart($i) $here + incr i + $ctext mark set fmark.$i $here + $ctext mark gravity fmark.$i left + } + } + set curdifftag "f:$fname" + $ctext tag delete $curdifftag + set l [expr {(78 - [string length $header]) / 2}] + set pad [string range "----------------------------------------" 1 $l] + $ctext insert end "$pad $header $pad\n" filesep + set diffinhdr 1 + } elseif {[regexp {^(---|\+\+\+) } $line] && $diffinhdr} { + set diffinhdr 1 + } elseif {[regexp {^@@ -([0-9]+),([0-9]+) \+([0-9]+),([0-9]+) @@(.*)} \ + $line match f1l f1c f2l f2c rest]} { + if {$gaudydiff} { + $ctext insert end "\t" hunksep + $ctext insert end " $f1l " d0 " $f2l " d1 + $ctext insert end " $rest \n" hunksep + } else { + $ctext insert end "$line\n" hunksep + } + set diffinhdr 0 + } else { + set x [string range $line 0 0] + if {$x == "-" || $x == "+"} { + set tag [expr {$x == "+"}] + if {$gaudydiff} { + set line [string range $line 1 end] + } + $ctext insert end "$line\n" d$tag + } elseif {$x == " "} { + if {$gaudydiff} { + set line [string range $line 1 end] + } + $ctext insert end "$line\n" + } elseif {$diffinhdr || $x == "\\"} { + # e.g. "\ No newline at end of file" + $ctext insert end "$line\n" filesep + } elseif {$line != ""} { + # Something else we don't recognize + if {$curdifftag != "Comments"} { + $ctext insert end "\n" + $ctext tag add $curdifftag $curtagstart end + set curtagstart [$ctext index "end - 1c"] + set curdifftag Comments + } + $ctext insert end "$line\n" filesep + } + } + $ctext conf -state disabled + if {[clock clicks -milliseconds] >= $nextupdate} { + incr nextupdate 100 + fileevent $bdf readable {} + update + fileevent $bdf readable "getblobdiffline $bdf {$ids}" + } +} + +proc nextfile {} { + global difffilestart ctext + set here [$ctext index @0,0] + for {set i 0} {[info exists difffilestart($i)]} {incr i} { + if {[$ctext compare $difffilestart($i) > $here]} { + if {![info exists pos] + || [$ctext compare $difffilestart($i) < $pos]} { + set pos $difffilestart($i) + } + } + } + if {[info exists pos]} { + $ctext yview $pos + } +} + +proc listboxsel {} { + global ctext cflist currentid + if {![info exists currentid]} return + set sel [lsort [$cflist curselection]] + if {$sel eq {}} return + set first [lindex $sel 0] + catch {$ctext yview fmark.$first} +} + +proc setcoords {} { + global linespc charspc canvx0 canvy0 mainfont + global xspc1 xspc2 lthickness + + set linespc [font metrics $mainfont -linespace] + set charspc [font measure $mainfont "m"] + set canvy0 [expr 3 + 0.5 * $linespc] + set canvx0 [expr 3 + 0.5 * $linespc] + set lthickness [expr {int($linespc / 9) + 1}] + set xspc1(0) $linespc + set xspc2 $linespc +} + +proc redisplay {} { + global stopped redisplaying phase + if {$stopped > 1} return + if {$phase == "getcommits"} return + set redisplaying 1 + if {$phase == "drawgraph" || $phase == "incrdraw"} { + set stopped 1 + } else { + drawgraph + } +} + +proc incrfont {inc} { + global mainfont namefont textfont ctext canv phase + global stopped entries curidfont + unmarkmatches + set mainfont [lreplace $mainfont 1 1 [expr {[lindex $mainfont 1] + $inc}]] + set curidfont [lreplace $curidfont 1 1 [expr {[lindex $curidfont 1] + $inc}]] + set namefont [lreplace $namefont 1 1 [expr {[lindex $namefont 1] + $inc}]] + set textfont [lreplace $textfont 1 1 [expr {[lindex $textfont 1] + $inc}]] + setcoords + $ctext conf -font $textfont + $ctext tag conf filesep -font [concat $textfont bold] + foreach e $entries { + $e conf -font $mainfont + } + if {$phase == "getcommits"} { + $canv itemconf textitems -font $mainfont + } + redisplay +} + +proc clearsha1 {} { + global sha1entry sha1string + if {[string length $sha1string] == 40} { + $sha1entry delete 0 end + } +} + +proc sha1change {n1 n2 op} { + global sha1string currentid sha1but + if {$sha1string == {} + || ([info exists currentid] && $sha1string == $currentid)} { + set state disabled + } else { + set state normal + } + if {[$sha1but cget -state] == $state} return + if {$state == "normal"} { + $sha1but conf -state normal -relief raised -text "Goto: " + } else { + $sha1but conf -state disabled -relief flat -text "SHA1 ID: " + } +} + +proc gotocommit {} { + global sha1string currentid idline tagids + global lineid numcommits + + if {$sha1string == {} + || ([info exists currentid] && $sha1string == $currentid)} return + if {[info exists tagids($sha1string)]} { + set id $tagids($sha1string) + } else { + set id [string tolower $sha1string] + if {[regexp {^[0-9a-f]{4,39}$} $id]} { + set matches {} + for {set l 0} {$l < $numcommits} {incr l} { + if {[string match $id* $lineid($l)]} { + lappend matches $lineid($l) + } + } + if {$matches ne {}} { + if {[llength $matches] > 1} { + error_popup "Short SHA1 id $id is ambiguous" + return + } + set id [lindex $matches 0] + } + } + } + if {[info exists idline($id)]} { + selectline $idline($id) 1 + return + } + if {[regexp {^[0-9a-fA-F]{4,}$} $sha1string]} { + set type "SHA1 id" + } else { + set type "Tag" + } + error_popup "$type $sha1string is not known" +} + +proc lineenter {x y id} { + global hoverx hovery hoverid hovertimer + global commitinfo canv + + if {![info exists commitinfo($id)]} return + set hoverx $x + set hovery $y + set hoverid $id + if {[info exists hovertimer]} { + after cancel $hovertimer + } + set hovertimer [after 500 linehover] + $canv delete hover +} + +proc linemotion {x y id} { + global hoverx hovery hoverid hovertimer + + if {[info exists hoverid] && $id == $hoverid} { + set hoverx $x + set hovery $y + if {[info exists hovertimer]} { + after cancel $hovertimer + } + set hovertimer [after 500 linehover] + } +} + +proc lineleave {id} { + global hoverid hovertimer canv + + if {[info exists hoverid] && $id == $hoverid} { + $canv delete hover + if {[info exists hovertimer]} { + after cancel $hovertimer + unset hovertimer + } + unset hoverid + } +} + +proc linehover {} { + global hoverx hovery hoverid hovertimer + global canv linespc lthickness + global commitinfo mainfont + + set text [lindex $commitinfo($hoverid) 0] + set ymax [lindex [$canv cget -scrollregion] 3] + if {$ymax == {}} return + set yfrac [lindex [$canv yview] 0] + set x [expr {$hoverx + 2 * $linespc}] + set y [expr {$hovery + $yfrac * $ymax - $linespc / 2}] + set x0 [expr {$x - 2 * $lthickness}] + set y0 [expr {$y - 2 * $lthickness}] + set x1 [expr {$x + [font measure $mainfont $text] + 2 * $lthickness}] + set y1 [expr {$y + $linespc + 2 * $lthickness}] + set t [$canv create rectangle $x0 $y0 $x1 $y1 \ + -fill \#ffff80 -outline black -width 1 -tags hover] + $canv raise $t + set t [$canv create text $x $y -anchor nw -text $text -tags hover] + $canv raise $t +} + +proc clickisonarrow {id y} { + global mainline mainlinearrow sidelines lthickness + + set thresh [expr {2 * $lthickness + 6}] + if {[info exists mainline($id)]} { + if {$mainlinearrow($id) ne "none"} { + if {abs([lindex $mainline($id) 1] - $y) < $thresh} { + return "up" + } + } + } + if {[info exists sidelines($id)]} { + foreach ls $sidelines($id) { + set coords [lindex $ls 0] + set arrow [lindex $ls 2] + if {$arrow eq "first" || $arrow eq "both"} { + if {abs([lindex $coords 1] - $y) < $thresh} { + return "up" + } + } + if {$arrow eq "last" || $arrow eq "both"} { + if {abs([lindex $coords end] - $y) < $thresh} { + return "down" + } + } + } + } + return {} +} + +proc arrowjump {id dirn y} { + global mainline sidelines canv + + set yt {} + if {$dirn eq "down"} { + if {[info exists mainline($id)]} { + set y1 [lindex $mainline($id) 1] + if {$y1 > $y} { + set yt $y1 + } + } + if {[info exists sidelines($id)]} { + foreach ls $sidelines($id) { + set y1 [lindex $ls 0 1] + if {$y1 > $y && ($yt eq {} || $y1 < $yt)} { + set yt $y1 + } + } + } + } else { + if {[info exists sidelines($id)]} { + foreach ls $sidelines($id) { + set y1 [lindex $ls 0 end] + if {$y1 < $y && ($yt eq {} || $y1 > $yt)} { + set yt $y1 + } + } + } + } + if {$yt eq {}} return + set ymax [lindex [$canv cget -scrollregion] 3] + if {$ymax eq {} || $ymax <= 0} return + set view [$canv yview] + set yspan [expr {[lindex $view 1] - [lindex $view 0]}] + set yfrac [expr {$yt / $ymax - $yspan / 2}] + if {$yfrac < 0} { + set yfrac 0 + } + $canv yview moveto $yfrac +} + +proc lineclick {x y id isnew} { + global ctext commitinfo children cflist canv thickerline + + unmarkmatches + unselectline + normalline + $canv delete hover + # draw this line thicker than normal + drawlines $id 1 + set thickerline $id + if {$isnew} { + set ymax [lindex [$canv cget -scrollregion] 3] + if {$ymax eq {}} return + set yfrac [lindex [$canv yview] 0] + set y [expr {$y + $yfrac * $ymax}] + } + set dirn [clickisonarrow $id $y] + if {$dirn ne {}} { + arrowjump $id $dirn $y + return + } + + if {$isnew} { + addtohistory [list lineclick $x $y $id 0] + } + # fill the details pane with info about this line + $ctext conf -state normal + $ctext delete 0.0 end + $ctext tag conf link -foreground blue -underline 1 + $ctext tag bind link <Enter> { %W configure -cursor hand2 } + $ctext tag bind link <Leave> { %W configure -cursor $curtextcursor } + $ctext insert end "Parent:\t" + $ctext insert end $id [list link link0] + $ctext tag bind link0 <1> [list selbyid $id] + set info $commitinfo($id) + $ctext insert end "\n\t[lindex $info 0]\n" + $ctext insert end "\tAuthor:\t[lindex $info 1]\n" + $ctext insert end "\tDate:\t[lindex $info 2]\n" + if {[info exists children($id)]} { + $ctext insert end "\nChildren:" + set i 0 + foreach child $children($id) { + incr i + set info $commitinfo($child) + $ctext insert end "\n\t" + $ctext insert end $child [list link link$i] + $ctext tag bind link$i <1> [list selbyid $child] + $ctext insert end "\n\t[lindex $info 0]" + $ctext insert end "\n\tAuthor:\t[lindex $info 1]" + $ctext insert end "\n\tDate:\t[lindex $info 2]\n" + } + } + $ctext conf -state disabled + + $cflist delete 0 end +} + +proc normalline {} { + global thickerline + if {[info exists thickerline]} { + drawlines $thickerline 0 + unset thickerline + } +} + +proc selbyid {id} { + global idline + if {[info exists idline($id)]} { + selectline $idline($id) 1 + } +} + +proc mstime {} { + global startmstime + if {![info exists startmstime]} { + set startmstime [clock clicks -milliseconds] + } + return [format "%.3f" [expr {([clock click -milliseconds] - $startmstime) / 1000.0}]] +} + +proc rowmenu {x y id} { + global rowctxmenu idline selectedline rowmenuid hgvdiff + + if {![info exists selectedline] || $idline($id) eq $selectedline} { + set state disabled + } else { + set state normal + } + $rowctxmenu entryconfigure 0 -state $state + $rowctxmenu entryconfigure 1 -state $state + $rowctxmenu entryconfigure 2 -state $state + if { $hgvdiff ne "" } { + $rowctxmenu entryconfigure 6 -state $state + } + set rowmenuid $id + tk_popup $rowctxmenu $x $y +} + +proc diffvssel {dirn} { + global rowmenuid selectedline lineid + + if {![info exists selectedline]} return + if {$dirn} { + set oldid $lineid($selectedline) + set newid $rowmenuid + } else { + set oldid $rowmenuid + set newid $lineid($selectedline) + } + addtohistory [list doseldiff $oldid $newid] + doseldiff $oldid $newid +} + +proc doseldiff {oldid newid} { + global ctext cflist + global commitinfo + + $ctext conf -state normal + $ctext delete 0.0 end + $ctext mark set fmark.0 0.0 + $ctext mark gravity fmark.0 left + $cflist delete 0 end + $cflist insert end "Top" + $ctext insert end "From " + $ctext tag conf link -foreground blue -underline 1 + $ctext tag bind link <Enter> { %W configure -cursor hand2 } + $ctext tag bind link <Leave> { %W configure -cursor $curtextcursor } + $ctext tag bind link0 <1> [list selbyid $oldid] + $ctext insert end $oldid [list link link0] + $ctext insert end "\n " + $ctext insert end [lindex $commitinfo($oldid) 0] + $ctext insert end "\n\nTo " + $ctext tag bind link1 <1> [list selbyid $newid] + $ctext insert end $newid [list link link1] + $ctext insert end "\n " + $ctext insert end [lindex $commitinfo($newid) 0] + $ctext insert end "\n" + $ctext conf -state disabled + $ctext tag delete Comments + $ctext tag remove found 1.0 end + startdiff [list $newid $oldid] +} + +proc mkpatch {} { + global rowmenuid currentid commitinfo patchtop patchnum + + if {![info exists currentid]} return + set oldid $currentid + set oldhead [lindex $commitinfo($oldid) 0] + set newid $rowmenuid + set newhead [lindex $commitinfo($newid) 0] + set top .patch + set patchtop $top + catch {destroy $top} + toplevel $top + label $top.title -text "Generate patch" + grid $top.title - -pady 10 + label $top.from -text "From:" + entry $top.fromsha1 -width 40 -relief flat + $top.fromsha1 insert 0 $oldid + $top.fromsha1 conf -state readonly + grid $top.from $top.fromsha1 -sticky w + entry $top.fromhead -width 60 -relief flat + $top.fromhead insert 0 $oldhead + $top.fromhead conf -state readonly + grid x $top.fromhead -sticky w + label $top.to -text "To:" + entry $top.tosha1 -width 40 -relief flat + $top.tosha1 insert 0 $newid + $top.tosha1 conf -state readonly + grid $top.to $top.tosha1 -sticky w + entry $top.tohead -width 60 -relief flat + $top.tohead insert 0 $newhead + $top.tohead conf -state readonly + grid x $top.tohead -sticky w + button $top.rev -text "Reverse" -command mkpatchrev -padx 5 + grid $top.rev x -pady 10 + label $top.flab -text "Output file:" + entry $top.fname -width 60 + $top.fname insert 0 [file normalize "patch$patchnum.patch"] + incr patchnum + grid $top.flab $top.fname -sticky w + frame $top.buts + button $top.buts.gen -text "Generate" -command mkpatchgo + button $top.buts.can -text "Cancel" -command mkpatchcan + grid $top.buts.gen $top.buts.can + grid columnconfigure $top.buts 0 -weight 1 -uniform a + grid columnconfigure $top.buts 1 -weight 1 -uniform a + grid $top.buts - -pady 10 -sticky ew + focus $top.fname +} + +proc mkpatchrev {} { + global patchtop + + set oldid [$patchtop.fromsha1 get] + set oldhead [$patchtop.fromhead get] + set newid [$patchtop.tosha1 get] + set newhead [$patchtop.tohead get] + foreach e [list fromsha1 fromhead tosha1 tohead] \ + v [list $newid $newhead $oldid $oldhead] { + $patchtop.$e conf -state normal + $patchtop.$e delete 0 end + $patchtop.$e insert 0 $v + $patchtop.$e conf -state readonly + } +} + +proc mkpatchgo {} { + global patchtop env + + set oldid [$patchtop.fromsha1 get] + set newid [$patchtop.tosha1 get] + set fname [$patchtop.fname get] + if {[catch {exec $env(HG) --config ui.report_untrusted=false debug-diff-tree -p $oldid $newid >$fname &} err]} { + error_popup "Error creating patch: $err" + } + catch {destroy $patchtop} + unset patchtop +} + +proc mkpatchcan {} { + global patchtop + + catch {destroy $patchtop} + unset patchtop +} + +proc mktag {} { + global rowmenuid mktagtop commitinfo + + set top .maketag + set mktagtop $top + catch {destroy $top} + toplevel $top + label $top.title -text "Create tag" + grid $top.title - -pady 10 + label $top.id -text "ID:" + entry $top.sha1 -width 40 -relief flat + $top.sha1 insert 0 $rowmenuid + $top.sha1 conf -state readonly + grid $top.id $top.sha1 -sticky w + entry $top.head -width 60 -relief flat + $top.head insert 0 [lindex $commitinfo($rowmenuid) 0] + $top.head conf -state readonly + grid x $top.head -sticky w + label $top.tlab -text "Tag name:" + entry $top.tag -width 60 + grid $top.tlab $top.tag -sticky w + frame $top.buts + button $top.buts.gen -text "Create" -command mktaggo + button $top.buts.can -text "Cancel" -command mktagcan + grid $top.buts.gen $top.buts.can + grid columnconfigure $top.buts 0 -weight 1 -uniform a + grid columnconfigure $top.buts 1 -weight 1 -uniform a + grid $top.buts - -pady 10 -sticky ew + focus $top.tag +} + +proc domktag {} { + global mktagtop env tagids idtags + + set id [$mktagtop.sha1 get] + set tag [$mktagtop.tag get] + if {$tag == {}} { + error_popup "No tag name specified" + return + } + if {[info exists tagids($tag)]} { + error_popup "Tag \"$tag\" already exists" + return + } + if {[catch { + set out [exec $env(HG) --config ui.report_untrusted=false tag -r $id $tag] + } err]} { + error_popup "Error creating tag: $err" + return + } + + set tagids($tag) $id + lappend idtags($id) $tag + redrawtags $id +} + +proc redrawtags {id} { + global canv linehtag idline idpos selectedline + + if {![info exists idline($id)]} return + $canv delete tag.$id + set xt [eval drawtags $id $idpos($id)] + $canv coords $linehtag($idline($id)) $xt [lindex $idpos($id) 2] + if {[info exists selectedline] && $selectedline == $idline($id)} { + selectline $selectedline 0 + } +} + +proc mktagcan {} { + global mktagtop + + catch {destroy $mktagtop} + unset mktagtop +} + +proc mktaggo {} { + domktag + mktagcan +} + +proc writecommit {} { + global rowmenuid wrcomtop commitinfo wrcomcmd + + set top .writecommit + set wrcomtop $top + catch {destroy $top} + toplevel $top + label $top.title -text "Write commit to file" + grid $top.title - -pady 10 + label $top.id -text "ID:" + entry $top.sha1 -width 40 -relief flat + $top.sha1 insert 0 $rowmenuid + $top.sha1 conf -state readonly + grid $top.id $top.sha1 -sticky w + entry $top.head -width 60 -relief flat + $top.head insert 0 [lindex $commitinfo($rowmenuid) 0] + $top.head conf -state readonly + grid x $top.head -sticky w + label $top.clab -text "Command:" + entry $top.cmd -width 60 -textvariable wrcomcmd + grid $top.clab $top.cmd -sticky w -pady 10 + label $top.flab -text "Output file:" + entry $top.fname -width 60 + $top.fname insert 0 [file normalize "commit-[string range $rowmenuid 0 6]"] + grid $top.flab $top.fname -sticky w + frame $top.buts + button $top.buts.gen -text "Write" -command wrcomgo + button $top.buts.can -text "Cancel" -command wrcomcan + grid $top.buts.gen $top.buts.can + grid columnconfigure $top.buts 0 -weight 1 -uniform a + grid columnconfigure $top.buts 1 -weight 1 -uniform a + grid $top.buts - -pady 10 -sticky ew + focus $top.fname +} + +proc wrcomgo {} { + global wrcomtop + + set id [$wrcomtop.sha1 get] + set cmd "echo $id | [$wrcomtop.cmd get]" + set fname [$wrcomtop.fname get] + if {[catch {exec sh -c $cmd > $fname &} err]} { + error_popup "Error writing commit: $err" + } + catch {destroy $wrcomtop} + unset wrcomtop +} + +proc wrcomcan {} { + global wrcomtop + + catch {destroy $wrcomtop} + unset wrcomtop +} + +proc listrefs {id} { + global idtags idheads idotherrefs + + set x {} + if {[info exists idtags($id)]} { + set x $idtags($id) + } + set y {} + if {[info exists idheads($id)]} { + set y $idheads($id) + } + set z {} + if {[info exists idotherrefs($id)]} { + set z $idotherrefs($id) + } + return [list $x $y $z] +} + +proc rereadrefs {} { + global idtags idheads idotherrefs + global tagids headids otherrefids + + set refids [concat [array names idtags] \ + [array names idheads] [array names idotherrefs]] + foreach id $refids { + if {![info exists ref($id)]} { + set ref($id) [listrefs $id] + } + } + foreach v {tagids idtags headids idheads otherrefids idotherrefs} { + catch {unset $v} + } + readrefs + set refids [lsort -unique [concat $refids [array names idtags] \ + [array names idheads] [array names idotherrefs]]] + foreach id $refids { + set v [listrefs $id] + if {![info exists ref($id)] || $ref($id) != $v} { + redrawtags $id + } + } +} + +proc vdiff {withparent} { + global env rowmenuid selectedline lineid hgvdiff + + if {![info exists rowmenuid]} return + set curid $rowmenuid + + if {$withparent} { + set parents [exec $env(HG) --config ui.report_untrusted=false parents --rev $curid --template "{node}\n"] + set firstparent [lindex [split $parents "\n"] 0] + set otherid $firstparent + } else { + if {![info exists selectedline]} return + set otherid $lineid($selectedline) + } + set range "$otherid:$curid" + if {[catch {exec $env(HG) --config ui.report_untrusted=false $hgvdiff -r $range} err]} { + # Ignore errors, this is just visualization + } +} + +proc showtag {tag isnew} { + global ctext cflist tagcontents tagids linknum + + if {$isnew} { + addtohistory [list showtag $tag 0] + } + $ctext conf -state normal + $ctext delete 0.0 end + set linknum 0 + if {[info exists tagcontents($tag)]} { + set text $tagcontents($tag) + } else { + set text "Tag: $tag\nId: $tagids($tag)" + } + appendwithlinks $text + $ctext conf -state disabled + $cflist delete 0 end +} + +proc doquit {} { + global stopped + set stopped 100 + destroy . +} + +proc getconfig {} { + global env + + set lines [exec $env(HG) debug-config] + regsub -all "\r\n" $lines "\n" config + set config {} + foreach line [split $lines "\n"] { + regsub "^(k|v)=" $line "" line + lappend config $line + } + return $config +} + +# defaults... +set datemode 0 +set boldnames 0 +set diffopts "-U 5 -p" +set wrcomcmd "\"\$HG\" --config ui.report_untrusted=false debug-diff-tree --stdin -p --pretty" + +set mainfont {Helvetica 9} +set curidfont {} +set textfont {Courier 9} +set findmergefiles 0 +set gaudydiff 0 +set maxgraphpct 50 +set maxwidth 16 + +set colors {green red blue magenta darkgrey brown orange} +set authorcolors { + black blue deeppink mediumorchid blue burlywood4 goldenrod slateblue red2 navy dimgrey +} +set bgcolor white + +# This color should probably be some system color (provided by tk), +# but as the bgcolor has always been set to white, I choose to ignore +set fgcolor black +set diffaddcolor "#00a000" +set diffremcolor red +set diffmerge1color red +set diffmerge2color blue +set hunksepcolor blue + +catch {source ~/.hgk} + +if {$curidfont == ""} { # initialize late based on current mainfont + set curidfont "$mainfont bold italic underline" +} + +set namefont $mainfont +if {$boldnames} { + lappend namefont bold +} + +set revtreeargs {} +foreach arg $argv { + switch -regexp -- $arg { + "^$" { } + "^-b" { set boldnames 1 } + "^-d" { set datemode 1 } + default { + lappend revtreeargs $arg + } + } +} + +set history {} +set historyindex 0 + +set stopped 0 +set redisplaying 0 +set stuffsaved 0 +set patchnum 0 + +array set config [getconfig] +set hgvdiff $config(vdiff) +setcoords +makewindow +readrefs +set hgroot [exec $env(HG) root] +wm title . "hgk $hgroot" +getcommits $revtreeargs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/contrib/hgwebdir.fcgi Wed Sep 07 19:58:38 2011 +0400 @@ -0,0 +1,62 @@ +#!/usr/bin/env python +# +# An example CGI script to export multiple hgweb repos, edit as necessary + +# adjust python path if not a system-wide install: +#import sys +#sys.path.insert(0, "/path/to/python/lib") + +# enable demandloading to reduce startup time +from mercurial import demandimport; demandimport.enable() + +# Uncomment to send python tracebacks to the browser if an error occurs: +#import cgitb +#cgitb.enable() + +# If you'd like to serve pages with UTF-8 instead of your default +# locale charset, you can do so by uncommenting the following lines. +# Note that this will cause your .hgrc files to be interpreted in +# UTF-8 and all your repo files to be displayed using UTF-8. +# +#import os +#os.environ["HGENCODING"] = "UTF-8" + +from mercurial.hgweb.hgwebdir_mod import hgwebdir +from flup.server.fcgi import WSGIServer + +# The config file looks like this. You can have paths to individual +# repos, collections of repos in a directory tree, or both. +# +# [paths] +# virtual/path1 = /real/path1 +# virtual/path2 = /real/path2 +# virtual/root = /real/root/* +# / = /real/root2/* +# +# [collections] +# /prefix/to/strip/off = /root/of/tree/full/of/repos +# +# paths example: +# +# * First two lines mount one repository into one virtual path, like +# '/real/path1' into 'virtual/path1'. +# +# * The third entry tells every mercurial repository found in +# '/real/root', recursively, should be mounted in 'virtual/root'. This +# format is preferred over the [collections] one, using absolute paths +# as configuration keys is not supported on every platform (including +# Windows). +# +# * The last entry is a special case mounting all repositories in +# '/real/root2' in the root of the virtual directory. +# +# collections example: say directory tree /foo contains repos /foo/bar, +# /foo/quux/baz. Give this config section: +# [collections] +# /foo = /foo +# Then repos will list as bar and quux/baz. +# +# Alternatively you can pass a list of ('virtual/path', '/real/path') tuples +# or use a dictionary with entries like 'virtual/path': '/real/path' + +WSGIServer(hgwebdir('hgweb.config')).run()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/contrib/hgwebdir.wsgi Wed Sep 07 19:58:38 2011 +0400 @@ -0,0 +1,51 @@ +# An example WSGI (use with mod_wsgi) script to export multiple hgweb repos + +# adjust python path if not a system-wide install: +#import sys +#sys.path.insert(0, "/path/to/python/lib") + +# enable demandloading to reduce startup time +from mercurial import demandimport; demandimport.enable() +from mercurial.hgweb.hgwebdir_mod import hgwebdir + +# If you'd like to serve pages with UTF-8 instead of your default +# locale charset, you can do so by uncommenting the following lines. +# Note that this will cause your .hgrc files to be interpreted in +# UTF-8 and all your repo files to be displayed using UTF-8. +# +#import os +#os.environ["HGENCODING"] = "UTF-8" + +# The config file looks like this. You can have paths to individual +# repos, collections of repos in a directory tree, or both. +# +# [paths] +# virtual/path1 = /real/path1 +# virtual/path2 = /real/path2 +# virtual/root = /real/root/* +# / = /real/root2/* +# +# paths example: +# +# * First two lines mount one repository into one virtual path, like +# '/real/path1' into 'virtual/path1'. +# +# * The third entry tells every mercurial repository found in +# '/real/root', recursively, should be mounted in 'virtual/root'. This +# format is preferred over the [collections] one, using absolute paths +# as configuration keys is not supported on every platform (including +# Windows). +# +# * The last entry is a special case mounting all repositories in +# '/real/root2' in the root of the virtual directory. +# +# collections example: say directory tree /foo contains repos /foo/bar, +# /foo/quux/baz. Give this config section: +# [collections] +# /foo = /foo +# Then repos will list as bar and quux/baz. +# +# Alternatively you can pass a list of ('virtual/path', '/real/path') tuples +# or use a dictionary with entries like 'virtual/path': '/real/path' + +application = hgwebdir('hgweb.config')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/contrib/logo-droplets.svg Wed Sep 07 19:58:38 2011 +0400 @@ -0,0 +1,624 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.0" + width="100" + height="120" + viewBox="0 0 124.766 152.099" + id="Layer_1" + xml:space="preserve" + sodipodi:version="0.32" + inkscape:version="0.45.1" + sodipodi:docname="logo-droplets.svg" + sodipodi:docbase="/home/oxymoron/waste/selenic/public_html/hg-logo" + inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata + id="metadata6845"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>Mercurial "droplets" logo</dc:title><dc:creator><cc:Agent><dc:title>Cali Mastny and Matt Mackall</dc:title></cc:Agent></dc:creator><cc:license + rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" /><dc:date>Feb 12 2008</dc:date></cc:Work><cc:License + rdf:about="http://creativecommons.org/licenses/GPL/2.0/"><cc:permits + rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits + rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires + rdf:resource="http://web.resource.org/cc/Notice" /><cc:permits + rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires + rdf:resource="http://web.resource.org/cc/ShareAlike" /><cc:requires + rdf:resource="http://web.resource.org/cc/SourceCode" /></cc:License></rdf:RDF></metadata><sodipodi:namedview + inkscape:window-height="576" + inkscape:window-width="746" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + guidetolerance="10.0" + gridtolerance="10.0" + objecttolerance="10.0" + borderopacity="1.0" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + inkscape:zoom="2.3216673" + inkscape:cx="4.1210694" + inkscape:cy="65.759396" + inkscape:window-x="377" + inkscape:window-y="398" + inkscape:current-layer="Layer_1" + width="100px" + height="120px" + units="px" /><defs + id="defs261" /> +<pattern + overflow="visible" + viewBox="2.125 -70.896 69 69" + id="Polka_Dot_Pattern" + patternUnits="userSpaceOnUse" + height="69" + width="69" + y="736.415" + x="-316"> + <g + id="g4"> + <polygon + id="polygon6" + points="71.125,-1.896 2.125,-1.896 2.125,-70.896 71.125,-70.896 " + fill="none" /> + <polygon + id="polygon8" + points="71.125,-1.896 2.125,-1.896 2.125,-70.896 71.125,-70.896 " + fill="#F7BC60" /> + <g + id="g10"> + <path + id="path12" + d="M61.772-71.653c0.018,0.072,0.007,0.127-0.026,0.19c-0.053,0.101-0.112,0.062-0.165,0.128 c-0.05,0.062-0.099,0.276-0.079,0.362c-0.169,0.058-0.01,0.227-0.015,0.35c-0.002,0.05-0.041,0.105-0.045,0.161 c-0.01,0.119,0.017,0.266,0.068,0.37c0.097,0.198,0.268,0.413,0.435,0.544c0.19,0.148,0.365,0.572,0.608,0.631 c0.177,0.042,0.384-0.104,0.543-0.143c0.18-0.043,0.397,0.01,0.571-0.053c0.222-0.079,0.127-0.337,0.288-0.45 c0.104-0.074,0.287-0.01,0.406-0.051c0.2-0.069,0.339-0.263,0.376-0.46c0.016-0.082,0.01-0.145,0.039-0.221 c0.039-0.103,0.111-0.16,0.09-0.293c-0.01-0.062-0.052-0.12-0.064-0.187c-0.022-0.114,0.002-0.224,0-0.337 c-0.003-0.2,0.017-0.379-0.078-0.55c-0.38-0.688-1.236-0.929-1.975-0.789c-0.18,0.034-0.287,0.126-0.442,0.207 c-0.17,0.088-0.139,0.166-0.318,0.224c-0.081,0.026-0.216,0.124-0.215,0.224c0.001,0.115,0.005,0.051,0.012,0.169 c-0.021,0.011-0.021-0.005-0.03-0.025" + fill="#FFFFFF" /> + <path + id="path14" + d="M54.105-71.653c0.018,0.072,0.007,0.127-0.026,0.19c-0.053,0.101-0.112,0.062-0.165,0.128 c-0.05,0.062-0.099,0.276-0.079,0.362c-0.169,0.058-0.01,0.227-0.015,0.35c-0.002,0.05-0.041,0.105-0.045,0.161 c-0.01,0.119,0.017,0.266,0.068,0.37c0.097,0.198,0.268,0.413,0.435,0.544c0.19,0.148,0.365,0.572,0.608,0.631 c0.177,0.042,0.384-0.104,0.543-0.143c0.18-0.043,0.397,0.01,0.571-0.053c0.222-0.079,0.127-0.337,0.288-0.45 c0.104-0.074,0.287-0.01,0.406-0.051c0.2-0.069,0.339-0.263,0.376-0.46c0.016-0.082,0.01-0.145,0.039-0.221 c0.039-0.103,0.111-0.16,0.09-0.293c-0.01-0.062-0.052-0.12-0.064-0.187c-0.022-0.114,0.002-0.224,0-0.337 c-0.003-0.2,0.017-0.379-0.078-0.55c-0.38-0.688-1.236-0.929-1.975-0.789c-0.18,0.034-0.287,0.126-0.442,0.207 c-0.17,0.088-0.139,0.166-0.318,0.224c-0.081,0.026-0.216,0.124-0.215,0.224c0.001,0.115,0.005,0.051,0.012,0.169 c-0.021,0.011-0.021-0.005-0.03-0.025" + fill="#FFFFFF" /> + <path + id="path16" + d="M46.439-71.653c0.018,0.072,0.007,0.127-0.026,0.19c-0.053,0.101-0.112,0.062-0.165,0.128 c-0.05,0.062-0.099,0.276-0.079,0.362c-0.169,0.058-0.01,0.227-0.015,0.35c-0.002,0.05-0.041,0.105-0.045,0.161 c-0.01,0.119,0.017,0.266,0.068,0.37c0.097,0.198,0.268,0.413,0.435,0.544c0.19,0.148,0.365,0.572,0.608,0.631 c0.177,0.042,0.384-0.104,0.543-0.143c0.18-0.043,0.397,0.01,0.571-0.053c0.222-0.079,0.127-0.337,0.288-0.45 c0.104-0.074,0.287-0.01,0.406-0.051c0.2-0.069,0.339-0.263,0.376-0.46c0.016-0.082,0.01-0.145,0.039-0.221 c0.039-0.103,0.111-0.16,0.09-0.293c-0.01-0.062-0.052-0.12-0.064-0.187c-0.022-0.114,0.002-0.224,0-0.337 c-0.003-0.2,0.017-0.379-0.078-0.55c-0.38-0.688-1.236-0.929-1.975-0.789c-0.18,0.034-0.287,0.126-0.442,0.207 c-0.17,0.088-0.139,0.166-0.318,0.224c-0.081,0.026-0.216,0.124-0.215,0.224c0.001,0.115,0.005,0.051,0.012,0.169 c-0.021,0.011-0.021-0.005-0.03-0.025" + fill="#FFFFFF" /> + <path + id="path18" + d="M38.772-71.653c0.018,0.072,0.007,0.127-0.026,0.19c-0.053,0.101-0.112,0.062-0.165,0.128 c-0.05,0.062-0.099,0.276-0.079,0.362c-0.169,0.058-0.01,0.227-0.015,0.35c-0.002,0.05-0.041,0.105-0.045,0.161 c-0.01,0.119,0.017,0.266,0.068,0.37c0.097,0.198,0.268,0.413,0.435,0.544c0.19,0.148,0.365,0.572,0.608,0.631 c0.177,0.042,0.384-0.104,0.543-0.143c0.18-0.043,0.397,0.01,0.571-0.053c0.222-0.079,0.127-0.337,0.288-0.45 c0.104-0.074,0.287-0.01,0.406-0.051c0.2-0.069,0.339-0.263,0.376-0.46c0.016-0.082,0.01-0.145,0.039-0.221 c0.039-0.103,0.111-0.16,0.09-0.293c-0.01-0.062-0.052-0.12-0.064-0.187c-0.022-0.114,0.002-0.224,0-0.337 c-0.003-0.2,0.017-0.379-0.078-0.55c-0.38-0.688-1.236-0.929-1.975-0.789c-0.18,0.034-0.287,0.126-0.442,0.207 c-0.17,0.088-0.139,0.166-0.318,0.224c-0.081,0.026-0.216,0.124-0.215,0.224c0.001,0.115,0.005,0.051,0.012,0.169 c-0.021,0.011-0.021-0.005-0.03-0.025" + fill="#FFFFFF" /> + <path + id="path20" + d="M31.105-71.653c0.018,0.072,0.007,0.127-0.026,0.19c-0.053,0.101-0.112,0.062-0.165,0.128 c-0.05,0.062-0.099,0.276-0.079,0.362c-0.169,0.058-0.01,0.227-0.015,0.35c-0.002,0.05-0.041,0.105-0.045,0.161 c-0.01,0.119,0.017,0.266,0.068,0.37c0.097,0.198,0.268,0.413,0.435,0.544c0.19,0.148,0.365,0.572,0.608,0.631 c0.177,0.042,0.384-0.104,0.543-0.143c0.18-0.043,0.397,0.01,0.571-0.053c0.222-0.079,0.127-0.337,0.288-0.45 c0.104-0.074,0.287-0.01,0.406-0.051c0.2-0.069,0.339-0.263,0.376-0.46c0.016-0.082,0.01-0.145,0.039-0.221 c0.039-0.103,0.111-0.16,0.09-0.293c-0.01-0.062-0.052-0.12-0.064-0.187c-0.022-0.114,0.002-0.224,0-0.337 c-0.003-0.2,0.017-0.379-0.078-0.55c-0.38-0.688-1.236-0.929-1.975-0.789c-0.18,0.034-0.287,0.126-0.442,0.207 c-0.17,0.088-0.139,0.166-0.318,0.224c-0.081,0.026-0.216,0.124-0.215,0.224c0.001,0.115,0.005,0.051,0.012,0.169 c-0.021,0.011-0.021-0.005-0.03-0.025" + fill="#FFFFFF" /> + <path + id="path22" + d="M23.439-71.653c0.018,0.072,0.007,0.127-0.026,0.19c-0.053,0.101-0.112,0.062-0.165,0.128 c-0.05,0.062-0.099,0.276-0.079,0.362c-0.169,0.058-0.01,0.227-0.015,0.35c-0.002,0.05-0.041,0.105-0.045,0.161 c-0.01,0.119,0.017,0.266,0.068,0.37c0.097,0.198,0.268,0.41