Mercurial > hg > mercurial
changeset 0:a530ea876f55
mercurial support sources added
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/mercurial-tests.iml Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module relativePaths="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/classes" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="mercurial" /> + <orderEntry type="module" module-name="common" /> + <orderEntry type="module" module-name="test" /> + <orderEntry type="module" module-name="server" /> + <orderEntry type="library" name="testng5.3" level="project" /> + <orderEntry type="library" name="JUnit" level="project" /> + <orderEntry type="module" module-name="patches-tests" /> + <orderEntry type="module" module-name="patches-impl" /> + <orderEntry type="module" module-name="utils" /> + <orderEntryProperties /> + </component> +</module> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,139 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.util.List; +import jetbrains.buildServer.MockSupport; +import jetbrains.buildServer.TempFiles; +import jetbrains.buildServer.serverSide.ServerPaths; +import jetbrains.buildServer.vcs.*; +import jetbrains.buildServer.vcs.impl.VcsRootImpl; +import jetbrains.buildServer.vcs.patches.PatchBuilderImpl; +import jetbrains.buildServer.vcs.patches.PatchTestCase; +import org.jmock.Mock; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +@Test +public class MercurialVcsSupportTest extends PatchTestCase { + private MercurialVcsSupport myVcs; + private TempFiles myTempFiles; + + @BeforeMethod + protected void setUp() throws Exception { + super.setUp(); + Mock vcsManagerMock = new Mock(VcsManager.class); + vcsManagerMock.stubs().method("registerVcsSupport"); + + myTempFiles = new TempFiles(); + File systemDir = myTempFiles.createTempDir(); + ServerPaths sp = new ServerPaths(systemDir.getAbsolutePath(), systemDir.getAbsolutePath()); + assertTrue(new File(sp.getCachesDir()).mkdirs()); + myVcs = new MercurialVcsSupport((VcsManager)vcsManagerMock.proxy(), sp); + } + + @AfterMethod + protected void tearDown() { + myTempFiles.cleanup(); + } + + protected String getTestDataPath() { + return "mercurial-tests/testData"; + } + + public void testGetCurrentVersion() throws VcsException { + VcsRootImpl vcsRoot = createVcsRoot(); + + assertEquals("5:1d2cc6f3bc29", myVcs.getCurrentVersion(vcsRoot)); + } + + public void testUpdateWorkingDir() throws VcsException { + VcsRootImpl vcsRoot = createVcsRoot(); + myVcs.getCurrentVersion(vcsRoot); + + List<ModificationData> changes = myVcs.collectBuildChanges(vcsRoot, "0:9875b412a788", "3:9522278aa38d", new CheckoutRules("")); + assertEquals(3, changes.size()); + } + + public void testCollectChanges() throws VcsException { + VcsRootImpl vcsRoot = createVcsRoot(); + + List<ModificationData> changes = myVcs.collectBuildChanges(vcsRoot, "0:9875b412a788", "3:9522278aa38d", new CheckoutRules("")); + assertEquals(3, changes.size()); + + ModificationData md1 = changes.get(0); + ModificationData md2 = changes.get(1); + ModificationData md3 = changes.get(2); + assertEquals("1:1d446e82d356", md1.getVersion()); + assertEquals("new file added", md1.getDescription()); + List<VcsChange> files1 = md1.getChanges(); + assertEquals(1, files1.size()); + assertEquals(VcsChangeInfo.Type.ADDED, files1.get(0).getType()); + assertEquals("dir1/file3.txt", normalizePath(files1.get(0).getRelativeFileName())); + + assertEquals("2:7209b1f1d793", md2.getVersion()); + assertEquals("file4.txt added", md2.getDescription()); + List<VcsChange> files2 = md2.getChanges(); + assertEquals(1, files2.size()); + assertEquals(VcsChangeInfo.Type.ADDED, files2.get(0).getType()); + assertEquals("dir1/file4.txt", normalizePath(files2.get(0).getRelativeFileName())); + + assertEquals("3:9522278aa38d", md3.getVersion()); + assertEquals("file removed", md3.getDescription()); + List<VcsChange> files3 = md3.getChanges(); + assertEquals(1, files3.size()); + assertEquals(VcsChangeInfo.Type.REMOVED, files3.get(0).getType()); + assertEquals("dir1/file4.txt", normalizePath(files3.get(0).getRelativeFileName())); + } + + public void testCollectChangesWithCheckoutRules() throws VcsException { + VcsRootImpl vcsRoot = createVcsRoot(); + + List<ModificationData> changes = myVcs.collectBuildChanges(vcsRoot, "0:9875b412a788", "3:9522278aa38d", new CheckoutRules("-:.\n+:dir1/subdir")); + assertEquals(0, changes.size()); + + changes = myVcs.collectBuildChanges(vcsRoot, "0:9875b412a788", "5:1d2cc6f3bc29", new CheckoutRules("-:.\n+:dir1/subdir")); + assertEquals(1, changes.size()); + ModificationData md = changes.get(0); + assertEquals("modified in subdir", md.getDescription()); + } + + public void testBuildFullPatch() throws IOException, VcsException { + setName("cleanPatch1"); + VcsRootImpl vcsRoot = createVcsRoot(); + + final ByteArrayOutputStream output = new ByteArrayOutputStream(); + final PatchBuilderImpl builder = new PatchBuilderImpl(output); + + myVcs.buildPatch(vcsRoot, null, "4:b06a290a363b", builder, new CheckoutRules("")); + builder.close(); + + checkPatchResult(output.toByteArray()); + } + + public void testBuildIncrementalPatch() throws IOException, VcsException { + setName("patch1"); + VcsRootImpl vcsRoot = createVcsRoot(); + + final ByteArrayOutputStream output = new ByteArrayOutputStream(); + final PatchBuilderImpl builder = new PatchBuilderImpl(output); + + myVcs.buildPatch(vcsRoot, "3:9522278aa38d", "4:b06a290a363b", builder, new CheckoutRules("")); + builder.close(); + + checkPatchResult(output.toByteArray()); + } + + private Object normalizePath(final String path) { + return path.replace(File.separatorChar, '/'); + } + + private VcsRootImpl createVcsRoot() { + VcsRootImpl vcsRoot = new VcsRootImpl(1, myVcs.getName()); + vcsRoot.addProperty(Constants.HG_COMMAND_PATH_PROP, "mercurial-tests/testData/bin/hg.exe"); + vcsRoot.addProperty(Constants.REPOSITORY_PROP, "mercurial-tests/testData/rep1"); + return vcsRoot; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/BaseCommandTestCase.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,38 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import java.io.File; +import java.io.IOException; +import jetbrains.buildServer.BaseTestCase; +import jetbrains.buildServer.TempFiles; +import jetbrains.buildServer.vcs.VcsException; +import org.jetbrains.annotations.NotNull; + +public class BaseCommandTestCase extends BaseTestCase { + private String myRepository; + + protected void setRepository(final String repository) { + myRepository = repository; + } + + protected <T> T runCommand(CommandExecutor<T> executor) throws IOException, VcsException { + final Settings settings = new Settings(); + settings.setHgCommandPath("mercurial-tests/testData/bin/hg.exe"); + settings.setRepository(new File(myRepository).getAbsolutePath()); + TempFiles tf = new TempFiles(); + File parentDir = tf.createTempDir(); + settings.setWorkingDir(new File(parentDir, "rep").getAbsolutePath()); + try { + CloneCommand cl = new CloneCommand(settings); + cl.setDestDir(settings.getWorkingDir()); + cl.execute(); + + return executor.execute(settings); + } finally { + tf.cleanup(); + } + } + + public interface CommandExecutor<T> { + T execute(@NotNull Settings settings) throws VcsException; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/LogCommandTest.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,52 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import java.io.IOException; +import java.util.List; +import org.jetbrains.annotations.NotNull; +import org.testng.annotations.Test; +import jetbrains.buildServer.vcs.VcsException; + +@Test +public class LogCommandTest extends BaseCommandTestCase { + public void testOneChangeSet() throws Exception { + setRepository("mercurial-tests/testData/rep1"); + final String toId = "9875b412a788"; + List<ChangeSet> changes = runLog(null, toId); + assertEquals(1, changes.size()); + final ChangeSet changeSet = changes.get(0); + assertEquals(0, changeSet.getRevNumber()); + assertEquals(toId, changeSet.getId()); + assertEquals("pavel@localhost", changeSet.getUser()); + assertEquals("dir1 created", changeSet.getSummary()); + } + + public void testMoreThanOneChangeSet() throws Exception { + setRepository("mercurial-tests/testData/rep1"); + final String fromId = "9875b412a788"; + final String toId = "7209b1f1d793"; + List<ChangeSet> changes = runLog(fromId, toId); + assertEquals(3, changes.size()); + ChangeSet changeSet1 = changes.get(0); + final ChangeSet changeSet2 = changes.get(1); + final ChangeSet changeSet3 = changes.get(2); + assertEquals("dir1 created", changeSet1.getSummary()); + assertEquals("new file added", changeSet2.getSummary()); + assertEquals("file4.txt added", changeSet3.getSummary()); + + changes = runLog(null, toId); + assertEquals(3, changes.size()); + changeSet1 = changes.get(2); + assertEquals("file4.txt added", changeSet1.getSummary()); + } + + private List<ChangeSet> runLog(final String fromId, final String toId) throws IOException, VcsException { + return runCommand(new CommandExecutor<List<ChangeSet>>() { + public List<ChangeSet> execute(@NotNull final Settings settings) throws VcsException { + LogCommand lc = new LogCommand(settings); + lc.setFromRevId(fromId); + lc.setToRevId(toId); + return lc.execute(); + } + }); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/StatusCommandTest.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,50 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import java.io.File; +import java.io.IOException; +import java.util.List; +import org.jetbrains.annotations.NotNull; +import org.testng.annotations.Test; +import jetbrains.buildServer.vcs.VcsException; + +@Test +public class StatusCommandTest extends BaseCommandTestCase { + public void testAddedFile() throws IOException, VcsException { + setRepository("mercurial-tests/testData/rep1"); + List<ModifiedFile> files = runStatus("9875b412a788", "1d446e82d356"); + assertEquals(1, files.size()); + ModifiedFile md = files.get(0); + assertEquals(ModifiedFile.Status.ADDED, md.getStatus()); + assertEquals("dir1/file3.txt", md.getPath().replace(File.separatorChar, '/')); + } + + public void testRemovedFile() throws IOException, VcsException { + setRepository("mercurial-tests/testData/rep1"); + List<ModifiedFile> files = runStatus("7209b1f1d793", "9522278aa38d"); + assertEquals(1, files.size()); + ModifiedFile md = files.get(0); + assertEquals(ModifiedFile.Status.REMOVED, md.getStatus()); + assertEquals("dir1/file4.txt", md.getPath().replace(File.separatorChar, '/')); + } + + public void testModifiedFile() throws IOException, VcsException { + setRepository("mercurial-tests/testData/rep1"); + List<ModifiedFile> files = runStatus("9522278aa38d", "b06a290a363b"); + assertEquals(1, files.size()); + ModifiedFile md = files.get(0); + assertEquals(ModifiedFile.Status.MODIFIED, md.getStatus()); + assertEquals("dir1/file3.txt", md.getPath().replace(File.separatorChar, '/')); + } + + private List<ModifiedFile> runStatus(final String fromId, final String toId) throws IOException, VcsException { + return runCommand(new CommandExecutor<List<ModifiedFile>>() { + public List<ModifiedFile> execute(@NotNull final Settings settings) throws VcsException { + StatusCommand st = new StatusCommand(settings); + st.setFromRevId(fromId); + st.setToRevId(toId); + return st.execute(); + } + }); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/src/testng.xml Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,10 @@ +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> +<suite name="Mercurial Suite"> + <test name="Mercurial Tests"> + <classes> + <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.command.LogCommandTest"/> + <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.command.StatusCommandTest"/> + <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialVcsSupportTest"/> + </classes> + </test> +</suite>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Contributors.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,41 @@ +[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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Copying.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,340 @@ + 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.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Mercurial.ini Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,86 @@ +; System-wide Mercurial config file. To override these settings on a +; per-user basis, please edit the following file instead, where +; USERNAME is your Windows user name: +; C:\Documents and Settings\USERNAME\Mercurial.ini + +[ui] +editor = notepad + +[extensions] +; The win32text extension is available and installed by default. It +; provides built-in Python hooks to perform line ending conversions. +; This is normally much faster than running an external program. +hgext.win32text = + + +[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: + +# 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: $output /mine:$local /theirs:$other /merged:$output +tortoisemerge.regkey=Software\TortoiseSVN +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.args=-left $other -right $local -ancestor $base -merge $output +filemerge.gui=True
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Mercurial.url Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=http://www.selenic.com/mercurial/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/ReadMe.html Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,112 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <title>Mercurial for Windows</title> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > + <style type="text/css"> + <!-- + .indented + { + padding-left: 10pt; + } + --> + </style> + </head> + + <body> + <h1>Mercurial for Windows</h1> + + <p>Welcome to Mercurial for Windows!</p> + + <p>Mercurial is a command-line application. You must run it from + the Windows command prompt (or if you're hard core, a <a + href="http://www.mingw.org/">MinGW</a> shell).</p> + + <p><div class="indented"><i>Note: the standard <a + href="http://www.mingw.org/">MinGW</a> msys startup script uses + rxvt which has problems setting up standard input and output. + Running bash directly works correctly.</i></div> + + <p>For documentation, please visit the <a + href="http://www.selenic.com/mercurial">Mercurial web site</a>. + You can also download a free book, <a + href="http://hgbook.red-bean.com/">Distributed revision control + with Mercurial</a>.</p> + + <p>By default, Mercurial installs to <tt>C:\Program Files\Mercurial</tt>. The + Mercurial command is called <tt>hg.exe</tt>.</p> + + <h1>Testing Mercurial after you've installed it</h1> + + <p>The easiest way to check that Mercurial is installed properly is to + just type the following at the command prompt:</p> + + <pre> +hg +</pre> + + <p>This command should print a useful help message. If it does, + other Mercurial commands should work fine for you.</p> + + <h1>Configuration notes</h1> + <h4>Default editor</h4> + The default editor for commit messages is 'notepad'. You can set the EDITOR + (or HGEDITOR) environment variable to specify your preference or set it in + mercurial.ini: + <pre> +[ui] +editor = whatever +</pre> + + <h4>Configuring a Merge program</h4> + It should be emphasized that Mercurial by itself doesn't attempt to do a + Merge at the file level, neither does it make any attempt to Resolve the conflicts. + + By default, Mercurial will use the merge program defined by the HGMERGE environment + variable, or uses the one defined in the mercurial.ini file. (see <a href="http://www.selenic.com/mercurial/wiki/index.cgi/MergeProgram">MergeProgram</a> on the Mercurial Wiki for more information) + + <h1>Reporting problems</h1> + + <p>Before you report any problems, please consult the <a + href="http://www.selenic.com/mercurial">Mercurial web site</a> and + see if your question is already in our list of <a + href="http://www.selenic.com/mercurial/wiki/index.cgi/FAQ">Frequently + Answered Questions</a> (the "FAQ"). + + <p>If you cannot find an answer to your question, please feel + free to send mail to the Mercurial mailing list, at <a + href="mailto:mercurial@selenic.com">mercurial@selenic.com</a>. + <b>Remember</b>, the more useful information you include in your + report, the easier it will be for us to help you!</p> + + <p>If you are IRC-savvy, that's usually the fastest way to get + help. Go to <tt>#mercurial</tt> on + <tt>irc.freenode.net</tt>.</p> + + <h1>Author and copyright information</h1> + + <p>Mercurial was written by <a href="http://www.selenic.com">Matt + Mackall</a>, and is maintained by Matt and a team of + volunteers.</p> + + <p>The Windows installer was written by <a + href="http://www.serpentine.com/blog">Bryan + O'Sullivan</a>.</p> + + <p>Mercurial is Copyright 2005-2007 Matt Mackall and others. + See the <tt>Contributors.txt</tt> file for a list of contributors.</p> + + <p>Mercurial is free software; you can redistribute it and/or + modify it under the terms of the <a + href="http://www.gnu.org/copyleft/gpl.html">GNU General Public + License</a> as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version.</p> + + <p>Mercurial is distributed in the hope that it will be useful, + but <b>without any warranty</b>; without even the implied + warranty of <b>merchantability</b> or <b>fitness for a + particular purpose</b>. See the GNU General Public License for + more details.</p> + </body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/ReleaseNotes.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,9 @@ +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://www.selenic.com/mercurial/wiki/index.cgi/WhatsNew
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/atom/changelog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,10 @@ +#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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/atom/changelogentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,16 @@ + <entry> + <title>#desc|strip|firstline|strip|escape#</title> + <id>http://www.selenic.com/mercurial/#changeset-{node}</id> + <link href="{urlbase}{url}rev/{node}"/> + <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#</pre> + </div> + </content> + </entry>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/atom/filelog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,8 @@ +#header# + <id>{urlbase}{url}atom-log/tip/{file|escape}</id> + <link rel="self" href="{urlbase}{url}atom-log/tip/{file|escape}"/> + <title>#repo|escape#: #file|escape# history</title> + #latestentry%feedupdated# + +#entries%changelogentry# +</feed>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/atom/header.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="{encoding}"?> +<feed xmlns="http://www.w3.org/2005/Atom"> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/atom/map Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,10 @@ +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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/atom/tagentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,8 @@ + <entry> + <title>#tag|escape#</title> + <link rel="alternate" href="{urlbase}{url}rev/{node}"/> + <id>http://www.selenic.com/mercurial/#tag-{node}</id> + <updated>#date|rfc3339date#</updated> + <published>#date|rfc3339date#</published> + <content type="text">#tag|strip|escape#</content> + </entry>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/atom/tags.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,11 @@ +#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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/changelog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,41 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/changelogentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,25 @@ +<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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/changeset.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,47 @@ +#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# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/error.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,15 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/fileannotate.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,46 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/filediff.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,34 @@ +#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# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/filelog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,27 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/filelogentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,25 @@ +<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> + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/filerevision.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,44 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/footer.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,8 @@ +#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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/changelog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,33 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/changelogentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,14 @@ +<div> +<a class="title" href="{url}rev/#node|short#{sessionvars%urlparameter}"><span class="age">#date|age# ago</span>#desc|strip|firstline|escape#<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# +<br/> +<br/> +</div>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/changeset.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,42 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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# <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# ago)</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# +</div> +<div class="list_head"></div> +<div class="title_text"> +<table cellspacing="0"> +#files# +</table></div> + +<div class="page_body">#diff#</div> + +#footer#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/error.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,25 @@ +#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://www.selenic.com/mercurial/" 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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/fileannotate.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,59 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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# ago)</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} +</div> +<div class="page_body"> +<table> +#annotate%annotateline# +</table> +</div> + +#footer#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/filediff.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,45 @@ +{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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/filelog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,38 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/filerevision.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,58 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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# ago)</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} +</div> + +<div class="page_body"> +#text%fileline# +</div> + +#footer#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/footer.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,11 @@ +<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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/header.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,8 @@ +<?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" /> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/index.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,26 @@ +#header# +<title>Mercurial repositories index</title> +</head> +<body> + +<div class="page_header"> + <a href="http://www.selenic.com/mercurial/" 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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/manifest.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,36 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/map Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,63 @@ +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> ' +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>' +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></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}">#author|obfuscate#@#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# ago</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>' +branchentry = '<tr class="parity{parity}"><td class="age"><i>{date|age} ago</i></td><td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>{node|short}</b></a></td><td>{branch|escape}</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>' +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 +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# ago</i></td><td><i>#author|person#</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</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# ago</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</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} ago</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#" />'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/notfound.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,18 @@ +{header} +<title>Mercurial repository not found</title> +</head> + +<body> + +<div class="page_header"> +<a href="http://www.selenic.com/mercurial/" 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}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/search.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,34 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/shortlog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,39 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/summary.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,56 @@ +#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://www.selenic.com/mercurial/" 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}tags{sessionvars%urlparameter}">tags</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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/gitweb/tags.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,28 @@ +#header# +<title>#repo|escape#: Tags</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://www.selenic.com/mercurial/" 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> | +tags | +<a href="{url}file/#node|short#{sessionvars%urlparameter}">files</a> +<br/> +</div> + +<div class="title"> </div> +<table cellspacing="0"> +#entries%tagentry# +</table> + +#footer#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/header.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,6 @@ +<!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" />
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/index.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,19 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/manifest.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,26 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/map Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,57 @@ +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#" />'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/map-cmdline.changelog Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,14 @@ +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* '
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/map-cmdline.compact Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,8 @@ +changeset = '{rev}{tags}{parents} {node|short} {date|isodate} {author|user}\n {desc|firstline|strip}\n\n' +changeset_quiet = '{rev}:{node|short}\n' +start_tags = '[' +tag = '{tag},' +last_tag = '{tag}]' +start_parents = ':' +parent = '{rev},' +last_parent = '{rev}'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/map-cmdline.default Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,24 @@ +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'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/notfound.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,12 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/raw/changeset.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,9 @@ +#header# +# HG changeset patch +# User #author# +# Date #date|hgdate# +# Node ID #node# +#parent%changesetparent# +#desc# + +#diff#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/raw/error.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,2 @@ +#header# +error: #error#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/raw/fileannotate.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,5 @@ +#header# +#annotate%annotateline# +#footer# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/raw/filediff.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,5 @@ +#header# +#diff# +#footer# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/raw/index.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,2 @@ +#header# +#entries%indexentry#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/raw/manifest.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,3 @@ +{header} +{dentries%direntry}{fentries%fileentry} +{footer}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/raw/map Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,23 @@ +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#@#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'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/raw/notfound.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,2 @@ +#header# +error: repository #repo# not found
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/rss/changelog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,6 @@ +#header# + <title>#repo|escape# Changelog</title> + <description>#repo|escape# Changelog</description> + #entries%changelogentry# + </channel> +</rss> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/rss/changelogentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,7 @@ +<item> + <title>#desc|strip|firstline|strip|escape#</title> + <link>{urlbase}{url}rev/{node|short}</link> + <description><![CDATA[#desc|strip|escape|addbreaks#]]></description> + <author>#author|obfuscate#</author> + <pubDate>#date|rfc822date#</pubDate> +</item>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/rss/filelog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,6 @@ +#header# + <title>#repo|escape#: #file|escape# history</title> + <description>#file|escape# revision history</description> + #entries%filelogentry# + </channel> +</rss>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/rss/filelogentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,7 @@ +<item> + <title>#desc|strip|firstline|strip|escape#</title> + <link>{urlbase}{url}log{#node|short#}/{file|urlescape}</link> + <description><![CDATA[#desc|strip|escape|addbreaks#]]></description> + <author>#author|obfuscate#</author> + <pubDate>#date|rfc822date#</pubDate> +</item>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/rss/header.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="{encoding}"?> +<rss version="2.0"> + <channel> + <link>{urlbase}{url}</link> + <language>en-us</language>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/rss/map Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,9 @@ +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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/rss/tagentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,6 @@ +<item> + <title>#tag|escape#</title> + <link>{urlbase}{url}rev/{node|short}</link> + <description><![CDATA[#tag|strip|escape|addbreaks#]]></description> + <pubDate>#date|rfc822date#</pubDate> +</item>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/rss/tags.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,6 @@ +#header# + <title>#repo|escape#: tags </title> + <description>#repo|escape# tag history</description> + #entriesnotip%tagentry# + </channel> +</rss>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/search.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,34 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/shortlog.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,41 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/shortlogentry.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,7 @@ +<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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/static/highlight.css Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,59 @@ +.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 */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/static/style-gitweb.css Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,81 @@ +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; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/static/style.css Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,66 @@ +a { text-decoration:none; } +.age { white-space:nowrap; } +.date { white-space:nowrap; } +.indexlinks { white-space:nowrap; } +.parity0 { background-color: #dddddd; } +.parity1 { background-color: #eeeeee; } +.lineno { width: 60px; color: #aaaaaa; font-size: smaller; + text-align: right; padding-right:1em; } +.plusline { color: green; } +.minusline { color: red; } +.atline { color: purple; } +.annotate { font-size: smaller; text-align: right; padding-right: 1em; } +.buttons a { + background-color: #666666; + 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: #888888; + 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; } +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/tags.tmpl Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,24 @@ +#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#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/bin/Templates/template-vars.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,37 @@ +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/cleanPatch1/after/dir1/file1.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,1 @@ +aaa \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/cleanPatch1/after/dir1/file3.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,2 @@ +ccc +ddd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/cleanPatch1/after/dir1/subdir/file2.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,1 @@ +bbb \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/patch1/after/dir1/file1.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,1 @@ +aaa \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/patch1/after/dir1/file3.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,2 @@ +ccc +ddd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/patch1/after/dir1/subdir/file2.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,1 @@ +bbb \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/patch1/before/dir1/file1.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,1 @@ +aaa \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/patch1/before/dir1/file3.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,1 @@ +ccc \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-tests/testData/patch1/before/dir1/subdir/file2.txt Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,1 @@ +bbb \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/mercurial.iml Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module relativePaths="true" type="JAVA_MODULE" version="4"> + <component name="FacetManager"> + <facet type="web" name="web"> + <configuration> + <webroots> + <root url="file://$MODULE_DIR$/resources/buildServerResources" relative="/plugins/mercurial" /> + </webroots> + <building> + <setting name="EXPLODED_URL" value="file://" /> + <setting name="EXPLODED_ENABLED" value="false" /> + <setting name="JAR_URL" value="file://" /> + <setting name="JAR_ENABLED" value="false" /> + <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" /> + <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" /> + <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" /> + <setting name="RUN_JASPER_VALIDATION" value="false" /> + <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" /> + </building> + <packaging> + <containerElement type="facet" facetId="web-openapi/web/web-openapi"> + <attribute name="method" value="0" /> + <attribute name="URI" value="<N/A>" /> + </containerElement> + <containerElement type="module" name="common"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="common-runtime"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="mercurial"> + <attribute name="method" value="5" /> + <attribute name="URI" value="/WEB-INF/lib/mercurial.jar" /> + </containerElement> + <containerElement type="module" name="messages"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="patches"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="runtime-util"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="server-model"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="server-openapi"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="utils"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="web-openapi"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="module" name="xml-rpc-wrapper"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/classes" /> + </containerElement> + <containerElement type="library" name="Acegi" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="IDEA-openapi" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="Ivy" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="JNIWrap" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="JUnit" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="JodaTime" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="ServletApi" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="<N/A>" /> + </containerElement> + <containerElement type="library" name="SpringWeb" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="commons-beanutils-core" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="commons-httpclient" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="jdom" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="log4j-1.2.12" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="packtag" level="module"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="testng" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="xerces" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="xmlrpc-2.0" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" name="xstream" level="project"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + </containerElement> + <containerElement type="library" level="module"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + <url>jar://$MODULE_DIR$/../lib/annotations.jar!/</url> + </containerElement> + <containerElement type="library" level="module"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + <url>jar://$MODULE_DIR$/../web/lib/colorer.jar!/</url> + </containerElement> + <containerElement type="library" level="module"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + <url>jar://$MODULE_DIR$/../lib/commons-codec-1.3.jar!/</url> + </containerElement> + <containerElement type="library" level="module"> + <attribute name="method" value="0" /> + <attribute name="URI" value="<N/A>" /> + <url>jar://$APPLICATION_HOME_DIR$/lib/j2ee.jar!/</url> + </containerElement> + <containerElement type="library" level="module"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + <url>jar://$MODULE_DIR$/../web/lib/jstl.jar!/</url> + </containerElement> + <containerElement type="library" level="module"> + <attribute name="method" value="0" /> + <attribute name="URI" value="/WEB-INF/lib" /> + <url>jar://$MODULE_DIR$/../web/lib/standard.jar!/</url> + </containerElement> + </packaging> + </configuration> + </facet> + </component> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/classes" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="IDEA-openapi" level="project" /> + <orderEntry type="module" module-name="common" /> + <orderEntry type="module" module-name="utils" /> + <orderEntry type="module" module-name="server-openapi" /> + <orderEntry type="module" module-name="patches" /> + <orderEntry type="module" module-name="web-openapi" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$APPLICATION_HOME_DIR$/lib/j2ee.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntryProperties /> + </component> +</module> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/resources/buildServerResources/mercurialSettings.jsp Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,19 @@ +<%@include file="/include.jsp"%> +<%@ taglib prefix="props" tagdir="/WEB-INF/tags/props" %> +<jsp:useBean id="propertiesBean" scope="request" type="jetbrains.buildServer.controllers.BasePropertiesBean"/> +<table class="runnerFormTable"> + + <l:settingsGroup title="Mercurial Settings"> + <tr> + <th><label for="hgCommandPath">HG command path: <l:star/></label></th> + <td><props:textProperty name="hgCommandPath" className="longField" /> + <span class="error" id="error_hgCommandPath"></span></td> + </tr> + <tr> + <th><label for="repositoryPath">Repository: <l:star/></label></th> + <td><props:textProperty name="repositoryPath" className="longField" /> + <span class="error" id="error_repositoryPath"></span></td> + </tr> + </l:settingsGroup> + +</table>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/META-INF/build-server-plugin-mercurial.xml Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> + +<beans default-autowire="constructor"> + <bean id="svn" class="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialVcsSupport" /> +</beans>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/Constants.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,6 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial; + +public interface Constants { + String REPOSITORY_PROP = "repositoryPath"; + String HG_COMMAND_PATH_PROP = "hgCommandPath"; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,307 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial; + +import java.io.File; +import java.io.FileFilter; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.*; +import jetbrains.buildServer.CollectChangesByIncludeRule; +import jetbrains.buildServer.Used; +import jetbrains.buildServer.buildTriggers.vcs.AbstractVcsPropertiesProcessor; +import jetbrains.buildServer.buildTriggers.vcs.mercurial.command.*; +import jetbrains.buildServer.log.Loggers; +import jetbrains.buildServer.serverSide.InvalidProperty; +import jetbrains.buildServer.serverSide.PropertiesProcessor; +import jetbrains.buildServer.serverSide.ServerPaths; +import jetbrains.buildServer.util.FileUtil; +import jetbrains.buildServer.vcs.*; +import jetbrains.buildServer.vcs.patches.PatchBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class MercurialVcsSupport extends VcsSupport implements CollectChangesByIncludeRule { + private ServerPaths myServerPaths; + + public MercurialVcsSupport(@NotNull VcsManager vcsManager, @NotNull ServerPaths paths) { + vcsManager.registerVcsSupport(this); + myServerPaths = paths; + } + + public List<ModificationData> collectBuildChanges(final VcsRoot root, + @NotNull final String fromVersion, + @NotNull final String currentVersion, + final CheckoutRules checkoutRules) throws VcsException { + updateWorkingDirectory(root); + return VcsSupportUtil.collectBuildChanges(root, fromVersion, currentVersion, checkoutRules, this); + } + + public List<ModificationData> collectBuildChanges(final VcsRoot root, + final String fromVersion, + final String currentVersion, + final IncludeRule includeRule) throws VcsException { + List<ModificationData> result = new ArrayList<ModificationData>(); + Settings settings = new Settings(myServerPaths, root); + LogCommand lc = new LogCommand(settings); + lc.setFromRevId(new ChangeSet(fromVersion).getId()); + lc.setToRevId(new ChangeSet(currentVersion).getId()); + List<ChangeSet> changeSets = lc.execute(); + if (changeSets.isEmpty()) { + return result; + } + + Iterator<ChangeSet> it = changeSets.iterator(); + ChangeSet prev = it.next(); // skip first changeset (cause it was already reported) + StatusCommand st = new StatusCommand(settings); + while (it.hasNext()) { + ChangeSet cur = it.next(); + st.setFromRevId(prev.getId()); + st.setToRevId(cur.getId()); + List<ModifiedFile> modifiedFiles = st.execute(); + List<VcsChange> files = toVcsChanges(modifiedFiles, prev.getFullVersion(), cur.getFullVersion(), includeRule); + if (files.isEmpty()) continue; + ModificationData md = new ModificationData(cur.getTimestamp(), files, cur.getSummary(), cur.getUser(), root, cur.getFullVersion(), cur.getFullVersion()); + result.add(md); + prev = cur; + } + + return result; + } + + private List<VcsChange> toVcsChanges(final List<ModifiedFile> modifiedFiles, String prevVer, String curVer, final IncludeRule includeRule) { + List<VcsChange> files = new ArrayList<VcsChange>(); + for (ModifiedFile mf: modifiedFiles) { + if (!normalizePath(mf.getPath()).startsWith(includeRule.getFrom())) continue; // skip files which do not match include rule + + VcsChangeInfo.Type changeType = getChangeType(mf.getStatus()); + if (changeType == null) { + Loggers.VCS.warn("Unable to convert status: " + mf.getStatus() + " to VCS change type"); + changeType = VcsChangeInfo.Type.NOT_CHANGED; + } + files.add(new VcsChange(changeType, mf.getStatus().getName(), mf.getPath(), mf.getPath(), prevVer, curVer)); + } + return files; + } + + private @NotNull String normalizePath(@NotNull String repPath) { + return repPath.replace('\\', '/'); + } + + private VcsChangeInfo.Type getChangeType(final ModifiedFile.Status status) { + switch (status) { + case ADDED:return VcsChangeInfo.Type.ADDED; + case MODIFIED:return VcsChangeInfo.Type.CHANGED; + case REMOVED:return VcsChangeInfo.Type.REMOVED; + } + return null; + } + + @NotNull + public byte[] getContent(final VcsModification vcsModification, + final VcsChangeInfo change, + final VcsChangeInfo.ContentType contentType, + final VcsRoot vcsRoot) throws VcsException { + return new byte[0]; + } + + @NotNull + public byte[] getContent(final String filePath, final VcsRoot versionedRoot, final String version) throws VcsException { + return new byte[0]; + } + + public String getName() { + return "mercurial"; + } + + @Used("jsp") + public String getDisplayName() { + return "Mercurial"; + } + + @Nullable + public PropertiesProcessor getVcsPropertiesProcessor() { + return new AbstractVcsPropertiesProcessor() { + public Collection<InvalidProperty> process(final Map<String, String> properties) { + List<InvalidProperty> result = new ArrayList<InvalidProperty>(); + if (isEmpty(properties.get(Constants.HG_COMMAND_PATH_PROP))) { + result.add(new InvalidProperty(Constants.HG_COMMAND_PATH_PROP, "Path to 'hg' command must be specified")); + } + if (isEmpty(properties.get(Constants.REPOSITORY_PROP))) { + result.add(new InvalidProperty(Constants.REPOSITORY_PROP, "Repository must be specified")); + } + return result; + } + }; + } + + public String getVcsSettingsJspFilePath() { + return "mercurialSettings.jsp"; + } + + @NotNull + public String getCurrentVersion(final VcsRoot root) throws VcsException { + updateWorkingDirectory(root); + Settings settings = new Settings(myServerPaths, root); + LogCommand lc = new LogCommand(settings); + lc.setFromRevId("tip"); + lc.setToRevId("tip"); + List<ChangeSet> changes = lc.execute(); + if (changes.isEmpty()) { + throw new VcsException("Unable to obtain current version of repository"); + } + final ChangeSet changeSet = changes.get(0); + return changeSet.getFullVersion(); + } + + public String describeVcsRoot(final VcsRoot vcsRoot) { + return "mercurial: " + vcsRoot.getProperty(Constants.REPOSITORY_PROP); + } + + public boolean isTestConnectionSupported() { + return true; + } + + @Nullable + public String testConnection(final VcsRoot vcsRoot) throws VcsException { + getCurrentVersion(vcsRoot); + return null; + } + + @Nullable + public Map<String, String> getDefaultVcsProperties() { + return null; + } + + public String getVersionDisplayName(final String version, final VcsRoot root) throws VcsException { + return version; + } + + @NotNull + public Comparator<String> getVersionComparator() { + return new Comparator<String>() { + public int compare(final String o1, final String o2) { + try { + return new ChangeSet(o1).getRevNumber() - new ChangeSet(o2).getRevNumber(); + } catch (Exception e) { + return 1; + } + } + }; + } + + public void buildPatch(final VcsRoot root, + @Nullable final String fromVersion, + @NotNull final String toVersion, + final PatchBuilder builder, + final CheckoutRules checkoutRules) throws IOException, VcsException { + updateWorkingDirectory(root); + Settings settings = new Settings(myServerPaths, root); + if (fromVersion == null) { + buildFullPatch(settings, new ChangeSet(toVersion), builder); + } else { + buildIncrementalPatch(settings, new ChangeSet(fromVersion), new ChangeSet(toVersion), builder); + } + } + + private void buildIncrementalPatch(final Settings settings, @NotNull final ChangeSet fromVer, @NotNull final ChangeSet toVer, final PatchBuilder builder) + throws VcsException, IOException { + StatusCommand st = new StatusCommand(settings); + st.setFromRevId(fromVer.getId()); + st.setToRevId(toVer.getId()); + List<ModifiedFile> modifiedFiles = st.execute(); + List<String> notDeletedFiles = new ArrayList<String>(); + for (ModifiedFile f: modifiedFiles) { + if (f.getStatus() != ModifiedFile.Status.REMOVED) { + notDeletedFiles.add(f.getPath()); + } + } + + CatCommand cc = new CatCommand(settings); + cc.setRevId(toVer.getId()); + File parentDir = cc.execute(notDeletedFiles); + + try { + for (ModifiedFile f: modifiedFiles) { + final File virtualFile = new File(f.getPath()); + if (f.getStatus() == ModifiedFile.Status.REMOVED) { + builder.deleteFile(virtualFile, true); + } else { + File realFile = new File(parentDir, f.getPath()); + FileInputStream is = new FileInputStream(realFile); + try { + builder.createBinaryFile(virtualFile, null, is, realFile.length()); + } finally { + is.close(); + } + } + } + } finally { + FileUtil.delete(parentDir); + } + } + + private void buildFullPatch(final Settings settings, @NotNull final ChangeSet toVer, final PatchBuilder builder) + throws IOException, VcsException { + CloneCommand cl = new CloneCommand(settings); + cl.setToId(toVer.getId()); + File tempDir = FileUtil.createTempDirectory("mercurial", toVer.getId()); + try { + final File repRoot = new File(tempDir, "rep"); + cl.setDestDir(repRoot.getAbsolutePath()); + cl.execute(); + buildPatchFromDirectory(builder, repRoot, new FileFilter() { + public boolean accept(final File file) { + return !(file.isDirectory() && ".hg".equals(file.getName())); + } + }); + } finally { + FileUtil.delete(tempDir); + } + } + + private void buildPatchFromDirectory(final PatchBuilder builder, final File repRoot, final FileFilter filter) throws IOException { + buildPatchFromDirectory(repRoot, builder, repRoot, filter); + } + + private void buildPatchFromDirectory(File curDir, final PatchBuilder builder, final File repRoot, final FileFilter filter) throws IOException { + File[] files = curDir.listFiles(filter); + if (files != null) { + for (File realFile: files) { + String relPath = realFile.getAbsolutePath().substring(repRoot.getAbsolutePath().length()); + final File virtualFile = new File(relPath); + if (realFile.isDirectory()) { + builder.createDirectory(virtualFile); + buildPatchFromDirectory(realFile, builder, repRoot, filter); + } else { + final FileInputStream is = new FileInputStream(realFile); + try { + builder.createBinaryFile(virtualFile, null, is, realFile.length()); + } finally { + is.close(); + } + } + } + } + } + + private void updateWorkingDirectory(final VcsRoot root) throws VcsException { + Settings settings = new Settings(myServerPaths, root); + String workDir = settings.getWorkingDir(); + synchronized (root) { + if (hasRepositoryCopy(new File(workDir))) { + // update + UpdateCommand up = new UpdateCommand(settings); + up.execute(); + } else { + // clone + CloneCommand cl = new CloneCommand(settings); + cl.setDestDir(workDir); + cl.execute(); + } + } + } + + private boolean hasRepositoryCopy(final File workDir) { + return workDir.isDirectory() && new File(workDir, ".hg").isDirectory(); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CatCommand.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,56 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import com.intellij.execution.configurations.GeneralCommandLine; +import java.io.File; +import java.io.IOException; +import java.util.List; +import jetbrains.buildServer.ExecResult; +import jetbrains.buildServer.SimpleCommandLineProcessRunner; +import jetbrains.buildServer.util.FileUtil; +import jetbrains.buildServer.vcs.VcsException; +import org.jetbrains.annotations.NotNull; + +public class CatCommand { + private Settings mySettings; + private String myRevId; + + public CatCommand(@NotNull final Settings settings) { + mySettings = settings; + } + + public void setRevId(final String revId) { + myRevId = revId; + } + + public File execute(List<String> relPaths) throws VcsException { + File tempDir; + try { + tempDir = FileUtil.createTempDirectory("mercurial", "catresult"); + } catch (IOException e) { + throw new VcsException("Unable to create temporary directory"); + } + for (String path: relPaths) { + final File parentFile = new File(tempDir, path).getParentFile(); + if (!parentFile.mkdirs()) { + throw new VcsException("Failed to create directory: " + parentFile.getAbsolutePath()); + } + } + + GeneralCommandLine cli = new GeneralCommandLine(); + cli.setExePath(mySettings.getHgCommandPath()); + cli.addParameter("--cwd"); + cli.addParameter(mySettings.getWorkingDir()); + cli.addParameter("cat"); + cli.addParameter("-o"); + cli.addParameter(tempDir.getAbsolutePath() + File.separator + "%p"); + if (myRevId != null) { + cli.addParameter("-r"); + cli.addParameter(myRevId); + } + for (String p: relPaths) { + cli.addParameter(p); + } + CommandUtil.checkCommandFailed("hg cat", SimpleCommandLineProcessRunner.runCommand(cli, null)); + return tempDir; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/ChangeSet.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,67 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import java.util.Date; +import org.jetbrains.annotations.NotNull; + +public class ChangeSet { + private int myRevNumber; + @NotNull private String myId; + @NotNull private String myUser; + @NotNull private Date myTimestamp; + private String mySummary; + + public ChangeSet(final int revNumber, @NotNull final String id) { + myRevNumber = revNumber; + myId = id; + } + + public ChangeSet(@NotNull final String fullVersion) { + try { + String[] parts = fullVersion.split(":"); + myRevNumber = Integer.parseInt(parts[0]); + myId = parts[1]; + } catch (Throwable e) { + throw new IllegalArgumentException(e); + } + } + + public void setUser(@NotNull final String user) { + myUser = user; + } + + public void setTimestamp(@NotNull final Date timestamp) { + myTimestamp = timestamp; + } + + public void setSummary(final String summary) { + mySummary = summary; + } + + @NotNull + public String getId() { + return myId; + } + + public int getRevNumber() { + return myRevNumber; + } + + @NotNull + public String getFullVersion() { + return myRevNumber + ":" + myId; + } + + @NotNull + public String getUser() { + return myUser; + } + + @NotNull + public Date getTimestamp() { + return myTimestamp; + } + + public String getSummary() { + return mySummary; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,48 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import com.intellij.execution.configurations.GeneralCommandLine; +import java.io.File; +import jetbrains.buildServer.SimpleCommandLineProcessRunner; +import jetbrains.buildServer.ExecResult; +import jetbrains.buildServer.vcs.VcsException; +import org.jetbrains.annotations.NotNull; + +public class CloneCommand { + private Settings mySettings; + private String myDestDir; + private String myToId; + + public CloneCommand(@NotNull final Settings settings) { + mySettings = settings; + } + + public void setDestDir(@NotNull String destDir) { + myDestDir = destDir; + } + + public void setToId(final String toId) { + myToId = toId; + } + + public void execute() throws VcsException { + if (myDestDir == null) throw new IllegalStateException("Destination dir must be specified"); + GeneralCommandLine cli = new GeneralCommandLine(); + cli.setExePath(mySettings.getHgCommandPath()); + cli.addParameter("-q"); + cli.addParameter("--cwd"); + File dir = new File(myDestDir); + File parent = dir.getParentFile(); + cli.addParameter(parent.getAbsolutePath()); + cli.addParameter("clone"); + if (myToId != null) { + cli.addParameter("-r"); + cli.addParameter(myToId); + } + //cli.addParameter("--pull"); + cli.addParameter(mySettings.getRepository()); + cli.addParameter(dir.getName()); + + final ExecResult res = SimpleCommandLineProcessRunner.runCommand(cli, null); + CommandUtil.checkCommandFailed("hg clone", res); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CommandUtil.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,16 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import jetbrains.buildServer.ExecResult; +import jetbrains.buildServer.log.Loggers; +import jetbrains.buildServer.vcs.VcsException; +import org.jetbrains.annotations.NotNull; + +public class CommandUtil { + public static void checkCommandFailed(@NotNull String cmdName, @NotNull ExecResult res) throws VcsException { + if (res.getExitCode() > 0) { + final String message = "'" + cmdName + "' command failed. Err: " + res.getStderr() + "\nout: " + res.getStdout(); + Loggers.VCS.warn(message); + throw new VcsException(message); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/LogCommand.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,109 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import com.intellij.execution.configurations.GeneralCommandLine; +import com.intellij.openapi.diagnostic.Logger; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import jetbrains.buildServer.ExecResult; +import jetbrains.buildServer.SimpleCommandLineProcessRunner; +import jetbrains.buildServer.vcs.VcsException; +import org.jetbrains.annotations.NotNull; + +public class LogCommand { + private final static Logger LOG = Logger.getInstance(LogCommand.class.getName()); + private String myFromId; + private String myToId; + private Settings mySettings; + private static final String CHANGESET_PREFIX = "changeset:"; + private static final String USER_PREFIX = "user:"; + private static final String DATE_PREFIX = "date:"; + private static final String DATE_FORMAT = "EEE MMM d HH:mm:ss yyyy Z"; + private static final String SUMMARY_PREFIX = "summary:"; + + public LogCommand(@NotNull Settings settings) { + mySettings = settings; + } + + public void setFromRevId(String id) { + myFromId = id; + } + + public void setToRevId(String id) { + myToId = id; + } + + public List<ChangeSet> execute() throws VcsException { + GeneralCommandLine cli = new GeneralCommandLine(); + cli.setExePath(mySettings.getHgCommandPath()); + cli.addParameter("--cwd"); + cli.addParameter(mySettings.getWorkingDir()); + cli.addParameter("log"); + cli.addParameter("-r"); + String from = myFromId; + if (from == null) from = "0"; + String to = myToId; + if (to == null) to = "0"; + cli.addParameter(from + ":" + to); + + ExecResult res = SimpleCommandLineProcessRunner.runCommand(cli, null); + CommandUtil.checkCommandFailed("hg log", res); + return parseChangeSets(res.getStdout()); + } + + private List<ChangeSet> parseChangeSets(final String stdout) { + List<ChangeSet> result = new ArrayList<ChangeSet>(); + String[] lines = stdout.split("\n"); + ChangeSet current = null; + int lineNum = 0; + while (lineNum < lines.length) { + String line = lines[lineNum]; + lineNum++; + + if (line.startsWith(CHANGESET_PREFIX)) { + String revAndId = line.substring(CHANGESET_PREFIX.length()).trim(); + try { + current = new ChangeSet(revAndId); + result.add(current); + } catch (IllegalArgumentException e) { + LOG.warn("Unable to extract changeset id from the line: " + line); + } + + continue; + } + + if (current == null) continue; + + if (line.startsWith(USER_PREFIX)) { + current.setUser(line.substring(USER_PREFIX.length()).trim()); + continue; + } + + if (line.startsWith(DATE_PREFIX)) { + String date = line.substring(DATE_PREFIX.length()).trim(); + try { + Date parsedDate = new SimpleDateFormat(DATE_FORMAT, Locale.ENGLISH).parse(date); + current.setTimestamp(parsedDate); + } catch (ParseException e) { + LOG.warn("Unable to parse date: " + date); + current = null; + } + + continue; + } + + if (line.startsWith(SUMMARY_PREFIX)) { + String summary = line.substring(SUMMARY_PREFIX.length()).trim(); + current.setSummary(summary); + + continue; + } + } + + return result; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/ModifiedFile.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,40 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import org.jetbrains.annotations.NotNull; + +public class ModifiedFile { + public static enum Status { + ADDED("added"), + MODIFIED("modified"), + REMOVED("removed"), + UNKNOWN("unknown"); + private String myName; + + Status(@NotNull final String name) { + myName = name; + } + + @NotNull + public String getName() { + return myName; + } + } + + @NotNull private Status myStatus; + @NotNull private String myPath; + + public ModifiedFile(@NotNull final Status status, @NotNull final String path) { + myStatus = status; + myPath = path; + } + + @NotNull + public Status getStatus() { + return myStatus; + } + + @NotNull + public String getPath() { + return myPath; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/Settings.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,59 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import java.io.File; +import jetbrains.buildServer.buildTriggers.vcs.mercurial.Constants; +import jetbrains.buildServer.serverSide.ServerPaths; +import jetbrains.buildServer.vcs.VcsRoot; +import org.jetbrains.annotations.NotNull; + +public class Settings { + private String myRepository; + private String myHgCommandPath; + private ServerPaths myServerPaths; + private String myWorkingDir; + + public Settings(@NotNull ServerPaths paths, @NotNull VcsRoot vcsRoot) { + myServerPaths = paths; + setRepository(vcsRoot.getProperty(Constants.REPOSITORY_PROP)); + setHgCommandPath(vcsRoot.getProperty(Constants.HG_COMMAND_PATH_PROP)); + } + + public Settings() { + } + + public void setRepository(@NotNull final String repository) { + myRepository = repository; + } + + @NotNull + public String getRepository() { + return myRepository; + } + + @NotNull + public String getHgCommandPath() { + return myHgCommandPath; + } + + public void setHgCommandPath(@NotNull final String hgCommandPath) { + myHgCommandPath = hgCommandPath; + } + + public void setWorkingDir(@NotNull final String workingDir) { + myWorkingDir = workingDir; + } + + @NotNull + public String getWorkingDir() { + if (myWorkingDir != null) { + return myWorkingDir; + } + + String workingDirname = String.valueOf(myRepository.hashCode()); + File workFoldersRootDir = new File(myServerPaths.getCachesDir(), "mercurial"); + if (!workFoldersRootDir.mkdirs() && !workFoldersRootDir.isDirectory()) { + throw new RuntimeException("Cannot create directory: " + workFoldersRootDir.getAbsolutePath()); + } + return new File(workFoldersRootDir, workingDirname).getAbsolutePath(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/StatusCommand.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,67 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import com.intellij.execution.configurations.GeneralCommandLine; +import java.util.ArrayList; +import java.util.List; +import jetbrains.buildServer.ExecResult; +import jetbrains.buildServer.SimpleCommandLineProcessRunner; +import jetbrains.buildServer.vcs.VcsException; +import org.jetbrains.annotations.NotNull; + +public class StatusCommand { + private Settings mySettings; + private String myFromId; + private String myToId; + + public StatusCommand(@NotNull final Settings settings) { + mySettings = settings; + } + + public void setFromRevId(final String fromId) { + myFromId = fromId; + } + + public void setToRevId(final String toId) { + myToId = toId; + } + + public List<ModifiedFile> execute() throws VcsException { + GeneralCommandLine cli = new GeneralCommandLine(); + cli.setExePath(mySettings.getHgCommandPath()); + cli.addParameter("--cwd"); + cli.addParameter(mySettings.getWorkingDir()); + cli.addParameter("status"); + cli.addParameter("--rev"); + String from = myFromId; + if (from == null) from = "0"; + String to = myToId; + if (to == null) to = "0"; + cli.addParameter(from + ":" + to); + ExecResult res = SimpleCommandLineProcessRunner.runCommand(cli, null); + CommandUtil.checkCommandFailed("hg status", res); + return parseFiles(res.getStdout()); + } + + private List<ModifiedFile> parseFiles(final String stdout) { + List<ModifiedFile> result = new ArrayList<ModifiedFile>(); + String[] lines = stdout.split("\n"); + for (String line: lines) { + if (line.length() == 0) continue; + char modifier = line.charAt(0); + String path = line.substring(2); + ModifiedFile.Status status = toStatus(modifier); + if (status == ModifiedFile.Status.UNKNOWN) continue; + result.add(new ModifiedFile(status, path)); + } + return result; + } + + private ModifiedFile.Status toStatus(final char modifier) { + switch (modifier) { + case 'A': return ModifiedFile.Status.ADDED; + case 'M': return ModifiedFile.Status.MODIFIED; + case 'R': return ModifiedFile.Status.REMOVED; + default: return ModifiedFile.Status.UNKNOWN; + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/UpdateCommand.java Mon Jul 14 18:22:05 2008 +0400 @@ -0,0 +1,24 @@ +package jetbrains.buildServer.buildTriggers.vcs.mercurial.command; + +import com.intellij.execution.configurations.GeneralCommandLine; +import jetbrains.buildServer.SimpleCommandLineProcessRunner; +import jetbrains.buildServer.vcs.VcsException; +import org.jetbrains.annotations.NotNull; + +public class UpdateCommand { + private Settings mySettings; + + public UpdateCommand(@NotNull final Settings settings) { + mySettings = settings; + } + + public void execute() throws VcsException { + GeneralCommandLine cli = new GeneralCommandLine(); + cli.setExePath(mySettings.getHgCommandPath()); + cli.addParameter("--cwd"); + cli.addParameter(mySettings.getWorkingDir()); + cli.addParameter("update"); + cli.addParameter("-C"); + CommandUtil.checkCommandFailed("hg update", SimpleCommandLineProcessRunner.runCommand(cli, null)); + } +}