s & c      !"#$%&'()*+,-./0123456 7 8 9 : ; < = > ? @ A B C D E F G H I J KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI J K L M N O P Q!R!S!T!U!V!W!X!Y!Z![!\"]"^"_"`"a"b"c"d"e"f"g"h"i"j"k"l#m#n#o#p#q#r#s#t#u#v#w#x$y$z${$|%}%~%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(((((((((( ( ( ( ( )))))))*****++++,,, ,!,",#,$,%,&,',(-)-*-+-,---.-/-0-1.2.3.4.5.6.7.8.9.:.;.<.=.>.?.@.A.B.C/D/E/F/G/H/I/J/K/L0M0N0O0P0Q0R0S0T0U0V0W0X0Y0Z0[0\0]0^0_0`0a0b0c0d0e0f0g0h0i0j0k0l0m0n0o0p0q0r0s1t1u1v1w1x1y1z1{1|1}2~222222223333333333334444444455555566666666666666666667777777777777777777777777777777777777777777777777777777777777777777777777777777777777 7 7 7 7 7777788888888888888 8!8"8#8$8%8&8'8(8)8*8+8,8-8.8/808182838485868788898:8;8<8=8>8?8@8A8B9C9D9E9F9G9H9I9J9K9L9M9N9O9P9Q9R9S9T9U9V9W9X9Y9Z9[9\9]:^:_:`:a:b:c:d:e:f;g;h;i;j;k;l;m;n;o;p;qrstuvwxy<z<{=|=}=~=========>>>>>????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ? ? ? ? ??????????????????? ?!?"?#?$?%?&?'?(?)?*?+?,?-?.?/?0?1?2?3?4?5?6?7?8?9?:?;?<?=?>???@?A?B?C?D?E?F?G?H?I?J?K?L?M?N?O@P@Q@R@S@T@U@V@W@X@Y@Z@[@\@]@^@_@`@a@b@c@d@e@f@gAhBiBjBkBlCmCnCoCpCqCrCsCtCuCvCwCxCyCzD{D|D}D~DDDDDDEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHIIIIIIJJJJJJJJJJJJJJJJKKKKKKKKKKKKKK K K K K KKKKKKKKKKKKKKKKKKK K!K"L#L$L%L&L'M(M)M*M+M,M-M.N/N0N1N2N3N4N5N6N7N8O9O:O;O<O=O>O?O@OAOBOCODOEOFOGOHOIOJOKOLOMONOOOPOQOROSOTOUOVOWOXOYOZO[O\O]O^O_O`OaObOcOdOeOfOgOhOiOjOkOlOmOnPoPpPqPrPsPtPuPvPwPxPyPzP{P|P}P~PPPPPPPPPPPPPPQRSSSSSSSTTTTTTTTTTTTTTTTUUVVVWXXXXXXXXXXXXXXXXXXXXXXXXXXXXYYZ[\]]]]]]]]]]]]]]^^________`````aaaaaaaaaaaaaaaaaaaaaaaabbbbcccc c c c c ccccccccccccccddddd d!d"d#d$d%d&d'd(d)d*d+d,d-e.f/f0f1f2f3f4g5g6g7g8g9g:h;h<h=h>h?h@hAhBhCiDiEiFiGjHjIjJjKjLjMjNjOjPjQjRjSjTjUjVjWjXjYjZj[j\j]j^j_j`jajbjcjdjejfjgjhjijjjkjlkmknkokpkqkrksktkukvkwkxkykzk{k|k}k~kkkkllllllllllllllllllmmmmmmmmmmmmmmnnnnnnnnnnnnnnnnnnnnnnnnooooooooooooooooooooooooooooooooooooooooooooppppppppppppppppppppppppppppppppppp p p p p pppppppppqqqqqqqqqq q!q"q#q$q%q&q'q(q)r*r+r,r-r.s/s0s1t2u3u4u5u6u7u8u9u:u;u<u=u>u?u@uAuBuCuDuEuFuGuHuIuJuKuLuMuNuOuPuQuRuSuTuUuVuWuXuYuZu[u\u]u^u_u`uaubucudueufuguhuiujvkvlvmvnvovpvqvrvswtxuxvxwxxxyxzx{x|x}x~xxxxxxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzzzzzzzzzzzzzzzzzzzzzzzzzzz{{{{{{{{{{{{{{{{{{{{{{{{{{{{{|||}}~                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a bSafe'+-;<=CFQSTVon-disk format for V1 patcheson-disk format for V2 patchesdisplay format1This type is used to tweak the way that lists of p are shown for a given Patch type pJ. It is needed to maintain backwards compatibility for V1 and V2 patches.#Show and read lists without braces.Show lists with a single layer of braces around the outside, except for singletons which have no braces. Read with arbitrary nested braces and parens and flatten them out.SShow lists without braces. Read with arbitrary nested parens and flatten them out. Showing and reading lists of patches. This class allows us to control how lists of patches are formatted on disk. For legacy reasons V1 patches have their own special treatment (see |). Other patch types use the default format which just puts them in a sequence without separators or any prelude/epilogue.nThis means that 'FL (FL p)' etc would be ambiguous, so there are no instances for 'FL p' or other list types.  ! ! !Safe'+-;<=CFQSTVɌ$A reflection of )> at the value level so that code can explicitly switch on it.'Reflect )> to the value level so that code can explicitly switch on it.( Extract the 0 from a ));This type is intended to be used as a phantom type via the  DataKindsg extension. It tracks different types of repositories, e.g. to indicate when a rebase is in progress. cReflect 0> to the value level so that code can explicitly switch on it.-A reflection of 0> at the value level so that code can explicitly switch on it.0<This type is intended to be used as a phantom type via the  DataKinds extension, normally as part of )4. Indicates whether or not a rebase is in progress.$%&'()*+,-./012)*+&'$%012,(-./$%&')*+, c-./012 Safe'+-;<=CFQSTV6@Used for indicating a patch type without having a concrete patch67867867 None'+-;<=CFQSTV9:;<=9:;<= Safe'+-;<=CFQSTVͧ d e f g h i j k l m n o p q r s t u v w x y z { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_>?>? None'+-;<=CFQSTV`@JAn witness aware equality class. A minimal definition defines any one of A, B and C.AyIt is unsafe to define a class instance via this method, because if it returns True then the default implementations of B and C, will coerce the equality of two witnesses.&Calling this method is safe, although B or C would be better choices as it is not usually meaningul to compare two patches that don't share either a starting or an ending contextBCompare two things with the same starting witness. If the things compare equal, evidence of the ending witnesses being equal will be returned.CCompare two things with the same ending witness. If the things compare equal, evidence of the starting witnesses being equal will be returned.DDU is used to pass around evidence (or lack thereof) of two witness types being equal.@BCADEFGDEF@ABCG@ABCDEFB4C4 Safe'+-;<=CFQSTV[JJ returns a filter function that tells if a char is a member of the regChar expression or not. The regChar expression is basically a set of chars, but it can contain ranges with use of the  M (dash), and it can also be specified as a complement set by prefixing with ^ (caret). The dash and caret, as well as the backslash, can all be escaped with a backslash to suppress their special meaning. NOTE: The Vb (dot) is allowed to be escaped. It has no special meaning if it is not escaped, but the default  filename_toks7 in Darcs.Commands.Replace uses an escaped dot (WHY?).`` unescapes whitespace, which is escaped in the replace patch file format. It will also unescape escaped carets, which is useful for escaping a leading caret that should not invert the regChars. All other escapes are left for the unescaping in a.aa assembles the filter function. It handles special chars, and also unescaping of escaped special chars. If a non-special char is still escaped by now we get a failure.JJSafe'+-;<=CFQSTVbbreakOutToken tokChars input splits the input  ByteString into   (before, token, after), where token6 is the first non-empty substring consisting only of  s in tokChars, or   if no token was found. The  s in tokChars5 should not have code points larger than 255 (0xff).K$tryTokReplace tokChars old new input tries to find the token old and replace it with the token new everywhere in the input , returning   the modified input, unless the token new is already in the input in which case  N is returned. A token is a sequence of bytes that match the class defined by tokChars<. This function is supposed to work efficiently with large inputs i.e. whole files.L&forceTokReplace tokChars old new input" replaces all occurrences of the old token with the new one, throughout the input.M:Check if a token replace operation touches the given line.NBreak a  Bytestring into tokens, according to O, discarding non-tokens.KLMNOKLMNOSafe'+-;<=CFQSTVPLift an isomorphism between a and b to one between f a and f b. Like  F, except we can only map invertible functions (i.e. an Isomorphisms).R@Lightweight type ismomorphisms (a.k.a. invertible functions). If Iso fw bw :: Iso a bthen fw and bw are supposed to satisfyfw . bw = id = bw . fwTApply an iso under a functor.U.Apply an iso under cps (which is a cofunctor).PQRSTURSPQTUPQRSSafe"#'+-;<=CFQSTVS VAType of primitive (not yet combined) options. The type parameter b gets instantiated to (v -> a), adding one argument of type v) to the answer type of the continuation.W!A type for option specifications.]It consists of four components: a parser, an unparser, a checker, and a list of descriptions.The parser converts a flag list to some result value. This can never fail: we demand that primitive parsers are written so that there is always a default value (use   with default   as a last resort).WThe unparser does the opposite of the parser: a value is converted back to a flag list.The checker returns a list of error messages (which should be empty if there are no problems found). This can be used to e.g. check whether there are conflicting flags in the list.Separating the checker and parser is unusual. The reason for this is that we want to support flags coming from multiple sources, such as the command line or a defaults file. Prioritising these sources is done by concatenating the flag lists in the order of precedence, so that earlier flags win over later ones. That means that when parsing the (final) flag list, conflicting flags are resolved by picking the first flag that matches an option. The checker, on the other hand, can be called for each source separately.cThe last component is a list of descriptors for each single switch/flag that the option is made of.The W7 type is heavily parameterized. The type arguments are: fThe flag type, such as .d0A type that describes an single flag, such as  or . It should be a .Abstracting over these types is not technically necessary: for the intended application in Darcs, we could as well fix them as d=, and f=, saving two type parameters. However, doing that here would only obscure what's going on, making the code harder to understand, not easier. Besides, the resulting more general type signatures give us additional guarantees, known as "free theorems" (free as in beer, not in speak). In contrast, the type parameters a, b]are necessary to make chaining of options a la typed printf/scanf possible. In a nutshell, af is the result type of a function that consumes the result of parsing or unparsing an option, while b+ is the complete type of such a function.The Y and Z members use continuation passing style, which is the reason for their apparently "inverted" type signature. To understand them, it helps to look at the type of "primitive" (not yet combined) options (see V! below). For a primitive option, b gets instantiated to v -> a, where vV is the type of values associated with the option. The whole option spec then has type  o :: 'OptSpec' d f a (v -> a) so that the Z and Y members are instantiated to [ ounparse :: forall a. ([f] -> a) -> (x -> a) oparse :: forall a. (x -> a) -> ([f] -> a),which can be easily seen to be equivalent to + ounparse :: x -> [f] oparse :: [f] -> x:Chaining such options results in a combined option of type 6 o1 ^ o2 ^ ... :: OptSpec d f a (v1 -> v2 -> ... -> a) that is, b gets instantiated to  v1 -> v2 -> ... -> aTo use such an option (primitive or combined), you pass in the consumer. A typical consumer of option values is a command implementation. Given , cmd :: v1 -> v2 -> ... -> [String] -> IO ()/we can parse the flags and pass the results to cmd: ! oparse (o1 ^ o2 ^ ...) cmd flagsY1Convert option value (back) to flag list, in CPS.ZaConvert flag list to option value, in CPS. Note: as a pure function, it is not supposed to fail.[7Check for erros in a flag list, returns error messages.\9Descriptions, one for each flag that makes up the option.] Identity W , unit for ^^W composition, associative_Normalise a flag list by parsing and then unparsing it. This adds all implicit (default) flags to the list, which is useful as long as there is legacy code that circumvents the W5 abstraction and directly tests for flag membership.2onormalise opts = (oparse opts . ounparse opts) id`!The list of default flags for an W.&defaultFlags opts = onormalise opts []aLift an isomorphism between b and c to one between W d f a b and W d f a c.The forward component of the R is needed for Y, the backward component for Z4. For the other two components this is the identity.b|Combine two list valued options of the same type "in parellel". This is done by concatenating the resulting option values (Z ), flags (Y ), errors ([), and descriptors (\'), respectively, of the input options.c Unit for b.dParse a list of flags against a primitive option spec, returning the value associated with the option. As noted above, this cannot fail because options always have a default value. parseFlags o fs = oparse o id fseOperator version of d"opt ? flags = parseFlags opt flagsgSee b and c.VWXYZ[\]^_`abcdeWXYZ[\]^_`afVbchgdeWXYZ[\e52005 Tomasz ZielonkaGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTVWiRegisters an IO action to run just before darcs exits. Useful for removing temporary files and directories, for example. Referenced in Issue1914.ijij2005 Benedikt SchmidtGPLdarcs-devel@darcs.net experimentalportableSafe'+-;<=CFQSTVagcQassoc list mapping characters to strings eg (c,s) means that %c is replaced by sk parse a commandline returning a list of strings (intended to be used as argv) and a bool value which specifies if the command expects input on stdin format specifiers with a mapping in ftable are accepted and replaced by the given strings. E.g. if the ftable is [(s:,"Some subject")], then "%s" is replaced by "Some subject"lTfor every mapping (c,s), add a mapping with uppercase c and the urlencoded string sklklSafe'+-;<=CFQSTVb'mnopqmoqpnSafe'+-;<=CFQSTVu rLData type to represent a connection error. The following are the codes from libcurl which map to each of the constructors: * 6 -> CouldNotResolveHost : The remote host was not resolved. * 7 -> CouldNotConnectToServer : Failed to connect() to host or proxy. * 28 -> OperationTimeout: the specified time-out period was reached.v|Q represents a prioritised queue, with two-tier priority. The left list contains higher priority items than the right list.xA UrlState object contains a map of url -> InProgressStatus, a Q of urls waiting to be started, the current pipe length and the unique junk to create unique filenames.~A UrlRequest object contains a url to get, the file into which the contents at the given url should be written, the cachability of this request and the request's priority.[ will try and take an element from the Q, preferring elements from the high priority list.>Return a function for adding an element based on the priority.& inserts a low priority item into a Q.' inserts a high priority item into a Q.5 removes any instances of a given element from the Q. checks for membership in a Q. is an empty Q.# checks if the Q contains no items.!rstuvwxyz{|}~!~xyz{|}vwrsturstuvwxyz{|}~Safe'+-;<=CFQSTV~: Encode a  into a d according to the user's locale with the ghc specific //ROUNDTRIP feature added. This means the argument is allowed to contain non-Unicode  s as produced by . Decode a d into a u according to the user's locale with the ghc specific //ROUNDTRIP feature added. This means the result may contain  Ls that are not valid Unicode in case decoding with the user's locale fails. 2008 Eric KowGPLdarcs-devel@darcs.net experimentalportableSafe'+-;<=CFQSTV# bsingular This (Noun "batch") "" == "this batch" plural This (Noun "batch") "" == "these batches"This only distinguishes between nouns with a final -ch, and nouns which do not. More irregular nouns will just need to have their own type tplural (Noun "batch") "" == "batches" plural (Noun "bat") "" == "bats" plural (Noun "mouse") "" == "mouses" -- :-(/Things that have a plural and singular spelling englishNum 0 (Noun "watch") "" == "watches" englishNum 1 (Noun "watch") "" == "watch" englishNum 2 (Noun "watch") "" == "watches",Given a list of things, combine them thusly: 4orClauses ["foo", "bar", "baz"] == "foo, bar or baz",Given a list of things, combine them thusly: 4orClauses ["foo", "bar", "baz"] == "foo, bar or baz"%Capitalize the first letter of a word2005 Tomasz ZielonkaGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTVN(c) The University of Glasgow 2001, David Roundy 2003-2005GPL (I'm happy to also license this file BSD style but don't want to bother distributing two license files with darcs.droundy@abridgegame.org experimentalportableNone'+-;<=CFQSTVyPointer to a filesystem, possibly with start/end offsets. Supposed to be fed to (uncurry mmapFileByteString) or similar.2readIntPS skips any whitespace at the beginning of its argument, and reads an Int from the beginning of the PackedString. If there is no integer at the beginning of the string, it returns Nothing, otherwise it just returns the int read, along with a B.ByteString containing the remainder of its input.NDrop leading white space, where white space is defined as consisting of ' ', '\t', '\n', or '\r'."Split at first occurrence of ' ', '\t', '\n', or '\r'."Decompress the given bytestring into a lazy list of chunks, along with a boolean flag indicating (if True) that the CRC was corrupted. Inspecting the flag will cause the entire list of chunks to be evaluated (but if you throw away the list immediately this should run in constant space).ORead an entire file, which may or may not be gzip compressed, directly into a d.ORead standard input, which may or may not be gzip compressed, directly into a d.ERead in a FileSegment into a Lazy ByteString. Implemented using mmap.<Like readFilePS, this reads an entire file directly into a d, but it is even more efficient. It involves directly mapping the file to memory. This has the advantage that the contents of the file never need to be copied. Also, under memory pressure the page may simply be discarded, wile in the case of readFilePS it would need to be written to swap. If you read many small files, mmapFilePS will be less memory-efficient than readFilePS, since each mmapFilePS takes up a separate page of memory. Also, you can run into bus errors if the file is modified.WReturn the B.ByteString between the two lines given, or Nothing if they do not appear.&Simpler but less efficient variant of .0Test if a ByteString is made of ascii characters Decode a  ByteString containing UTF-8 to a 9. Decoding errors are flagged with the U+FFFD character. Encode a  to a  ByteString using UTF-8. Decode a  ByteString to a P according to the current locale, using lone surrogates for un-decodable bytes. Encode a  to a  ByteString according to the current locale, converting lone surrogates back to the original byte. If that fails (because the locale does not support the full unicode range) then encode using utf-8, assuming that the un-ecodable characters come from patch meta data. See also .""62003 David Roundy 2005 Benedikt SchmidtGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTVpcreate a list of changes between a and b, each change has the form (starta, lima, startb, limb) which means that a[starta, lima) has to be replaced by b[startb, limb)e'mark hash value where collision occuredfGreturn arrays with changes in a and b (1 indexed), offsets start with 0g@set changes array for a and b and return number of changed lineshQreturn (xmid, ymid, cost) for the two substrings a[off_a+1..off_a+1+l_a] and biAfind position on diag d with one more insert/delete going forwardjHfollow snake from northwest to southeast, x and y are absolute positionskBfind position on diag d with one more insert/delete going backwardlHfollow snake from southeast to northwest, x and y are absolute positionsEtry to create nicer diffs by shifting around regions of changed linesm<goto next unchanged line, return the given line if unchangednRskip at least one unchanged line, if there is none advance behind the last lineogoto n-th next unchanged linep8goto next changed line, return the given line if changedq@goto previous unchanged line, return the given line if unchangedNone'+-;<=CFQSTVr.the longest common subsequence of unique itemssZThe patientLcs algorithm is inspired by the "patience" algorithm (for which I don't have a reference handy), in that it looks for unique lines, and uses them to subdivide the problem. I use lcs to diff the unique lines. It is slower, but should lead to "better" diffs, in the sense of ones that better align with what humans think changed.Note that when compared with the Meyers algorithm used in darcs, this is somewhat slower (maybe 4x in some of my tests), but is lacking its stack overflow problem. I'm not sure how it scales in general, but it scales fine (just 10x slower than GNU diff) when comparing a 6M american english dictionary with a british english dictionary of the same size (which isn't a great test, but is the largest pair of somewhat-differing files I could find).Note that the patientLcs algorithm is slower than the one used in lcs for sequences with mostly unique elements (as is common in text files), but much *faster* when the sequence has a high degree of redundancy. i.e. lines usrsharedictwords vs lines (cat usrsharedict words | tr 'a-z' a)t`LCS' stands for ``Longest Common Subsequence,'' and it is a relatively challenging problem to find an LCS efficiently. I'm not going to explain here what an LCS is, but will point out that it is useful in finding how two sequences (lists, in this case) differ. This module implements the Hunt-Szymanski algorithm, which is appropriate for applications in which the sequence is on an infinite alphabet, such as diffing the lines in two files, where many, or most lines are unique. In the best case scenario, a permutation of unique lines, this algorithm is $O(nlog n)$. In the worst case scenario, that of a finite alphabet (i.e. where the number of elements in the sequence is much greater than the number of unique elements), it is an $O(n^2log n)$ algorithm, which is pretty terrible.uvNone'+-;<=CFQSTVNone'+-;<=CFQSTVrww! is the Strict Monad for parsing.xParserState represents the internal state of the parser. We make it strict and specialize it on ByteString. This is purely to help GHC optimize. If performance were not a concern, it could be replaced with (a, ByteString).y&Applies a parsing function inside the  monad.z@Allows for the inspection of the input that is yet to be parsed.Run the parserT checks if the next space delimited token from the input stream matches a specific  . Uses   inside D to handle failed matches, so that it always returns () on success._ fetches the next whitespace delimited token from from the input and checks if it matches the  ByteString input. Uses   inside D to handle failed matches, so that it always returns () on success.;Only succeeds if the characters in the input exactly match str.? looks for optional spaces followed by the end of input. Uses   inside D to handle failed matches, so that it always returns () on success.{{N drops leading spaces and then breaks the string at the next space. Returns   when the string is empty after dropping leading spaces, otherwise it returns the first sequence of non-spaces and the remainder of the input.Like { except that it is in ParserMHAccepts the next character and returns it. Only fails at end of input.6Only succeeds at end of input, consumes no characters.KAccepts only the specified character. Consumes a character, if available.hParse an integer and return it. Skips leading whitespaces and | uses the efficient ByteString readInt.MDiscards spaces until a non-space character is encountered. Always succeeds.#Discards any characters as long as p# returns True. Always | succeeds.Takes characters while p returns True. Always succeeds.Equivalent to takeTill (==c)7, except that it is optimized for | the equality case.Takes exactly n bytes, or fails.1This is a highly optimized way to read lines that start with a particular character. To implement this efficiently we need access to the parser's internal state. If this is implemented in terms of the other primitives for the parser it requires us to consume one character at a time. That leads to (>>=) wasting significant time.|Helper function for .This is a highly optimized way to read lines that start with a particular character, and stops when it reaches a particular | character. See 8 for details on why this | defined here as a primitive.}Helper function for .~PApplies a function to the input stream and discards the result of the function.If p fails it returns x%, otherwise it returns the result of p.(Attempts each option until one succeeds.Ensure that a parser consumes input when producing a result Causes the initial state of the input stream to be held on to while the parser runs, so use with caution. applies the parser functions to a string and checks that each parser produced a result as it goes. The strictness is in the  instance for w.,Convert from a lazy tuple to a strict tuple.wxyzNone'+-;<=CFQSTV$."Just copy pristine and inventories/*First do a lazy clone then copy everything08Same as Normal but omit telling user they can interrumpt2!Just files already known to darcs3!All files, i.e. look for new ones4All files, even boring onesd !"#$%&'()*+,-0./12345678:9;<=>?@ABCDEFGHIJKLMNOPQRSTUWVXYZ[\]^`_abcdefghijklmndghiabcn^_`jklm[\]XYZUVWRSTOPQLMNIJKCDE@AB=>?;<89:5671234-./0)*+,&'("#$% !defFGH !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmNone'+-1;<=CFQSTV0Produce a base16 (ascii-hex) encoded string from a hash. This can be turned back into a Hash (see "decodeBase16". This is a loss-less process.0Take a base16-encoded string and decode it as a Hash-. If the string is malformed, yields NoHash.(Compute a sha256 of a (lazy) ByteString.%Same as previous but general purpose.TDo something with the internals of a PackedString. Beware of altering the contents!22003 Peter Simons 2003 David RoundyGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTV /An  MCalenderTime is an underspecified  It is used for parsing dates. For example, if you want to parse the date '4 January', it may be useful to underspecify the year by setting it to  *. This uses almost the same fields as 1, a notable exception being that we introduce . to indicate if a weekday was specified or not^Read/interpret a date string, assuming UTC if timezone is not specified in the string (see A) Warning! This errors out if we fail to interpret the dateConvert a date string into ISO 8601 format (yyyymmdd variant) assuming local timezone if not specified in the string Warning! This errors out if we fail to interpret the date4Return the local timezone offset from UTC in secondsParse a date string with r Warning! This errors out if we fail to interpret the date Uses its first argument as the default time zone. Similar to  , except we ignore timezone info in the input string. This is incorrect and ugly. The only reason it still exists is so we can generate file names for old-fashioned repositories in the same way that old darcs versions expected them. You should not use this function except for the above stated purpose.Parse a date string, assuming a default timezone if the date string does not specify one. The date formats understood are those of  and  Display a F in the ISO 8601 format without any separators, e.g. 20080825142503+The current time in the format returned by %Case-insensitive variant of Parsec's  function.%Case-insensitive variant of Parsec's  function.Match a parser at least n times.Match a parser at least n times, but no more than m times.5Try each of these date parsers in the following order "CVS-style date/times, e.g. 200708:25 14:25:39 GMT Note that time-zones are optional here.s"Old"-style dates, e.g. Tue Jan 3 14:08:07 EST 1999 darcs-doc: Question (what does the "old" stand for really?);ISO 8601 dates and times. Please note the following flaws:I am reluctant to implement: years > 9999<truncated representations with implied century (89 for 1989)I have not implemented:!repeated durations (not relevant)-lowest order component fractions in intervalsnegative dates (BC)-I have not verified or have left too relaxed:!the difference between 24h and 0hallows stuff like 2005-1212; either you use the hyphen all the way (2005-12-12) or you don't use it at all (20051212), but you don't use it halfway, likewise with timevNo bounds checking whatsoever on intervals! (next action: read iso doc to see if bounds-checking required?) -}Three types of ISO 8601 date:6calendar date, e.g., 1997-07-17, 1997-07, 199707, 1997#week+day in year, e.g., 1997-W32-4day in year, e.g, 1997-273RNote that this returns a function which sets the time on another calendar (see  for a list of flawsIntervals in ISO 8601, e.g.,2008-09/2012-08-17T16:302008-09/P2Y11MT16H30MP2Y11MT16H30M/2012-08-17T16:30See Durations in ISO 8601, e.g.,P4Y (four years)P5M (five months)"P4Y5M (four years and five months)2P4YT3H6S (four years, three hours and six seconds) p xs/ parses a string with the obligatory parser p. If this suceeds, it continues on to the rest of the input using the next parsers down the chain. Each part of the chain consists of a parser for a separator and for the content itself. The separator is optional.oA good use of this function is to help in parsing ISO ISO 8601 dates and times. For example, the parser *optchain year [(dash, month), (dash, day)] accepts dates like 2007 (only the year is used), 2007-07 (only the year and month), 200707 (only the year and month with no separator), 2007-07-19 (year, month and day).hOne or more space. WARNING! This only matches on the space character, not on whitespace in general;English three-letter day abbreviations (e.g. Mon, Tue, Wed)Four-digit year:One or two digit month (e.g. 3 for March, 11 for November) January is 1, February is 2, etc=English three-letter month abbreviations (e.g. Jan, Feb, Mar) day in one or two digit notationhour in two-digit notationminute in two-digit notationsecond in two-digit notationlimited timezone support+HHMM or -HHMMUniversal timezones: UTC, UTZones from GNU coreutilslib5getdate.y, less half-hour ones -- sorry Newfies.>any sequence of alphabetic characters (WARNING! treated as 0!)AIn English, either a date followed by a time, or vice-versa, e.g,yesterday at noonyesterday tea time12:00 yesterdaySee  and w Uses its first argument as "now", i.e. the time relative to which "yesterday", "today" etc are to be interpreted:Specific dates in English as specific points of time, e.g,today yesterday/last week (i.e. the beginning of that interval)4 months ago (via )The first argument is "now".0English expressions for points in the past, e.g. 4 months ago 1 day agoday before yesterdaySee *English expressions for intervals of time,1before tea time (i.e. from the beginning of time)&after 14:00 last month (i.e. till now) between last year and last month2in the last three months (i.e. from then till now)!4 months ago (i.e. till now; see )Durations in English that begin with the word "last", E.g. "last 4 months" is treated as the duration between 4 months ago and now Either an ; or one of several common English time expressions like noon or 'tea time'Some English durations, e.g.day4 score7 years 12 monthswThis is not particularly strict about what it accepts. For example, "7 yeares", "4 scores" or "1 days" are just fine.+The very beginning of time, i.e. 1970-01-01Trivially convert a  to a fully specified  (note that this sets the  flag to FalseReturns the first  that falls within a p This is only unsafe in the sense that it plugs in default values for fields that have not been set, e.g. January for the month or 0T for the seconds field. Maybe we should rename it something happier. See also  i d multiplies every field in d with iFIXME; this seems like a terrible idea! it seems like we should get rid of it if at all possible, maybe adding an invertDiff functionsSet a calendar to UTC time any eliminate any inconsistencies within (for example, where the weekday is given as ThursdayN, but this does not match what the numerical date would lead one to expect) c mc- replaces any field which is specified in mc with the equivalent field in c -copyCalendar c nullMCalendar == nullMCalendarZero the time fields of a ""2004 David RoundyGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTV` A  combines a potential parse for a date string with a "matcher" function that operates on a given date. We use an existential type on the matcher to allow the date string to either be interpreted as a point in time or as an interval. x y is true if x <= y < (x + one_day)+ Note that this converts the two dates to  ClockTime& to avoid any timezone-related errors x1 x2 y is true if  x1 <= y < x2 Since x1 and x2U can be underspecified, we simply assume the first date that they could stand for. x1 x2 y is true if  x1 <= y < x2 x1 x2 y is true if  x1 <= y < x2  range exact is true if exact5 falls within the a range of dates represented by rangeY. The purpose of this function is to support matching on partially specified dates. That is, if you only specify the date 2007, this function should match any dates within that year. On the other hand, if you specify 2007-01, this function will match any dates within that month. This function only matches up to the second. s" return the first matcher in  that can parse s d9 returns the list of matchers that will be applied on dm. If you wish to extend the date parsing code, this will likely be the function that you modify to do so. ms' returns the first successful match in ms* It is an error if there are no matches d; shows the possible interpretations for the date string d/ and how they match against the current date iso d; shows the possible interpretations for the date string dK and how they match against the date represented by the ISO 8601 string isohelper function for  and  c dm tells us if dm applies to  c; or if dm? just represents the failure to parse a date, in which case c is moot.None'+-;<=CFQSTVGg is a wrapper around '[Printable] -> [Printable]' which allows to handle the special case of an empty ( in a non-uniform manner. The simplest  Documents are built from s using %.?A set of printers to print different types of text to a handle.The State associated with a V. Contains a set of printers for each hanlde, and the current prefix of the document.A  is a bit of enriched text. s are concatenated using  from class  , which is right-associative.A T is either a String, a packed string, or a chunk of text with both representations. representation of a space representation of a newline.A  representing a space (" ")A  representing a newlineA  representing a "-"A  representing a "+"A  representing a "\"A  that represents "("A  that represents ")" parens d = lparen <> d <> rparen&Fail with a stack trace and the given  as error message. puts a # on stdout using the given printer.   puts a ;, followed by a newline on stdout using the given printer.   puts a $ on stdout using the simple printer 5.   puts a ), followed by a newline on stdout using 5  eputDocLn puts a ), followed by a newline to stderr using 5. Like putDocLn, it encodes with the user's locale. This function is the recommended way to output messages that should be visible to users on the console, but cannot (or should not) be silenced even when --quiet is in effect.  hputDocWith puts a - on the given handle using the given printer. hputDocLnWith puts a E, followed by a newline on the given handle using the given printer.hputDoc puts a  on the given handle using 5 hputDocLn puts a 3, followed by a newline on the given handle using 5.like & but with compress data before writingWrite a % to stderr if debugging is turned on. h prints a list of s to the handle h It uses binary output of  ByteString9s. If these not available, converts according to locale. h prints a  to the handle h. renders a  into a 5 with control codes for the special features of the . renders a  into a A using a given set of printers. If content is only available as  ByteString*, decode according to the current locale. renders a  into dC with control codes for the special features of the Doc. See also  readerString. renders a  into a list of  PackedStrings, one for each line. renders a  into a d using a given set of printers. renders a  into a list of  PackedStrings4, one for each chunk of text that was added to the #, using the given set of printers. renders a  into a list of  Printables` using a set of printers. Each item of the list corresponds to a string that was added to the . builds a Doc from a  and a d> representing the same text, but does not check that they do. builds a  from a :. The string is stored in the Doc as both a String and a d.   builds a  from a d using 1!! builds a  from a d using 6"" creates a  with invisible text from a d## creates a " representing a user chunk from a d.4Rrrright. And what, please is that supposed to mean?$$- creates a Doc containing just one character.%% creates a  from a String, using 1.&& creates a  from a , using 6 directly'' creates a " containing invisible text from a String(( creates a  containing hidden text from a String)) creates a  containing a user chunk from a String// creates a  containing colored text from a String00 n s is a  representing s line-wrapped at n characters1 Creates a  from any .2Creates an invisible  from any .3Creates a hidden  from any .4 Creates... WTF is a userchunk???55 is a  which uses the set 'simplePriners\'' on any handle.FA set of default printers suitable for any handle. Does not use color.66 is the simplest 3: it just concatenates together the pieces of the 77 is the 6 for hidden text. It just replaces the document with 8. It's useful to have a printer that doesn't actually do anything because this allows you to have tunable policies, for example, only printing some text if it's to the terminal, but not if it's to a file or vice-versa.8 The empty Concatenation of two s:a : b is a  b if a is not empty, else empty;a ; b is a followed by b. with a space in between if both are non-empty<a < b is a above b vplus a b is a above b4 with an empty line in between if both are non-empty=Pile  s vertically>Pile *s vertically, with a blank line in between? Concatenate s horizontally@ Concatenate (s horizontally with a space as separatorA Quote a string for screen outputB  () is concatenation,   is the 8 DdTogether with the language extension OverloadedStrings, this allows to use string literals where a  is expected.\      !"#$%&'()*+,-./0123456789:;<=>?@A\8:;<=>?@%('0A) "#57691234*+,-./     &$!6;6<55None'+-;<=CFQSTVEFormats an e-mail header by encoding any non-ascii characters using UTF-8 and Q-encoding, and folding lines at appropriate points. It doesn't do more than that, so the header name and header value should be well-formatted give or take line length and encoding. So no non-ASCII characters within quoted-string, quoted-pair, or atom; no semantically meaningful signs in names; no non-ASCII characters in the header name; etcetera.Turns a piece of string into a q-encoded block Applies q-encoding, for use in e-mail header values, as defined in RFC 2047. It just takes a string and builds an encoded-word from it, it does not check length or necessity.EFGHFGEH None'+-;<=CFQSTV4|The > type is a record containing the variables which control how "s will be rendered on some output.overall use of coloroverall use of escaping1overall use of colored lines (only hunks for now)$alternative to color (bold, inverse)don't escape isprintsdon't escape 8-bit charsextra chars to never escapeextra chars to always escapeescape trailing spacesignore r at end of lines$escape spaces (used with poTrailing) returns a suitable policy for a given handle. The policy is chosen according to environment variables, and to the type of terminal which the handle representsMM h7 returns a set of printers suitable for outputting to h policy< tries to color a Doc, according to policy po. That is, if policy has  poLineColor4 set, then colors the line, otherwise does nothing. policy string escapes string$ according to the rules defined in policy, turning it into a . policy c tells wether c0 will be left as-is when escaping according to policyG tells wether a character is a printable character of the ascii range.2 represents a special character as a string. *  quoteChar '^c' (where ^c is a control character) is "^c" * Otherwise,  quoteChar returns "hex", where hex1 is the hexadecimal number of the character. policy doc marks docC with the appropriate marking for escaped characters according to policy policy color doc colors doc with color color if policyZ is not set to use an alternative to color. In that case, it makes the text bold instead. doc tries to make docm (usually a single escaped char) stand out with the help of only plain ascii, i.e., no color or font style.)the string to reset the terminal's color. color doc returns a colorized version of doc. color/ is a string that represents a color, given by  boldens a doc.* returns an invert video version of a doc.IJKLMNOPLIJKMNPO !2008 David RoundyGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTV>QbeginTedious k/ starts a tedious process and registers it in  with the key kC. A tedious process is one for which we want a progress indicator.Wouldn't it be safer if it had type String -> IO ProgressDataKey, so that we can ensure there is no collision? What happens if you call beginTedious twice with the same string, without calling endTedious in the meantime?R endTedious k* unregisters the tedious process with key k , printing Done" if such a tedious process exists.TXXX: document this constant QRSTUVWXYZ[ QRS[VWXYUTZ"2003 David RoundyGPLdarcs-devel@darcs.net experimentalportableNone'+-1;<=CFQSTVAhcommand to run any argumentsexitcode, stderr \]^`a_bcdefgh efhdgc^_`ab\]\]^_`abNone'+-;<=CFQSTVB #None'+-;<=CFQSTVMponly shown on helps!Ask the user for a line of input.tAsk the user to press EnteruaskUserListItem prompt xs enumerates xs? on the screen, allowing the user to choose one of the itemsvPrompt the user for a yes or nowHPrompt the user for a character, among a list of possible ones. Always returns a lowercase character. This is because the default character (ie, the character shown in uppercase, that is automatically selected when the user presses the space bar) is shown as uppercase, hence users may want to enter it as uppercase.sThe prompt to displayThe string the user entered.tThe prompt to display lmnopqrstuvw tsulmnopqrvwlmnopqrSafe'+-;<=CFQSTVN$Safe'+-;<=CFQSTVOxyzzxyxy%Safe'+-;<=CFQSTVPpz|}~~|}z|}~&None'+-;<=CFQSTVi  abstracts over  and # for code constructing these values An empty , e.g. NilFL or NilRLA e constructed from a completely polymorphic value, for example the constructors for primitive patches Compose two C values together in series, e.g. 'joinGap (+>+)' or 'joinGap (:>:)' p is  forall y . exists x . p x y  In other words the caller is free to specify the right witness, and then the left witness is an existential. Note that the order of the type constructors is important for ensuring that  x  is dependent on the  y  that is supplied. p is  forall x . exists y . p x y  In other words the caller is free to specify the left witness, and then the right witness is an existential. Note that the order of the type constructors is important for ensuring that  y  is dependent on the  x  that is supplied. This is why 2 is needed, rather than writing the more obvious  (O p) which would notionally have the same quantification of the type witnesses.5 is a type level composition operator. For example,   ( p)  is equivalent to  \x ->  (p x)  is similar to ], but the type argument is universally quantified instead of being existentially quantified. The same as $ but for two parameters (wX and wY).A  type is a way of hide an existentially quantified type parameter, in this case wX, inside the type. Note that the only thing we can currently recover about the existentially quantified type wX is that it exists. Unwrap a  value Unwrap a  value)'None'+-;<=CFQSTVy} Parallel Pairs(Forking Pair (Explicit starting context)  wX wY \ / \ / \ / wU | | | wA  Joining Pairs)Forking Pairs (Implicit starting context) Reverse lists Forward listsDirected Forward PairsfilterOutFLFL p xs deletes any x in xs for which  p x == IsEq (indicating that xX has no effect as far as we are concerned, and can be safely removed from the chain)Monadic fold over an a associating to the left, i.e. from left to right. The order of arguments follows the standard foldM from base.Check that two 7s are equal element by element. This differs from the @ instance for  which uses commutation. Prepend an  to an ). This traverses only the left hand side. Append an  to an *. This traverses only the right hand side.<<11111155115555(None'+-;<=CFQSTV^"Clowns to the left of me, jokers to the right. Here I am, stuck in the middle of you" 0http://en.wikipedia.org/wiki/Stuck_in_the_MiddleSee         )None'+-;<=CFQSTV   *None'+-;<=CFQSTV+None'+-;<=CFQSTV PatchDebug is a hook class for temporarily adding debug information. To use it, add any methods that are required, implement those methods where needed, and then make it available in the relevant contexts. For example it can be temporarily added as a superclass of Patchy. The advantage of having it here already is that everything is (or should be) declared as an instance of it, so you can use defaulting or just leave out declarations of instance methods and code will still compile.RA dummy method so we can export/import PatchDebug(..) without triggering warnings,None'+-;<=CFQSTVFCommuteFn is the basis of a general framework for building up commutation operations between different patch types in a generic manner. Unfortunately type classes are not well suited to the problem because of the multiple possible routes by which the commuter for (FL p1, FL p2) can be built out of the commuter for (p1, p2) - and more complicated problems when we start building multiple constructors on top of each other. The type class resolution machinery really can't cope with selecting some route, because it doesn't know that all possible routes should be equivalent.  !"#$%&' !$ %"#&'-None'+-;<=CFQSTV%(:Commute represents things that can be (possibly) commuted.** commutes an  past an .++% commutes a RL past a single element.,,% commutes a single element past a FL.-- attempts to commute a single element past a FL. If any individual commute fails, then we return the patch that first patch that cannot be commuted past..TBuild a commuter between a patch and itself using the operation from the type class.()*+,-.(),-+*.().None'+-;<=CFQSTVa 1 split an 8 into "left" and "right" lists according to a predicate p, using commutation as necessary. If a patch does satisfy the predicate but cannot be commuted past one that does not satisfy the predicate, it goes in the "middle" list; to sum up, we have:  all p left and all (not.p) right&, while midddle is mixed. Note that p0 should be invariant under commutation (i.e. if x1 can commute to x2 then 'p x1  = p x2').2 split an  into "left" and "right" lists according to a predicate, using commutation as necessary. If a patch does satisfy the predicate but cannot be commuted past one that does not satisfy the predicate, it goes in the "left" list.88 x xs removes x from xs if x6 can be commuted to its head. Otherwise it returns  99 is like 8 except with :: ab abc returns Just c' where all the patches in abk have been commuted out of it, if possible. If this is not possible for any reason (the set of patches ab is not actually a subset of abc., or they can't be commuted out) we return  .;; is like removeSubsequenceFL except that it works on <This is a minor variant of =2 with each permutation is simply returned as a == p:>:psE returns all the permutations of the list in which one element of ps is commuted past p%Suppose we have a sequence of patches  X h a y s-t-c k#Suppose furthermore that the patch c depends on t, which in turn depends on s. This function will return qX :> h a y s t c k h :> X a y s t c k a :> X h y s t c k y :> X h a s t c k s :> X h a y t c k k :> X h a y s t c>> is like =", except that we operate on an g (in other words, we are pushing things to the end of a patch sequence instead of to the beginning).?oPartition a list into the patches that merge with the given patch and those that don't (including dependencies)1=predicate; if true we would like the patch in the "left" listinput "left", "middle" and "right"2>predicate; if true we would like the patch in the "right" listinput "left" and "right" results123456789:;<=>?@897356412<>=:;?@/darcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTVnC!Things that can always be merged.)Instances should obey the following laws:SymmetryAmerge (p :\/: q) == q' :/\: p' <=> merge (q :\/: p) == p' :/\: q' MergesCommuteFmerge (p :\/: q) == q' :/\: p' ==> commute (p :> q') == Just (q :> p'):that is, the two branches of a merge commute to each otherG#The natural, non-conflicting merge.CDEFGHICDEFGHICD0None'+-;<=CFQSTVpLSee module documentation for Darcs.Patch.Choices.PA sequence of Qes where each patch is either M, N, or O. The representation is optimized for the case where we start chosing patches from the left of the sequence: patches that are M= are commuted to the head immediately, but patches that are N or O- are mixed together; when a patch is marked OG, its dependencies are not updated until we retrieve the final result.This internal type tags a Q with a  , to distinguish N from O patches.the Q in question  = N,   = OQA patch with a R attached to it.RR mp i acts as a temporary identifier to help us keep track of patches during the selection process. These are useful for finding patches that may have moved around during patch selection (being pushed forwards or backwards as dependencies arise).)The identifier is implemented as a tuple  Label mp i. The iW is an integer, expected to be unique within the patches being scrutinised. The mp is motivated by patch splitting; it provides a convenient way to generate a new identifier from the patch being split. For example, if we split a patch identified as Label Nothing 56, the resulting sub-patches could be identified as Label (Just (Label Nothing 5))1,  Label (Just (Label Nothing 5)) 2, etc.IOW, R" is a non-empty, reversed list of  s.Internal function to tag a Q as N or O.V Create a P@ from a sequence of patches, so that all patches are initially N.W@Label a sequence of patches, maybe using the given parent label.X Create a PR from an already labelled sequence of patches, so that all patches are initially N.YLike [ but lumps together N and O- patches. This is more efficient than using [ and then catenating N and O: sections because we have to commute less. (This is what P are optimized for.)IseparateFirstFromMiddleLast c == case getChoices c of f:>m:>l -> f:>m+>+lZLike [ but lumps together M and N patches.IseparateFirstMiddleFromLast c == case getChoices c of f:>m:>l -> f+>+m:>l['Retrieve the resulting sections from a . The result is a triple first:>middle:>last, such that all patches in first are M, all patches in middle are N, and all patches in last are O.3Internal function to commute patches in the common  segment so that all O patches are behind N ones. Patches N that depend on any O are promoted to O.\Use the given monadic P transformer on the N section of a P., then fold the result back into the original P.]Given a Q* determine to which section of the given PF it belongs. This is not trivial to compute, since a patch tagged as N may be forced to actually be O3 by dependencies. We return a possibly re-ordered P, so as not to waste the commutation effort.^5Force all patches matching the given predicate to be M^, pulling any dependencies with them. This even forces any patches that were already tagged O._>Force all patches labelled with one of the given labels to be M^, pulling any dependencies with them. This even forces any patches that were already tagged O.`9Force a single patch labelled with the given label to be M^, pulling any dependencies with them. This even forces any patches that were already tagged O.a Make all N patches either M or OH. This does *not* modify any patches that are already determined to be O by dependencies.b Similar to ^% only that patches are forced to be O% regardless of their previous status.BInternal function working directly on the constituent parts of a P and taking an accumulating  to build up a new M$ section. It forces patches to be N or O, depending on the   parameter (  means O,   means Nl). It does this regardless of the previous status of patches and also pulls any dependent patches with it.c>Force all patches labelled with one of the given labels to be Oa, pulling any dependencies with them. This even forces any patches that were previously tagged M.d9Force a single patch labelled with the given label to be OK, pulling any dependencies with them, regardless of their previous status.eForce a patch with the given R to be NI, pulling any dependencies with it, regardless of their previous status.fTurn M patches into N ones and N into O ones.gTurn N patches into M and O patches into N%. Does *not* pull dependencies into M0, instead patches that cannot be commuted past O patches stay N.hSubstitute a single Q? with an equivalent list of patches, preserving its status as M, N or O-). The patch is looked up using equality of Rs.accumulator for M patches original M section original N and O sectionLMNOPQRSTUVWXYZ[\]^_`abcdefghPLMNOVX][ZY^_`bcdegfa\hQRSUWTLMNOPQR1None'+-;<=CFQSTVYtThis type exists for legacy support of on-disk format patch formats. It is a wrapper type that explicitly tracks the nesting of braces and parens in the on-disk representation of such patches. It is used as an intermediate form when reading such patches normally, and also for round-tripping such patches when checking the hash in bundles. It shouldn't be used for anything else. stuvwxyz{ tuvwzxs{ytuvw2None'+-;<=CFQSTV"~jTake a list of paragraphs and format them to the given line length, with a blank line between paragraphs.Take a list of words and split it up so that each chunk fits into the specified width when spaces are included. Any words longer than the specified width end up in a chunk of their own.!Quote a string for screen output.Format a list of s as quoted text. It deliberately refuses to use English.andClauses but rather separates the quoted strings only with a space, because this makes it usable for copy and paste e.g. as arguments to another shell command.VProduce a String composed by the elements of [String] each enclosed in double quotes. }~ }~3None'+-;<=CFQSTV%pGiven an ssh URL or file path, split it into user@host, repodir, and the file (with any _darcs/ prefix removed) %2008 David Roundy <droundy@darcs.net>GPLdarcs-devel@darcs.net experimentalportableSafe'+-;<=CFQSTV(    4Safe'+-1;<=CFQSTV+A drop-in replacement for q, which allows us to catch anything but a signal. Useful for situations where we don't want to inhibit ctrl-C.5Safe'+-;<=>?CFQSTV6lThe firstJustM returns the first Just entry in a list of monadic operations. This is close to `listToMaybe   sequence`, but the sequence operator evaluates all monadic members of the list before passing it along (i.e. sequence is strict). The firstJustM is lazy in that list member monads are only evaluated up to the point where the first Just entry is obtained.The firstJustIO is a slight modification to firstJustM: the entries in the list must be IO monad operations and the firstJustIO will silently turn any monad call that throws an exception into Nothing, basically causing it to be ignored.,Terminate the program with an error message.6None'+-;<=CFQSTVL"Identifier (key) for a connection.cA re-usable connection to a remote darcs in transfer-mode. It contains the three standard handles.Expected properties:2only ever runs once in the lifetime of the program"environment variables override alltries Putty first on Windowsfalls back to plain old sshGlobal mutable variable that contains open connections, identified by the repoid part of the ssh file name. Only one thread can use a connection at a time, which is why we stuff them behind their own s.>We distinguish between a failed connection (represented by a   entry in the map) and one that was never established (the repoid is not in the map). Once a connection fails, either when trying to establish it or during usage, it will not be tried again.tWait for an existing connection to become available or, if none is available, try to create a new one and cache it.~Try to create a new ssh connection to a remote darcs that runs the transfer-mode command. This is tried only once per repoid.cMark any connection associated with the given ssh file path as failed, so it won't be tried again.Return the command and arguments needed to run an ssh command First try the appropriate darcs environment variable and SSH_PORT defaulting to "ssh" and no specified port.remote darcs command destinationwrapper for the action7None'+-;<=CFQSTV#This is a type of "sane" file paths. These are always canonic in the sense that there are no stray slashes, no ".." components and similar. They are usually used to refer to a location within a Tree, but a relative filesystem path works just as well. These are either constructed from individual name components (using "appendPath", "catPaths" and "makeName"), or converted from a FilePath ("floatPath" -- but take care when doing that) or .This is for situations where a string (e.g. a command line argument) may take the value "-" to mean stdin or stdout (which one depends on context) instead of a normal file path.Paths which are relative to the local darcs repository and normalized. Note: These are understood not to have the dot in front._FileName is an abstract type intended to facilitate the input and output of unicode filenames.i translates whitespace in filenames to a darcs-specific format (numerical representation according to o surrounded by backslashes). Note that backslashes are also escaped since they are used in the encoding. [encodeWhite "hello there" == "hello\32\there" encodeWhite "hello\there" == "hello\92\there"B interprets the Darcs-specific "encoded" filenames produced by  decodeWhite "hello\32\there" == "hello there" decodeWhite "hello\92\there" == "hello\there" decodeWhite "hello\there" == error "malformed filename"convert a path string into a sequence of directories strings "/", "." and ".." are generally interpreted as expected. Behaviour with too many '..' is to leave them.$Examples: Splitting: "aabbIcc" -> ["aa","bb","cc"] Ignoring "." and extra "/": "aa.Ibb" -> ["aa","bb"] "aa//bb" -> ["aa","bb"] "aa9bb/" -> ["aa","bb"] Handling "..": "aa..#bb/cc" -> ["bb","cc"] "aabb....cc" -> ["cc"] "aa..bb..4cc" -> ["cc"] "../cc" -> ["..","cc"]7Make the second path relative to the first, if possible 3Ensure directory exists and is not a symbolic link.EInterpret a possibly relative path wrt the current working directory.Take an absolute path and a string representing a (possibly relative) path and combine them into an absolute path. If the second argument is already absolute, then the first argument gets ignored. This function also takes care that the result is converted to Posix convention and normalized. Also, parent directories ("..") at the front of the string argument get canceled out against trailing directory parts of the absolute path argument.Regarding the last point, someone more familiar with how these functions are used should verify that this is indeed necessary or at least useful. eConvert to posix, remove trailing slashes, and (under Posix) reduce multiple leading slashes to one.'The root directory as an absolute path.cExecute either the first or the second argument action, depending on whether the given path is an  or stdin/stdout. gNormalize the path separator to Posix style (slash, not backslash). This only affects Windows systems. HReduce multiple leading slashes to one. This only affects Posix systems.What is a malicious path?#A spoofed path is a malicious path. =Darcs only creates explicitly relative paths (beginning with "./">), so any not explicitly relative path is surely spoofed.-Darcs normalizes paths so they never contain "/../", so paths with "/../" are surely spoofed.A path to a darcs repository's meta data can modify "trusted" patches or change safety defaults in that repository, so we check for paths containing  "/_darcs/"' which is the entry to darcs meta data.To do?How about get repositories?Would it be worth adding a --semi-safe-paths option for allowing changes to certain preference files (_darcs/prefs/) in sub repositories'?Warning : this is less rigorous than isMaliciousPath but it's to allow for subpath representations that don't start with ./Construct a filter from a list of AnchoredPaths, that will accept any path that is either a parent or a child of any of the listed paths, and discard everything else.Same as  filterPath, but for ordinary  s (as opposed to AnchoredPath).Iteratively tries find first non-existing path generated by buildName, it feeds to buildName the number starting with -1. When it generates non-existing path and it isn't first, it displays the message created with buildMsg. Usually used for generation of the name like  path_ number when  path# already exist (e.g. darcs.net_0).)Transform a SubPath into an AnchoredPath.1Check whether a path is a prefix of another path.'Append an element to the end of a path.Catenate two paths together. Not very safe, but sometimes useful (e.g. when you are representing paths relative to a different point than a Tree root).&Get parent (path) of a given path. foobarbaz -> foo/bar%List all parents of a given path. foobarbaz -> [foo, foo/bar]ATake a "root" directory and an anchored path and produce a full . Moreover, you can use  anchorPath "" to get a relative .Take a relative FilePath and turn it into an AnchoredPath. The operation is (relatively) unsafe. Basically, by using floatPath, you are testifying that the argument is a path relative to some common root -- i.e. the root of the associated Tree' object. Also, there are certain invariants about AnchoredPath that this function tries hard to preserve, but probably cannot guarantee (i.e. this is a best-effort thing). You should sanitize any FilePaths before you declare them "good" by converting into AnchoredPath (using this function).Take a prefix path, the changed prefix path, and a path to change. Assumes the prefix path is a valid prefix. If prefix is wrong return AnchoredPath [].4Append a String to the last Name of an AnchoredPath.>>  8None'+-;<=>?CFQSTV-Given  pred tree , produce a  that only has items for which pred returns True\. The tree might contain stubs. When expanded, these will be subject to filtering as well.Abstraction of a filesystem tree. Please note that the Tree returned by the respective read operations will have TreeStub items in it. To obtain a Tree without such stubs, call expand on it, eg.: (tree <- readDarcsPristine "." >>= expandWhen a Tree is expanded, it becomes "final". All stubs are forced and the Tree can be traversed purely. Access to actual file contents stays in IO though.A Tree may have a Hash associated with it. A pair of Tree's is identical whenever their hashes are (the reverse need not hold, since not all Trees come equipped with a hash).Get hash of a Tree. This is guaranteed to uniquely identify the Tree (including any blob content), as far as cryptographic hashes are concerned. Sha256 is recommended.!)Get a hash of a TreeItem. May be Nothing.) Look up a % item (an immediate subtree or blob).*Find a  by its path. Gives   if the path is invalid.+Find a  by its path. Gives  6 if the path is invalid, or does not point to a Blob.,Find a  by its path. Gives  6 if the path is invalid, or does not point to a Tree.-List all contents of a ./Expand a stubbed Tree into a one with no stubs in it. You might want to filter the tree before expanding to save IO. This is the basic implementation, which may be overriden by some Tree instances (this is especially true of the Index case).0Unfold a path in a (stubbed) Tree, such that the leaf node of the path is reachable without crossing any stubs. Moreover, the leaf ought not be a Stub in the resulting Tree. A non-existent path is expanded as far as it can be.1Check the disk version of a Tree: expands it, and checks each hash. Returns either the expanded tree or a list of AnchoredPaths where there are problems. The first argument is the hashing function used to create the tree.2Given two Trees, a guide and a tree., produces a new Tree that is a identical to tree5, but only has those items that are present in both tree and guide. The guide Tree may not contain any stubs.3ORead a Blob into a Lazy ByteString. Might be backed by an mmap, use with care.4For every pair of corresponding blobs from the two supplied trees, evaluate the supplied function and accumulate the results in a list. Hint: to get IO actions through, just use sequence on the resulting list. NB. This won't expand any stubs.5'For each file in each of the two supplied trees, evaluate the supplied function (supplying the corresponding file from the other tree, or Nothing) and accumulate the results in a list. Hint: to get IO actions through, just use sequence on the resulting list. NB. This won't expand any stubs.Helper function for taking the union of AnchoredPath lists that are already sorted. This function does not check the precondition so use it carefully.7Cautiously extracts differing subtrees from a pair of Trees. It will never do any unneccessary expanding. Tree hashes are used to cut the comparison as high up the Tree branches as possible. The result is a pair of trees that do not share any identical subtrees. They are derived from the first and second parameters respectively and they are always fully expanded. It might be advantageous to feed the result into 5 or 6.8:Modify a Tree (by replacing, or removing or adding items).:Does not expand the tree.;Does not expand the tree.<Lay one tree over another. The resulting Tree will look like the base (1st parameter) Tree, although any items also present in the overlay Tree will be taken from the overlay. It is not allowed to overlay a different kind of an object, nor it is allowed for the overlay to add new objects to base. This means that the overlay Tree should be a subset of the base Tree (although any extraneous items will be ignored by the implementation)./ !"#$%&'()*+,-./0123456789:;<=1'(#$%&./01- )*+,!"4567328:;9<=9None'+-;<=CFQSTV \ C~Change content of a file at a given path. The change will be eventually flushed to disk, but might be buffered for some time.K=Grab content of a file in the current Tree at the given path.LBCheck for existence of a node (file or directory, doesn't matter).M#Check for existence of a directory.NCheck for existence of a file.PA O) monad. A sort of like IO but it keeps a Q] around as well, which is a sort of virtual filesystem. Depending on how you obtained your Oc, the actions in your virtual filesystem get somehow reflected in the actual real filesystem. For V4, nothing happens in real filesystem, however with  plainTreeIO?, the plain tree will be updated every now and then, and with  hashedTreeIO- a darcs-style hashed tree will get updated.QInternal state of the Or monad. Keeps track of the current Tree content, unsync'd changes and a current working directory (of the monad).UcRun a TreeIO action without storing any changes. This is useful for running monadic tree mutations for obtaining the resulting Tree (as opposed to their effect of writing a modified tree to disk). The actions can do both read and write -- reads are passed through to the actual filesystem, but the writes are held in memory in a form of modified Tree.Modifies an item in the current Tree. This action keeps an account of the modified data, in changed and changesize, for subsequent flush operations. Any modifications (as in "modifyTree") are allowed.WReplace an item with a new version without modifying the content of the tree. This does not do any change tracking. Ought to be only used from a sync implementation for a particular storage format. The presumed use-case is that an existing in-memory Blob is replaced with a one referring to an on-disk file.:If buffers are becoming large, sync, otherwise do nothing.BEGFDCHIJLMNKOPQRSTUVWXYZ%VUKCDFGENMLJIRQRPOTSWXZYHIJKLMNBCDEFGBCDEFGHIJKLMNQR !":None'+-;<=CFQSTV^run a list of _s. In some monads (typically IO-based ones), the progress and error messages will be used. In others they will be ignored and just the actions will be run._a monadic action, annotated with a progress message that could be printed out while running the action, and a message that could be printed out on error. Actually printing out these messages is optional to allow non-IO monads to just run the action.drun a list of _s without any feedback messages]^_`abcd]^_`abcd]^_`abc;None'+-;<=CFQSTV#Ai@Compute a darcs-compatible hash value for a tree-like structure.lCRead and parse a darcs-style hashed directory listing from a given dir and with a given hash.#Read in a darcs-style hashed tree. This is mainly useful for reading "pristine.hashed". You need to provide the root hash you are interested in (found in _darcs/hashed_inventory).o1Write a Tree into a darcs-style hashed directory.$Create a hashed file from a  and content. In case the file exists it is kept untouched and is assumed to have the right content. XXX Corrupt files should be probably renamed out of the way automatically or something (probably when they are being read though).pRun a O action in a hashed setting. The initial1 tree is assumed to be fully available from the  directoryk, and any changes will be written out to same. Please note that actual filesystem files are never removed.pactioninitial directory fghijklmnop moplnkhifgjNone'+-;<=CFQSTV+uosxCacheDir assumes ~LibraryCaches/ exists.vBxdgCacheDir returns the $XDG_CACHE_HOME environment variable, or ~/.cache3 if undefined. See the FreeDesktop specification: Fhttp://standards.freedesktop.org/basedir-spec/basedir-spec-latest.htmlwMgetRecursiveContents returns all files under topdir that aren't directories.xgetRecursiveContentsFullPath returns all files under topdir that aren't directories. Unlike getRecursiveContents this function returns the full path. qrstuvwx rqstvuwx<None'+-;<=CFQSTV.z Write out fulla tree to a plain directory structure. If you instead want to make incremental updates, refer to Darcs.Util.Tree.Monad.yzyz=None'+-;<=>?CFQSTVY%1nextF is the position of the next item, in bytes.&resitemF is the item extracted.'s_fileIDs contains the fileids of the files and folders inside, in a folder item and its own fileid for file item).(@marks if the item has changed since the last update to the index)0next is the position of the next item, in bytes.*{treeitem is Nothing in case of the item doesn't exist in the tree or is filtered by a FilterTree. Or a TreeItem otherwise.+resitem is the item extracted.,Description of a a single indexed item. The structure itself does not contain any data, just pointers to the underlying mmap (bytestring is a pointer + offset + length).gThe structure is recursive-ish (as opposed to flat-ish structure, which is used by git...) It turns out that it's hard to efficiently read a flat index with our internal data structures -- we need to turn the flat index into a recursive Tree object, which is rather expensive... As a bonus, we can also efficiently implement subtree queries this way (cf. ~).-Lay out the basic index item structure in memory. The memory location is given by a ForeignPointer () and an offset. The path and type given are written out, and a corresponding Item is given back. The remaining bits of the item can be filled out using update..=Read the on-disk representation into internal data structure.See the module-level section  Index format- for details on how the index is structured./kUpdate an existing item with new hash and optionally mtime (give Nothing when updating directory entries).0Gives a ForeignPtr to mmapped index, which can be used for reading and updates. The req_size parameter, if non-0, expresses the requested size of the index file. mmapIndex will grow the index if it is smaller than this.}kReturn a list containing all the file/folder names in an index, with their respective ItemType and FileID.~Read an index and build up a  object from it, referring to current working directory. The initial Index object returned by readIndex is not directly useful. However, you can use C on it. Either way, to obtain the actual Tree object, call update.The usual use pattern is this: Hdo (idx, update) <- readIndex tree <- update =<< filter predicate idx*The resulting tree will be fully expanded.8Will add and remove files in index to make it match the ' object given (it is an error for the c to contain a file or directory that does not exist in a plain form in current working directory).Check that a given file is an index file with a format we can handle. You should remove and re-create the index whenever this is not true.SFor a given file or folder path, get the corresponding fileID from the filesystem. {|}~ ~|}{12%&'34()*+56789:;<=>?@,ABC>None'+-;<=CFQSTV[?None'+-;<=CFQSTV]The Z type is a list of all flags that can ever be passed to darcs, or to one of its commands.A% +B/=9K     !"#$&'()*,-.012345678:;<>?@CDEFGHIJL      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL@None"#'+-;<=CFQSTVO@The raw material from which multi-valued options are built. See ^.DA V) that requires a single argument of type a and handles flags of type f.UThis is V& instantiated with 'DarcsOptDescr and W.VWe do not instantiate the d in W d f directly with E%. Instead we (post-) compose it with (->) +. Modulo newtype noise, this is the same as  type 'DarcsOptDescr f = E ( -> f)This is so we can pass a directory relative to which an option argument is interpreted (if it has the form of a relative path).WqThis type synonym is here for brevity and because we want to import the data constructors (but not the type) of  qualified.X.Construct an 'DarcsOptDescr with no arguments.Y#Construct an 'DarcsOptDescr with a  argument.Z-Construct an 'DarcsOptDescr with an optional  argument.[$Construct an 'DarcsOptDescr with an  argument.\$Construct an 'DarcsOptDescr with an  argument.]-Construct an 'DarcsOptDescr with an optional  argument.FNGet the long switch names from a raw option. Used to construct error messages.GGiven a list of O*, find all flags that match a given value.HGiven a list of Oc, find all values that match a given flag list in the order in which they appear in the flag list.I?The first element of a list, or a default if the list is empty.JLAppend " [DEFAULT" to the help text of options that match the default value.^ Construct a U$ from a default value and a list of O.HPrecondition: the list must have an entry for each possible value (type v)._ Construct a  S valued option with a single flag that takes no arguments and has no default flag.JThe arguments are: short switches, long switches, flag value, help string.` Construct a   0 valued option with a single flag that takes a " argument and has no default flag.eThe arguments are: short switches, long switches, flag constructor, single flag parser, help string.a Construct a   1 valued option with a single flag that takes an " argument and has no default flag.eThe arguments are: short switches, long switches, flag constructor, single flag parser, help string.b Similar to `c, except that the flag can be given more than once. The flag arguments are collected in a list of s.c Similar to b., except that the flag arguments are optional.d Similar to ac, except that the flag can be given more than once. The flag arguments are collected in a list of s.K^A multi-arg option, defined in terms of a single-arg option, returning a list of single args.The parameters are: single argument description, short switches, long switches, flag constructor, flag list parser, arg name string, help string.eeA deprecated option. If you want to deprecate only some flags and not the whole option, extract the Os out of the original option and create a new deprecated option. The strings in the first argument are appended to the automatically generated error message in case additional hints should be provided.OPQRSTUVWXYZ[\]^_`abcdeWUVXYZ[\]OPQRST^_`bcadeOPQRSTANone'+-;<=CFQSTVRggBNone'+-;<=CFQSTV hijkijkhCNone'+-;<=CFQSTV lmnopqrstu pqrstulmnolmnopqrstuDNone'+-;<=CFQSTV$zFThis class is used to decode patches from their binary representation.z{|}~z{}|~z{ENone'+-;<=CFQSTV$#An object is located by giving the  of the parent  and a .FNone'+-3;<=CFQSTV&This is used to track changes to filesThis is an invalid patch e.g. there is a patch 'Move Autoconf.lhs Autoconf.lhs.in' where there is no Autoconf.lhs in the darcs repolthis is used for duplicate patches that don't have any effect, but we still want to keep track of themUThe PatchId identifies a patch and can be created from a PatchInfo with makePatchnameThe FileId for a file consists of the FilePath (creation name) and an index. The index denotes how many files with the same name have been added before (and subsequently deleted or moved)Convert FileId to stringGNone'+-;<=>?CFQSTVL-trackOrigRename takes an old and new name and attempts to apply the mapping to the OrigFileNameOf pair. If the old name is the most up-to-date name of the file in question, the first element of the OFNO will match, otherwise if the up-to-date name was originally old, the second element will match.withFileNames takes a maybe list of existing rename-pairs, a list of filenames and an action, and returns the resulting triple of affected files, updated filename list and new rename details. If the rename-pairs are not present, a new list is generated from the filesnames. H2002-2005 David RoundyGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=>?CFQSTVApply a patch to a , yielding a new .Attempts to apply a given replace patch to a Tree. If the apply fails (if the file the patch applies to already contains the target token), we return Nothing, otherwise we return the updated Tree.INone'+-;<=CFQSTVJNone'+-;<=CFQSTVvshowContextPatch is used to add context to a patch, as diff -u does. Thus, it differs from showPatch only for hunks. It is used for instance before putting it into a bundle. As this unified context is not included in patch representation, this requires access to the tree. Format a  to a  according to the given .NOTE: This is not only used for display but also to format patch files. This is why we have to do the white space encoding here. See ."Besides white space encoding, for  we just pack it into a . For  we must emulate the non-standard darcs-1 encoding of file paths: it is an UTF8 encoding of the raw byte stream, interpreted as code points. See also J.KNone'+-;<=CFQSTV!A PatchInfo value contains the metadata of a patch. The date, name, author and log fields are UTF-8 encoded text in darcs 2.4 and later, and just sequences of bytes (decoded with whatever is the locale when displayed) in earlier darcs.'The members with names that start with '_'_ are not supposed to be used directly in code that does not care how the patch info is stored.M:The isAscii limitation is due to the use of BC.pack below. patchinfo date name author log constructs a new  value with the given details, automatically assigning an Ignore-this header to guarantee the patch is unique. The function does not verify the date string's sanity. NaddJunk adds a line that contains a random number to make the patch unique. DGet the name, including an "UNDO: " prefix if the patch is inverted. Returns the author of a patch.&Returns the name of the patch. Unlike  H, it does not preprend "UNDO: " to the name if the patch is inverted.Returns the author of a patch.NRead the date from raw patch (meta) data and convert it to UTC. The raw data may contain timezone info. This is for compatibiltity with patches that were created before 2003-11, when darcs still created patches that contained localized date strings.Get the log message of a patch..Get the tag name, if the patch is a tag patch.OConvert a metadata ByteString to a string. It first tries to convert using UTF-8, and if that fails, tries the locale encoding. We try UTF-8 first because UTF-8 is clearly recognizable, widely used, and people may have UTF-8 patches even when UTF-8 is not their locale.Hash on patch metadata (patch name, author, date, log, and "inverted" flag. Robust against context changes but does not garantee patch contents. Usually used as matcher or patch identifier (see Darcs.Patch.Match).P(Patch is stored between square brackets. [ <patch name> <patch author>*<patch date> <patch log (may be empty)> (indented one) <can have multiple lines in patch log,> <as long as they're preceded by a space> <and don't end with a square bracket.> ]=note that below I assume the name has no newline in it. See X for the inverse operation. There are more assumptions, see validation functions above. Parser for > as stored in patch bundles and inventory files, for example: [Document the foo interface John Doe <john.doe@example.com>**20110615084241 Ignore-this: 85b94f67d377c4ab671101266ef9c229 Nobody knows what a 'foo' is, so describe it. ]See  for the inverse operation.$     $     LNone'+-;<=CFQSTV"#$%&$%"#&"#$%MNone'+-;<=CFQSTV''NNone'+-;<=CFQSTV... is implemented by single patches that can be repaired (Prim, Patch, RepoPatchV2) There is a default so that patch types with no current legacy problems don't need to have an implementation.00 and .p deal with repairing old patches that were were written out due to bugs or that we no longer wish to support. 0_ is implemented by collections of patches (FL, Named, PatchInfoAnd) that might need repairing../0123401./423./0123ONone'+-;<=CFQSTV&BtryToShrink ps simplifies ps> by getting rid of self-cancellations or coalescing patchesQuestion (Eric Kow): what properties should this have? For example, the prim1 implementation only gets rid of the first self-cancellation it finds (as far as I can tell). Is that OK? Can we try harder?CtryShrinkingInverse ps deletes the first subsequence of primitive patches that is followed by the inverse subsequence, if one exists. If not, it returns NothingDD ps coalesces as many patches in ps< as possible, sorting the results in some standard order.EIt can sometimes be handy to have a canonical representation of a given patch. We achieve this by defining a canonical form for each patch type, and a function E which takes a patch and puts it into canonical form. This routine is used by the diff function to create an optimal patch (based on an LCS algorithm) from a simple hunk describing the old and new version of a file.FF ps puts a sequence of primitive patches into canonical form. Even if the patches are just hunk patches, this is not necessarily the same set of results as you would get if you applied the sequence to a specific tree and recalculated a diff.Note that this process does not preserve the commutation behaviour of the patches and is therefore not appropriate for use when working with already recorded patches (unless doing amend-record or the like).hkThis class describes the abstract interface to primitive patches that is indepenent of the on-disk format.189:;<=>?@AEDBFCGHQMJILKOPNRSTUZ]\W^VXY[_`abcdefgh1HIJKLMNOPQRSABCDEFGTUVWXYZ[\]^?@<=>:;89gefcd_`abh 89:;<=>?@ABCDEFGH IJKLMNOPQRST UVWXYZ[\]^_`abcdefPNone'+-;<=CFQSTV}} p1 p25 is used to provide an arbitrary ordering between p1 and p21. Basically, identical patches are equal and Move < DP < FP < ChangePrefF. Everything else is compared in dictionary order of its arguments.nopqvtrsuwzxy{|}wxyz{nopqrstuv|}nopqrstuvwxyz{QNone'+-;<=CFQSTVZQModify a binary file ;binary FILENAME oldhex *HEXHEXHEX ... newhex *HEXHEXHEX ...RNone'+-;<=CFQSTV SNone%'+-;<=CFQSTVTNone'+-;<=CFQSTVz  UNone'+-;<=CFQSTV6RR p1 :> p2 tries to combine p1 and p27 into a single patch without intermediary changes. For example, two hunk patches modifying adjacent lines can be coalesced into a bigger hunk patch. Or a patch which moves file A to file B can be coalesced with a patch that moves file B into file C, yielding a patch that moves file A to file C.S shrinkABit ps tries to simplify psI by one patch, the first one we find that coalesces with its neighbourTtryOne acc p ps pushes p as far down psh as we can go until we can either coalesce it with something or it can't go any further. Returns Just2 if we manage to get any coalescing out of thisUThe heart of "sortCoalesceFL"VV new ps is almost like  new :>: psB except as an alternative to consing, we first try to coalesce new with the head of ps=. If this fails, we try again, using commutation to push new9 down the list until we find a place where either (a) new is LT the next member of the list  bsee 'comparePrim'u commutation fails or (c) coalescing succeeds. The basic principle is to coalesce if we can and cons otherwise.As an additional optimization, pushCoalescePatch outputs a Left value if it wasn't able to shrink the patch sequence at all, and a Right value if it was indeed able to shrink the patch sequence. This avoids the O(N) calls to lengthFL that were in the older code.Also note that pushCoalescePatch is only ever used (and should only ever be used) as an internal function in in sortCoalesceFL2.WXYZVNone'+-;<=CFQSTV7WNone'+-;<=CFQSTV8>wwXNone'+-0;<=CFQSTV9YNone%'+-;<=CFQSTV:ZNone'+-;<=CFQSTV;9[None'+-;<=CFQSTV;\None'+-;<=CFQSTV<None'+-;<=CFQSTV=I*9:;<=>@AEDBFCGHQMJILKOPNRS^W]\ZU_`abcdefgh*UZ\]W^@9:;<=>cd_`abgefHIJKLMNOPQRSABCDEFGh]None'+-0;<=CFKQSTVBThe format of a merger is ,Merger undos unwindings conflicting original.undos = the effect of the merger unwindings = TODO: eh? conflicting = the patch we conflict withoriginal = the patch we really are^None'+-;<=CFQSTVC_None%'+-;<=CFQSTVZA splitter is something that can take a patch and (possibly) render it as text in some format of its own choosing. This text can then be presented to the user for editing, and the result given to the splitter for parsing. If the parse succeeds, the result is a list of patches that could replace the original patch in any context. Typically this list will contain the changed version of the patch, along with fixup pieces to ensure that the overall effect of the list is the same as the original patch. The individual elements of the list can then be offered separately to the user, allowing them to accept some and reject others.There's no immediate application for a splitter for anything other than Prim (you shouldn't go editing named patches, you'll break them!) However you might want to compose splitters for FilePatchType to make splitters for Prim etc, and the generality doesn't cost anything.This generic splitter just lets the user edit the printed representation of the patch. Should not be used expect for testing and experimentation.Never splits. In other code we normally pass around Maybe Splitter instead of using this as the default, because it saves clients that don't care about splitting from having to import this module just to get noSplitter.Split a primitive hunk patch up by allowing the user to edit both the before and after lines, then insert fixup patches to clean up the mess.`None'+-;<=CFQSTV^(WPatches whose concrete effect which can be expressed as a list of primitive patches.(A minimal definition would be either of effect or effectRL.aNone'+-;<=CFQSTV[abstract over  'FL'/'RL'FNonable represents the class of patches that can be turned into a Non.A  stores a context with a PrimJ patch. It is a patch whose effect isn't visible - a Non-affecting patch.OunNon converts a Non into a FL of its context followed by the primitive patch.3showNons creates a Doc representing a list of Nons.)showNon creates a Doc representing a Non.:readNons is a parser that attempts to read a list of Nons.7readNon is a parser that attempts to read a single Non. x cy tries to commute x past cy" and always returns some variant cy'. If commutation suceeds, the variant is just straightforwardly the commuted version. If commutation fails, the variant consists of x prepended to the context of cy. xs cy commutes as many patches of xs past cyT as possible, adding any that don't commute to the context of cy. Suppose we have x1 x2 x3 [c1 c2 y]and that in our example x1 fails to commute past c1&, this function would commute down to x1 [c1'' c2'' y''] x2' x3' and return [x1 c1'' c2'' y'']TcommutePrimsOrAddToCtx takes a WL of prims and attempts to commute them past a Non.gcommuteOrRemFromCtx attempts to remove a given patch from a Non. If the patch was not in the Non, then the commute will succeed and the modified Non will be returned. If the commute fails then the patch is either in the Non context, or the Non patch itself; we attempt to remove the patch from the context and then return the non with the updated context.TODO: understand if there is any case where p is equal to the prim patch of the Non, in which case, we return the original Non, is that right?~commuteOrRemFromCtxFL attempts to remove a FL of patches from a Non, returning Nothing if any of the individual removes fail.@(*>) attemts to modify a Non by commuting it past a given patch.B(>*) attempts to modify a Non, by commuting a given patch past it.J(*>>) attempts to modify a Non by commuting it past a given WL of patches.J(>>*) attempts to modify a Non by commuting a given WL of patches past it.VNons are equal if their context patches are equal, and they have an equal prim patch.[\]bNone'+-;<=CFQSTVcNone%'+-;<=CFQSTVY If   x :> y succeeds, we know that that x commutes past yO without any conflicts. This function is useful for patch types for which commute is defined to always succeed; so we need some way to pick out the specific cases where commutation succeeds without any conflicts.                 dNone'+-;<=CFQSTVG^^! attempts to commute two patches p1 and p2, in their original order, with the given commute function. If the commute function doesn't know how to handle the patches (i.e. it returns Unknown as a result), then we try again with  invert p2 and  invert p1( (inverting the results, if succesful).^TODO: when can the first attempt fail, but the second not? What's so clever in this function?_|If we have two Filepatches which modify different files, we can return a result early, since the patches trivially commute.`EAttempt to commute two patches, the first of which is a Merger patch.acactualMerge attempts to perform a merge; if successful, it returns the "right" branch of the mergeTTODO: why does this code throw away the other branch, only for merge to rebuild it?}merger takes two patches, (which have been determined to conflict) and constructs a Merger patch to represent the conflict. p1' is considered to be conflicting with p2 (p1d is the "first" patch in the repo ordering), the resulting Merger is therefore a representation of p2.DDbcdeeNone'+-;<=CFQSTV(fNone'+-;<=CFQSTVf5High-level representation of a piece of patch summary./010./1fggNone'+-;<=CFQSTV44hNone'+-;<=>?CFQSTVe::hijiNone'+-;<=CFQSTVRjNone'+-;<=CFQSTVqGThe Named6 type adds a patch info about a patch, that is a name.NamedP info deps p represents patch p with name info. depsz is a list of dependencies added at the named patch level, compared with the unnamed level (ie, dependencies added with darcs record --ask-deps).GHIJKLMNOPQRSTUGHKLIJMNOPQRSTUklmGHkNone'+-;<=CFQSTVXlA l encapsulates the concept of the name of a patch, without any contents. This allows us to track explicit dependencies in the rebase state, changing them to follow uses of amend-record or unsuspend on a depended-on patch, and warning the user if any are lost entirely.pqCommute a name patch and a primitive patch. They trivially commute so this just involves changing the witnesses.qqCommute a primitive patch and a name patch. They trivially commute so this just involves changing the witnesses.ruCommute a name patch and a named patch. In most cases this is trivial but we do need to check explicit dependencies.suCommute a named patch and a name patch. In most cases this is trivial but we do need to check explicit dependencies. lmnopqrst lmnopqrstlmnolNone'+-;<=CFQSTV!{A single rebase fixup, needed to ensure that the actual patches being stored in the rebase state have the correct context./Split a sequence of fixups into names and primsmNone'+-;<=CFQSTVƛA single item in the rebase state consists of either a patch that is being edited, or a fixup that adjusts the context so that a subsequent patch that is being edited "makes sense".ToEdit/ holds a patch that is being edited. The name ( PatchInfo;) of the patch will typically be the name the patch had before it was added to the rebase state; if it is moved back into the repository it must be given a fresh name to account for the fact that it will not necessarily have the same dependencies as the original patch. This is typically done by changing the  Ignore-This junk.Fixup* adjusts the context so that a subsequent ToEdit$ patch is correct. Where possible, Fixup changes are commuted as far as possible into the rebase state, so any remaining ones will typically cause a conflict when the ToEdit* patch is moved back into the repository.Given a list of rebase items, try to push a new fixup as far as possible into the list as possible, using both commutation and coalescing. If the fixup commutes past all the % patches then it is dropped entirely.Like  but for a list of fixups.nNone'+-0;<=CFQSTV'eA patch that lives in a repository where a rebase is in progress. Such a repository will consist of Normal! patches along with exactly one  Suspended patch.(Most rebase operations will require the  Suspended+ patch to be at the end of the repository.NormalP represents a normal patch within a respository where a rebase is in progress. Normal p. is given the same on-disk representation as pa, so a repository can be switched into and out of rebasing mode simply by adding or removing a  Suspended/ patch and setting the appropriate format flag. The single  Suspended9 patch contains the entire rebase state, in the form of s.*Note that the witnesses are such that the  Suspended patch has no effect on the context of the rest of the repository; in a sense the patches within it are dangling off to one side from the main repository.(See Note [Rebase representation] in the U for a discussion of the design choice to embed the rebase state in a single patch.3add fixups for the name and effect of a patch to a Tremove fixups (actually, add their inverse) for the name and effect of a patch to a nopqoNone'+-0;<=CFQSTV A layer inbetween the 'Named p' type and 'PatchInfoAnd p' design for holding "internal" patches such as the rebase container. Ideally these patches would be stored at the repository level but this would require some significant refactoring/cleaning up of that code.lift a function over an  of patches to one over a 'WrappedNamed rt'. The function is only applied to "normal" patches, and any rebase container patch is left alone.;Return a list of the underlying patches that are actually active: in the repository, i.e. not suspended as part of a rebase Is the given  patch an internal implementation detail that shouldn't be visible in the UI or included in tags/matchers etc? Two-level checker for efficiency: if the value of this is  w for a given patch type then there's no need to inspect patches of this type at all, as none of them can be internal. Is the given o patch an internal implementation detail that shouldn't be visible in the UI or included in tags/matchers etc?6If the patch might be a rebase container patch, then p and q must be the same type, as no transformation is applied. This function provides a witness to this requirement: if 'RebaseTypeOf rt' might be 1/, then it must be able to return a proof that p and q* are equal. If 'RebaseTypeOf rt' must be 2=, then this function can never be called with a valid value.rstuvpNone'+-;<=CFQSTVi  wA wBD represents the info of a patch, marked with the patch's witnesses. p wA wBu represents a hope we have to get a patch through its info. We're not sure we have the patch, but we know its info.SimpleHopefully is a variant of  Either String adapted for type witnesses. Actually is the equivalent of Right , while  Unavailable is Left. p C (x y) is  String (p C (x y))* in a form adapted to darcs patches. The C (x y)F represents the type witness for the patch that should be there. The  HopefullyH type just tells whether we expect the patch to be hashed or not, and " does the real work of emulating .  Hopefully sh- represents an expected unhashed patch, and Hashed hash sh3 represents an expected hashed patch with its hash. i p1 creates a PatchInfoAnd containing p with info i.n2pia' creates a PatchInfoAnd representing a Named patch. hp tries to get a patch from a  value. If it fails, it outputs an error "failed to read patch: <description of the patch>". We get the description of the patch from the info part of hp er hp! tries to extract a patch from a 7. If it fails, it applies the error handling function er2 to a description of the patch info component of hp. hopefullyM is a version of  hopefully which calls fail! in a monad instead of erroring.wqNone'+-0;<=CFQSTVA  is a single chunk of a  . It has a  representing a clean tag, the hash of the previous inventory (if it exists), and the list of patches since that previous inventory.The patches in a repository are stored in chunks broken up at "clean" tags. A tag is clean if the only patches before it in the current repository ordering are ones that the tag depends on (either directly or indirectly). Each chunk is stored in a separate inventory file on disk.A  represents a repo's history as the list of patches since the last clean tag, and then a list of patch lists each delimited by clean tags.; is a type used to represent the initial context of a repo. takes a # and returns an equivalent, linear  of patches. takes a # and returns an equivalent, linear  of patches. takes a  and a X of patches that "follow" the PatchSet, and concatenates the patches into the PatchSet. Runs a progress action for each tag and patch in a given PatchSet, using the passed progress message. Does not alter the PatchSet.!!> returns the PatchInfos corresponding to the tags of a given .  !"  !"rNone'+-;<=CFQSTV&r)Given the repository contents, get the rebase container patch, and its contents. The rebase patch can be anywhere in the repository and is returned without being commuted to the end.*Given the repository contents, get the rebase container patch, its contents, and the rest of the repository contents. The rebase patch can be anywhere in the repository and is returned without being commuted to the end.+Remove the rebase patch from a .x Remove the rebase patch from an  of patches.,Given the repository contents, get the rebase container patch, its contents, and the rest of the repository contents. The rebase patch must be at the head of the repository.ySame as , but for an  of patches.-Same as , but for an  of patches.)*+,-,-)*+sNone'+-;<=CFQSTV*. Evaluate an  list and report progress./ Evaluate an  list and report progress.0 Evaluate an w list and report progress. In addition to printing the number of patches we got, show the name of the last tag we got../0/.0tNone'+-;<=CFQSTV+11uNone'+-;<=CFQSTVF5 3A patch, together with a list of patch names that it used to depend on, but were lost during the rebasing process. The UI can use this information to report them to the user.7Used for displaying during 'rebase changes'. 'Named (RebaseChange p)' is very similar to 'RebaseSelect p' but slight mismatches (G embeds an 1) makes it not completely trivial to merge them.:Encapsulate a single patch in the rebase state together with its fixups. Used during interactive selection to make sure that each item presented to the user corresponds to a patch.=Get hold of the  patch inside a :.>\Turn a list of items back from the format used for interactive selection into a normal list?Turn a list of rebase items being rebased into a list suitable for use by interactive selection. Each actual patch being rebased is grouped together with any fixups needed.AhSplit a list of rebase patches into those that will have conflicts if unsuspended and those that won't.zpushThrough (ps :> (qs :> te)) tries to commute as much of ps as possible through both qs and te , giving %psStuck :> (qs' :> te') :> psCommuted,. Anything that can be commuted ends up in  psCommuted" and anything that can't goes in psStuck.{Forcibly commute a lV with a patch, dropping any dependencies if necessary and recording them in the patchCTurn a selected rebase patch back into a patch we can apply to the main repository, together with residual fixups that need to go back into the rebase state (unless the rebase is now finished). Any fixups associated with the patch will turn into conflicts.DLike C5, but any fixups are "reified" into a separate patch.23456789:;<=>?@ABCD:;<?>CDA=34562B789@3456|}~789:;<vNone'+-;<=>?CFKQSTVHlApply a patch to set of s, yielding the new set of s and sjkljlkwNone'+-;<=CFQSTVIssx2010 Petr RockaiMITdarcs-devel@darcs.net experimentalportableNone'+-;<=>?CFQSTVK{tuvwxyzwxzyvtutuyNone'+-;<=CFQSTVnZ  xs ys cs0' represents two sequences of patches that have cs in common, in other words  xs +<+ cs and  ys +<+ cs cs xs ys/ represents two sequences of patches that have cs in common, in other words  cs +>+ xs and  cs +>+ yst is used to represents prim patches that are duplicates of, or conflict with, another prim patch in the repository. Normal prim: A primitive patch Duplicate x!: This patch has no effect since x' is already present in the repository. !Etacilpud x: invert (Duplicate x)Conflictor ix xx x: ix0 is the set of patches: * that conflict with xq and also conflict with another patch in the repository. * that conflict with a patch that conflict with xxx6 is the sequence of patches that conflict *only* with xx$ is the original, conflicting patch.ix and x are stored as Nona objects, which include any necessary context to uniquely define the patch that is referred to.YThe intuition is that a Conflictor should have the effect of inverting any patches that x conflicts with, that haven't already been undone by another Conflictor in the repository. Therefore, the effect of a Conflictor is  invert xx.InvConflictor ix xx x: like invert (Conflictor ix xx x) p is True if p is either a  or  patch. p is True if p is either an  or .\ is used when converting from Darcs V1 patches (Mergers) to Darcs V2 patches (Conflictors).mergeAfterConflicting3 takes as input a sequence of conflicting patches xxxG (which therefore have no effect) and a sequence of primitive patches yyyz that follow said sequence of conflicting patches, and may depend upon some of the conflicting patches (as a resolution).If xs consists only of  patches,  xs returns Just pxs those patches (so lengthFL pxs == lengthFL xs). Otherwise, it returns  .<This is used for unit-testing and for internal sanity checks xs ys> returns the set of patches that can be commuted out of both xs and ys& along with the remnants of both lists xs ys@ returns the set of patches that can be commuted out of both xs and ys& along with the remnants of both lists  zNone'+-0;<=CFKQSTVo{None'+-0;<=CFKQSTVp|None'+-;<=CFQSTVq_}None'+-;<=CFQSTVr~None'+-;<=CFQSTVrNone'+-;<=CFQSTVswNone'+-;<=CFQSTVt/None'+-;<=CFQSTVtH&)L)+,-D|}3BDENQPOMKLIJW\]ZU`dfg/01GIJKLMNOPG)&Gd`JILKMOPIJQKNUZ]D)Lg\W,-+}|EDBOPN01/LM3None'+-;<=CFQSTV $S(ealed) Patch and his dependencies.Searchs dependencies in repoFL of the patches in  getDepsFL.taggedIntersection takes two s and splits them into a common intersection portion and two sets of patches. The intersection, however, is only lazily determined, so there is no guarantee that all intersecting patches will be included in the intersection `. This is a pretty efficient function, because it makes use of the already-broken-up nature of s.Note that the first argument to taggedIntersection should be the repository that is more cheaply accessed (i.e. local), as taggedIntersection does its best to reduce the number of inventories that are accessed from its rightmost argument. takes a tag's , t0, and a  and attempts to find t0 in one of the s in the PatchSet. If the tag is found, the PatchSet is split up, on that tag, such that all later patches are in the "since last tag" patch list. If the tag is not found,   is returned.splitOnTag takes a tag's , and a , and attempts to find the tag in the PatchSet, returning a pair: the clean PatchSet "up to" the tag, and a RL of patches after the tag; If the tag is not in the PatchSet, we return Nothing.h unfolds a single Tagged object in a PatchSet, adding the tag and patches to the PatchSet's patch list.getUncovered ps returns the  for all the patches in ps that are not depended on by anything else *through explicit dependencies*. Tags are a likely candidate, although we may also find some non-tag patches in this list.Keep in mind that in a typical repository with a lot of tags, only a small fraction of tags would be returned as they would be at least indirectly depended on by the topmost ones.slightlyOptimizePatchset- only works on the surface inventory (see optimizePatchset) and only optimises at most one tag in there, going for the most recent tag which has no non-depended patch after it. Older tags won't be cleanF, which means the PatchSet will not be in 'clean :> unclean' state.Merge two FLs (say L and R), starting in a common context. The result is a FL starting in the original end context of L, going to a new context that is the result of applying all patches from R on top of patches from L."While this function is similar to F8, there are some important differences to keep in mind:F does not correctly deal with duplicate patches whereas this one does (Question from Eric Kow: in what sense? Why not fix F/?) (bf: I guess what was meant here is that S works in the the way it does because it considers patch meta data whereas F6 cannot since it must work for primitive patches, too.`Remove a patch from FL, using PatchInfo equality. The result is Just whenever the patch has been found and removed. If the patch is not present in the sequence at all or any commutation fails, we get Nothing. First two cases are optimisations for the common cases where the head of the list is the patch to remove, or the patch is not there at all.VA note on the witness types: the patch to be removed is typed as if it had to be the first in the list, since it has the same pre-context as the list. The types fit together (internally, in this module) because we commute the patch to the front before removing it and commutation inside a sequence does not change the sequence's contexts.Same as  only for .None'+-;<=CFQSTVȡ hashBundle creates a SHA1 string of a given a FL of named patches. This allows us to ensure that the patches in a received patchBundle have not been modified in transit.In makeBundle2, it is presumed that the two patch sequences are identical, but that they may be lazily generated. If two different patch sequences are passed, a bundle with a mismatched hash will be generated, which is not the end of the world, but isn't very useful either.filterGpgDashes unescapes a clearsigned patch, which will have had any lines starting with dashes escaped with a leading "- ".unavailablePatches converts a list of PatchInfos into a RL of PatchInfoAnd Unavailable patches. This is used to represent the Context of a patchBundle.NpiUnavailable returns an Unavailable within a PatchInfoAnd given a PatchInfo.igetContext parses a context list, returning a tuple containing the list, and remaining ByteString input.`(-:-) is used to build up a Sealed FL of patches and tuple it, along with any unconsumed input.getPatches attempts to parse a sequence of patches from a ByteString, returning the FL of as many patches-with-info as were successfully parsed, along with any unconsumed input.sillyLex takes a ByteString and breaks it upon the first newline, having removed any leading spaces. The before-newline part is unpacked to a String, and tupled up with the remaining ByteString.1 scans the context in the file of the given name. dMinimize the context of a bundle to be sent, taking into account the patches selected to be sent patchFilename maps a patch description string to a safe (lowercased, spaces removed and ascii-only characters) patch filename.   None'+-;<=CFQSTVɁ  None'+-;<=>?CFQSTVYA Matcher is made of a + which we will use to match patches and a String representing it.DA type for predicates over patches which do not care about contexts applyMatcher applies a matcher to a patch. I.The string that is emitted when the user runs darcs help patterns. JhaveNonrangeMatch flags# tells whether there is a flag in flags: which corresponds to a match that is "non-range". Thus, --match, --patch, --hash and --index make haveNonrangeMatch true, but not  --from-patch or  --to-patch. KhaveNonrangeExplicitMatch flags is just like haveNonrangeMatch flagsB, but ignores "internal matchers" used to mask "internal patches" LhavePatchsetMatch flagsR tells whether there is a "patchset match" in the flag list. A patchset match is --match or --patch, or  --context , but not  --from-patch nor (!) --index2. Question: Is it supposed not to be a subset of haveNonrangeMatch? N firstMatch fs tells whether fs implies a "first match", that is if we match against patches from a point in the past on, rather than against all patches since the creation of the repository. PsecondMatch fs tells whether fs implies a "second match", that is if we match against patches up to a point in the past on, rather than against all patches until now.strictJust is a strict version of the Just constructor, used to ensure that if we claim we've got a pattern match, that the pattern will actually match (rathern than fail to compile properly). RnonrangeMatcherb is the criterion that is used to match against patches in the interval. It is 'Just m' when the --patch, --match, --tag/ options are passed (or their plural variants). SnonrangeMatcherIsTag* returns true if the matching option was '--tag' firstMatcherz returns the left bound of the matched interval. This left bound is also specified when we use the singular versions of --patch, --match and --tag . Otherwise,  firstMatcher returns Nothing. TmatchAPatch fs p tells whether p$ matches the matchers in the flags fs hasLastn fs return the --last argument in fs , if any. WmatchFirstPatchset fs ps returns the part of ps[ before its first matcher, ie the one that comes first dependencywise. Hence, patches in matchFirstPatchset fs ps- are the context for the ones we don't want. dropn n ps drops the n last patches from ps. XmatchSecondPatchset fs ps returns the part of psG before its second matcher, ie the one that comes last dependencywise. YSplit on the second matcher. Note that this picks up the first match starting from the earliest patch in a sequence, as opposed to  X? which picks up the first match starting from the latest patchfindAPatch m ps returns the last patch in ps matching m , and calls \ if there is none. ZmatchAPatchset m ps returns a prefix of ps ending in a patch matching m , and calls \ if there is none. [getMatchingTag m ps, where m is a  which matches tags returns a 7 containing all patches in the last tag which matches mo. Last tag means the most recent tag in repository order, i.e. the last one you'd see if you ran darcs log -t m . Calls \ if there is no matching tag. \matchExists m ps* tells whether there is a patch matching m in ps ^ applyNInv& n ps applies the inverse of the last n patches of ps. applyInvp tries to get the patch that's in a 'PatchInfoAnd patch', and to apply its inverse. If we fail to fetch the patch then we share our sorrow with the user. a version of > for  lists that cater for contexts.Xkeyword (operator), argument name, help description, list of examples, matcher function YThe first element is the patches before and including the first patch matching the second matcher, the second element is the patches after it- 2 3 4 5 F 9 @ = 6 : ; > ? < D E A B C 7 8 G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^- H I G W X Y U T M N P J K L Q ] R 2 3 4 \ ^ V [ Z O S 5 6 7 8 9 : ; < = > ? @ A B C D E F 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E FNone"#'+-;<=CFQSTV Z dUsed by: clone eUsed by: amend f:Used by: rebase pull/apply, send, push, pull, apply, fetch hUsed by: rebase unsuspend/reify i7Used by: unrecord, obliterate, rebase suspend, rollback j Used by: diff k Used by: log TODO: see . TODO: see . c#show files/contents, dist, annotate 5 F 9 @ = 6 : ; > ? < D E A B C 7 8 c d e f g h i j k l m n 5 6 7 8 9 : ; < = > ? @ A B C D E F c d e f h i j k n g l mNone"#'+-;<=CFQSTV ~)TODO: reconsider this grouping of options 3Options for darcs iself that act like sub-commands.  / instantiates the first two type parameters of Wd to what we need in darcs. The first parameter is instantiated to The flag type is instantiate to W. TODO someone wrote here long ago that any time --dry-run is a possibility automated users should be able to examine the results more easily with --xml. See also issue2397. dryRun w/o xml is currently used in add, pull, and repair. TODO: Returning -1 if the argument cannot be parsed as an integer is not something I expected to find in a Haskell program. Instead, the flag should take either a plain 5 argument (leaving it to a later stage to parse the  to an   ), or else a    9, taking the possibility of a failed parse into account.  --repodir9 is there for compatibility, should be removed eventuallyoIMHO the whole option can disappear; it overlaps with using an extra (non-option) argument, which is how e.g.  darcs get is usually invoked. convert, clone, init TODO: see issue2395 &push, apply, rebase apply: default to * pull, rebase pull: default to , ':Deprecated flag, still present to output an error message.D !"#$%&'()*+,-0./12345678:9;<=>?@ABCDEFGHIJKLMNOPQRSTUWVXYZ^`_abcdefghijklm 5 F 9 @ = 6 : ; > ? < D E A B C 7 8 c d e f g h i j k l m n o p q r s t u v w | z y x { } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7& jklm  XYZ UVW  ! "#$% ;<  89: OPQIJKLMN 5671234FGH CDE =>?        )*+,  &'( ghi  def  ^_` 6     abc ~  RST @AB   ! "-./0 # ) * $ % & ( ' w x y z { | } + , - r s t u v . / 0 1 2 3 o p q 4 5 7 o p q r s t u v w x y z { | } ~                     None'+-;<=CFQSTV- lInstantiate a V with an VWX\[ZY]^_`abcdeUV l UV lNone'+-;<=CFQSTVP nfTries to perform some task if it can obtain the lock, Otherwise, just gives up without doing the task p pK safely creates an empty file (not open for writing) and returns its name.The temp file operations are rather similar to the locking operations, in that they both should always try to clean up, so exitWith causes trouble. q q$ creates a temporary file, and opens it. Both of them run their argument and then delete the file. Also, both of them (to my knowledge) are not susceptible to race conditions on the temporary file (as long as you never delete the temporary file; that would reintroduce a race condition).Creates a directory based on the path parameter; if a relative path is given the dir is created in the darcs temp dir. If an absolute path is given this dir will be created if it doesn't exist. If it is specified as a temporary dir, it is deleted after finishing the job. v v is like  w:, except that it doesn't delete the directory afterwards. w w creates a temporary directory, runs the action and then removes the directory. The location of that directory is determined by the contents of _darcsprefs#tmpdir, if it exists, otherwise by  $DARCS_TMPDIRp, and if that doesn't exist then whatever your operating system considers to be a a temporary directory (e.g. $TMPDIR under Unix, $TEMP under Windows).If none of those exist it creates the temporary directory in the current directory, unless the current directory is under a _darcs directory, in which case the temporary directory in the parent of the highest _darcs directory to avoid accidentally corrupting darcs's internals. This should not fail, but if it does indeed fail, we go ahead and use the current directory anyway. If $DARCS_KEEP_TMPDIRW variable is set temporary directory is not removed, this can be useful for debugging. eDo an action in a newly created directory of the given name. The directory is first created with a different temporary name (but under the same parent directory), and becomes renamed to the final name when the action returns without an exception. This operation raises an alreadyExists exception if a file system object of the given name already exists. t m n o p q r s t u v w x y z { | } ~  m n o p q r w v x z ~  { | } yt s t u None'+-;<=CFQSTVy0 -if pipe to ssh, can choose to compress or nototherwise, can specify printersgetSystemEncoding) fetches the current encoding from locale 5Get the name of the darcs executable (as supplied by getExecutablePath) nSend an email, optionally containing a patch bundle (more precisely, its description and the bundle itself)lGiven two shell commands as arguments, execute the former. The latter is then executed if the former failed because the executable wasn't found (code 127), wasn't executable (code 126) or some other exception occurred (save from a resource vanished/broken pipe error). Other failures (such as the user holding ^C) do not cause the second command to be tried.  editFile f lets the user edit a file which could but does not need to already exist. This function returns the exit code from the text editor and a flag indicating if the user made any changes. On Posix systems, GHC by default uses the user's locale encoding to determine how to decode/encode the raw byte sequences in the Posix API to/from e. It also uses certain special variants of this encoding to determine how to handle encoding errors.See GHC.IO.Encoding for details.bIn particular, the default variant used for command line arguments and environment variables is /ROUNDTRIP, which means that any/ byte sequence can be decoded and re-encoded w/o failure or loss of information. To enable this, GHC uses code points that are outside the range of the regular unicode set. This is what you get with .We need to preserve the raw bytes e.g. for file names passed in by the user and also when reading file names from disk; also when re-generating files from patches, and when we display them to the user.mSo we want to use this encoding variant for *all* IO and for (almost) all conversions between raw bytes and Bs. The encoding used for IO from and to handles is controlled by @ which we use here to make it equal to the //ROUNDTRIP variant.setDarcsEncoding should be called before the first time any darcs operation is run, and again if anything else might have set those encodings to different values.GNote that it isn't thread-safe and has a global effect on your program.<On Windows, this function does (and should) not do anything. isUTF8K checks if an encoding is UTF-8 (or ascii, since it is a subset of UTF-8). handle to write email toFromToSubjectCCbody fromtosubjectcc send command(content,bundle)body  None'+-;<=CFQSTV1   opts patch prints patch4 in accordance with the flags in opts, ie, whether  --verbose or  --summary" were passed at the command-line.   flags patch returns a % representing the right way to show patch given the list flags! of flags darcs was invoked with.  # prints a patch on standard output.   runs '$PAGER' and shows a patch in it.  @ prints a patch, together with its context, on standard output.  22008 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>GPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTVJ will inspect the current waiting-to-start queue, if the pipe isn't full,rstu  rstuNone'+-;<=CFQSTV fetchFile fileOrUrl cache returns the content of its argument (either a file or an URL). If it has to download an url, then it will use a cache as required by its second argument.We always use default remote darcs, since it is not fatal if the remote darcs does not exist or is too old -- anything that supports transfer-mode should do, and if not, we will fall back to SFTP or SCP. fetchFileLazyPS fileOrUrl cache lazily reads the content of its argument (either a file or an URL). Warning: this function may constitute a fd leak; make sure to force consumption of file contents to avoid that. See "fetchFilePS" for details. remote darcs executable(path representing the origin file or URLdestination path%tell whether file to copy is cachable None'+-;<=CFQSTVE0This makes darcs-1 (non-hashed repos) filenames.$The name consists of three segments:timestamp (ISO8601-compatible yyyymmmddHHMMSS; note that the old-fashioned (non-hashed) format expects this date to be exactly as in the patch, ignoring, any timezone info, which is why we use  here)SHA1 hash of the authorHSHA1 hash of the patch name, author, date, log, and "inverted" flag.  None'+-;<=CFQSTV Representation of the format of a repository. Each sublist corresponds to a line in the format file. Currently all lines are expected to be singleton words.HDefine string constants in one place, for reuse in show/parse functions.HDefine string constants in one place, for reuse in show/parse functions.HDefine string constants in one place, for reuse in show/parse functions. 4Is a given property contained within a given format? ,Add a single property to an existing format. 1Remove a single property from an existing format. Identify the format of the repository at the given location (directory, URL, or SSH path). Fails if we weren't able to identify the format. dIdentify the format of the repository at the given location (directory, URL, or SSH path). Return  reason if it fails, where reason{ explains why we weren't able to identify the format. Note that we do no verification of the format, which is handled by   or   on the resulting  . (Write the repo format to the given file. Create a repo format. The first argument is whether to use the old (darcs-1) format; the second says whether the repo has a working tree.   source returns  : an error message if we cannot write to a repo in format source, or   if there's no such problem.   source target returns  G an error message if we cannot transfer patches from a repo in format source to a repo in format target, or   if there are no such problem.   source returns  ; an error message if we cannot read from a repo in format source, or   if there's no such problem.{ applies a function that maps format-entries to an optional error message, to each repoformat entry. Returning any errors.<Does this version of darcs know how to handle this property?     None'+-;<=CFQSTV CCache is an abstract type for hiding the underlying cache locations iunionRemoteCaches merges caches. It tries to do better than just blindly copying remote cache entries:If remote repository is accessed through network, do not copy any cache entries from it. Taking local entries does not make sense and using network entries can lead to darcs hang when it tries to get to unaccessible host.If remote repositoty is local, copy all network cache entries. For local cache entries if the cache directory exists and is writable it is added as writable cache, if it exists but is not writable it is added as read-only cache.This approach should save us from bogus cache entries. One case it does not work very well is when you fetch from partial repository over network. Hopefully this is not a common case. }Compares two caches, a remote cache is greater than a local one. The order of the comparison is given by: local < http < ssh  < computes the cache hash (i.e. filename) of a packed string. "fetchFileUsingCache cache dir hash receives a list of caches cache-, the directory for which that file belongs dir and the hash of the file to fetch. It tries to fetch the file from one of the sources, trying them in order one by one. If the file cannot be fetched from any of the sources, this operation fails. (hashedFilePath cachelocation subdir hash( returns the physical filename of hash hash in the subdir section of  cachelocation.0hashedFilePathReadOnly cachelocation subdir hash( returns the physical filename of hash hash in the subdir section of  cachelocationF. If directory, assume it is non-bucketed cache (old cache location). peekInCache cache subdir hash tells whether cache# and contains an object with hash hashS in a writable position. Florent: why do we want it to be in a writable position? /speculateFileUsingCache cache subdirectory name takes note that the file namev is likely to be useful soon: pipelined downloads will add it to the (low-priority) queue, for the rest it is a noop. Note that the files are likely to be useful soon: pipelined downloads will add them to the (low-priority) queue, for the rest it is a noop.We hace a list of locations (cachez) ordered from "closest/fastest" (typically, the destination repo) to "farthest/slowest" (typically, the source repo). copyFileUsingCache! first checks whether given file f is present in some writeable location, if yes, do nothing. If no, it copies it to the last writeable location, which would be the global cache by default, or the destination repo if  `--no-cache` is passed. Function does nothing if there is no writeable location at all. If the copy should occur between two locations of the same filesystem, a hard link is actually made. TODO document oos&: what happens when we only speculate?lChecks if a given cache entry is reachable or not. It receives an error caught during execution and the cache entry. If the caches is not reachable it is blacklisted and not longer tried for the rest of the session. If it is reachable it is whitelisted and future errors with such cache get ignore. To determine reachability: * For a local cache, if the given source doesn't exist anymore, it is blacklisted. * For remote sources if the error is timeout, it is blacklisted, if not, it checks if _darcs/hashed_inventory exist, if it does, the entry is whitelisted, if it doesn't, it is blacklisted.IReturns a list of reachables cache entries, removing blacklisted entries.<Checks if the _darcs/hashed_inventory exist and is reachableeGet contents of some hashed file taking advantage of the cache system. We hace a list of locations (cache4) ordered from "closest/fastest" (typically, the destination repo) to "farthest/slowest" (typically, the source repo). First, if possible it copies the file from remote location to local. Then, it reads it contents, and links the file across all writeable locations including the destination repository."write compression filename content writes content to the file filename" according to the policy given by  compression. 5writeFileUsingCache cache compression subdir contents write the string contents to the directory subdir, except if it is already in the cache, in which case it is a noop. Warning (?) this means that in case of a hash collision, writing using writeFileUsingCache is a noop. The returned value is the filename that was given to the string. 2Prints an error message with a list of bad caches.% %       None'+-;<=CFQSTV . -The path of the global preference directory; ~/.darcs on Unix, and %APPDATA%/darcs on Windows. 6The relative path of the global preference directory; ~/.darcs on Unix, and %APPDATA%/darcs3 on Windows. This is used for online documentation.tryMakeBoringRegexp attempts to create a Regex from a given String. The evaluation is forced, to ensure any malformed exceptions are thrown here, and not later. boringRegexps returns a list of the boring regexps, from the local and global prefs/boring files. Any invalid regexps are filtered, preventing an exception in (potentially) pure code, when the regexps are used.%The lines that will be inserted into _darcsprefsbinaries when  darcs initX is run. Hence, a list of comments, blank lines and regular expressions (ERE dialect).hNote that while this matches .gz and .GZ, it will not match .gZ, i.e. it is not truly case insensitive. (addRepoSource adds a new entry to _darcsprefs)repos and sets it as default in _darcsprefspdefaultrepo, unless --no-set-default or --dry-run is passed, or it is the same repository as the current one. delete references to other repositories. Used when cloning to a ssh destination. Assume the current working dir is the repository. ?Fetch and return the message of the day for a given repository. 6Display the message of the day for a given repository,                                          None'+-;<=CFQSTV Mq (Non-trivial interaction between options. "DThis will become dis-entangled as soon as we inline these functions. #2Non-trivial interaction between options. Explicit -i or -a dominates, else --count, --xml, or  --dry-run imply -a, else use the def argument. +dUgly. The alternative is to put the remoteRepos accessor into the IO monad, which is hardly better. , ,q takes a String that may be a file path or a URL. It returns either the URL, or an absolute version of the path. -2maybeFixSubPaths (repo_path, orig_path) file_paths tries to turn  file_paths into _s, taking into account the repository path and the original path from which darcs was invoked.A  is a path under& (or inside) the repo path. This does notz mean it must exist as a file or directory, nor that the path has been added to the repository; it merely means that it could be added.When converting a relative path to an absolute one, this function first tries to interpret the relative path with respect to the current working directory. If that fails, it tries to interpret it with respect to the repository directory. Only when that fails does it put a NothingE in the result at the position of the path that cannot be converted.?It is intended for validating file arguments to darcs commands. . . is a variant of  - that throws out non-repository paths and duplicates from the result. See there for details. TODO: why filter out null paths from the input? why here and not in  -? / /K takes a list of flags and returns the url of the repository specified by Repodir "directory"P in that list of flags, if any. This flag is present if darcs was invoked with --repodir=DIRECTORY 2 2J takes a list of flags and returns the author of the change specified by Author "Leo Tolstoy"/ in that list of flags, if any. Otherwise, if Pipe is present, asks the user who is the author and returns the answer. If neither are present, try to guess the author, from repository or global preference files or environment variables, and if it's not possible, ask the user. 3 3 try to guess the author, from repository or global preference files or environment variables, and if it's not possible or alwaysAsk parameter is true, ask the user. If store parameter is true, the new author is added into  _darcs/prefs. 4 4 tries to get the author name first from the repository preferences, then from global preferences, then from environment variables. Returns []t if it could not get it. Note that it may only return multiple possibilities when reading from global preferences 7 7G takes a list of flags and returns the sendmail command to be used by  darcs send$. Looks for a command specified by SendmailCmd "command"P in that list of flags, if any. This flag is present if darcs was invoked with --sendmail-command=COMMAND! Alternatively the user can set $SENDMAIL- which will be used as a fallback if present. 8Accessor for output option 9 9J takes a list of flags and returns the subject of the mail to be sent by  darcs send$. Looks for a subject specified by Subject "subject"P in that list of flags, if any. This flag is present if darcs was invoked with --subject=SUBJECT : :c takes a list of flags and returns the addresses to send a copy of the patch bundle to when using  darcs send'. looks for a cc address specified by  Cc "address"K in that list of flags. Returns the addresses as a comma separated string.T m             # ( 3 5 6      ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < =T  !  " # $ % & ( ' ) * < =    + , . - / 2 3 4 7 0 1 9 ; : 6 8 5  6   m       #   ( 5  3None'+-;<=CFQSTV T >A convenience function to call from all darcs command functions before applying any patches. It checks for malicious paths in patches, and prints an error message and fails if it finds one. ?9Filter out patches that contains some malicious file path > ? @ > ? @2009 Petr RockaiMITdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTV Vv A ANone'+-;<=CFQSTV [% Cexternal merge tool commandtell whether we want GUI pauseexternal merge tool commandtell whether we want GUI pausepath to merge basepath to side 1 of the mergepath to side 2 of the merge%path where resolved content should go B C D B C DNone'+-;<=>?CFKQSTV ^ F;Apply patches, emitting warnings if there are any IO errors G"Apply patches, ignoring all errors HPThe default mode of applying patches: fail if the directory is not as we expects E F G Hs F G E H ENone'+-;<=CFQSTV b{ o:Replace the pristine hash at the start of a raw, unparsed  b or add it if none is present. qDskipPristineHash drops the 'pristine: HASH' prefix line, if present. ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u ^ _ ` a b ] f g h e d c i k l m n j o p q r s t u ^ _ ` a c d e f g hNone'+-;<=CFQSTV l A  Repository is a token representing the state of a repository on disk. It is parameterized by the patch type in the repository, and witnesses for the recorded state of the repository (i.e. what darcs get would retrieve), the unrecorded state (what's in the working directory now), and the tentative state, which represents work in progress that will eventually become the new recorded state unless something goes wrong.   repository function modifies the cache of  repository with function., remove duplicates and sort the results with  .     GPL-2None$'+-;<=CFQSTV t,the patch-indexall the PatchIds tracked by this patch index, with the most recent patch at the head of the list (note, stored in the reverse order to this on disk for backwards compatibility with an older format). information file with a given IDGtimespans where a file with a certain id corresponds to given filenamesHtimespans where a certain filename corresponds to a file with a given id9info about a given fileid, e.g.. is a file or a directoryOn-disk version of patch index version 1 is the one introduced in darcs 2.10 2 changes the pids order to newer-to-older\'applyPatchMods pmods pindex' applies a list of PatchMods to the given patch index pindex$create new filespan for created file?start new span for name fn for file fid starting with patch pid"stop current span for file name fn?start new span for name fn for file fid starting with patch pid"stop current span for file name fn)insert touching patchid for given file id)insert touching patchid for given file idlookup current fid of filepathClookup current fid of filepatch, returning a Maybe to allow failure'lookup all the file ids of a given path>return all fids of matching subpaths of the given filepathreturns a single file id if the given path is a file if it is a directory, if returns all the file ids of all paths inside it, at any point in repository history<Creates patch index that corresponds to all patches in repo.convert patches to patchmods.return set of current filenames in patch index remove all patch effects of given patches from patch index. assumes that the given list of patches is a suffix of the patches tracked by the patch-index =update the patch index to the current state of the repository T'createPatchIndexFrom repo pmods' creates a patch index from the given patchmods. 5Load patch-index from disk along with some meta data. ZIf patch-index is useful as it is now, read it. If not, create or update it, then read it. WRead-only. Checks if patch-index exists for this repository it works by checking if: _darcs/patch_index/, and its corresponding files are all present?patch index version is the one handled by this version of Darcs Read-only. Checks if _darcs/noPatchIndex9 exists, that is, if patch-index is explicitely disabled. Create or update patch index if _darcs/no_patch_index exists, delete it if patch index exists, update itif not, create it from scratch +Read-only. Checks the two following things:   CThen only if it exists and it is not explicitely disabled, returns True, else returns FalseJ (or an error if it exists and is explicitely disabled at the same time). Creates patch-index (ignoring whether it is explicitely disabled). If it is ctrl-c'ed, then aborts, delete patch-index and mark it as disabled. QChecks if patch-index exists and is in sync with repository (more precisely with _darcs/hashed_inventory>). That is, checks if patch-index can be used as it is now.Stores patch-index on disk. Deletes patch-index (_darcs/patch_index/< and its contents) and mark repository as disabled (creates _darcs/no_patch_index)..return set of current filepaths in patch index@return set of current filepaths in patch index, for internal use AChecks if patch index can be created and build it with interrupt.Checks whether a patch index can (and should) be created. If we are not in an old-fashioned repo, and if we haven't been told not to, then we should create a patch index if it doesn't already exist. DReturns an RL in which the order of patches matters. Useful for the annotate command. If patch-index does not exist and is not explicitely disabled, silently create it. (Also, if it is out-of-sync, which should not happen, silently update it). \If a patch index is available, returns a filter that takes a list of files and returns a  PatchFilter that only keeps patches that modify the given list of files. If patch-index cannot be used, return the original input. If patch-index does not exist and is not explicitely disabled, silently create it. (Also, if it is out-of-sync, which should not happen, silently update it). ^Dump information in patch index. Patch-index should be checked to exist beforehand. Read-only. Read-only sanity check on patch-index. Patch-index should be checked to exist beforehand. It may not be in sync with repository. FPatchSet of the repository, used if we need to create the patch-index. &Sequence of patches you want to filter=The repository (to attempt loading patch-index from its path)>PatchSet of repository (in case we need to create patch-index)8File(s) about which you want patches from given sequenceFiltered sequence of patches. The repositoryKPatchSet of patches of repository (in case patch-index needs to be created).PatchFilter ready to be used by SelectChanges. None'+-;<=>?CFQSTV readHashFile c subdir hash reads the file with hash hash" in dir subdir, fetching it from   c if needed.geta objtype name stuff tries to get an object of type objtype named name in stuff. ZGrab a whole pristine tree from a hash, and, if asked, write files in the working copy. gReturns a list of pairs (FilePath, (strict) ByteString) of the pristine tree starting with the hash root. path should be either "." or end with "/" Separator "/" is used since this function is used to generate zip archives from pristine trees. _getHashedFiles returns all hash files targeted by files in hashroots in the hashdir directory.   !"#$%None'+-;<=CFQSTV A Read the contents of pending. The return type is currently incorrect as it refers to the tentative state rather than the recorded state.&'Read the contents of tentative pending.''Read the contents of tentative pending.(URead the pending file with the given suffix. CWD should be the repository directory.)(Write the contents of tentative pending.*JWrite the contents of new pending. CWD should be the repository directory. siftForPending ps( simplifies the candidate pending patch ps through a combination of looking for self-cancellations (sequences of patches followed by their inverses), coalescing, and getting rid of any hunk/binary patches we can commute out the back The visual image of sifting can be quite helpful here. We are repeatedly tapping (shrinking) the patch sequence and shaking it (sift). Whatever falls out is the pending we want to keep. We do this until the sequence looks about as clean as we can get it++. can be seen as a first pass approximation of   that works without having to do any commutation. It either returns a sifted pending (if the input is simple enough for this crude approach) or has no effect. tentativelyRemoveFromPending p is used by Darcs whenever it adds a patch to the repository (eg. with apply or record). Think of it as one part of transferring patches from pending to somewhere else.8Question (Eric Kow): how do we detect patch equivalence?,A sequence of primitive patches (candidates for the pending patch) is considered simple if we can reason about their continued status as pending patches solely on the basis of them being hunk/binary patches.Simple here seems to mean that all patches are either hunk/binary patches, or patches that cannot (indirectly) depend on hunk/binary patches. For now, the only other kinds of patches in this category are changepref patches.It might be tempting to add, say, adddir patches but it's probably not a good idea because Darcs also inverts patches a lot in its reasoning so an innocent addir may be inverted to a rmdir which in turn may depend on a rmfile, which in turn depends on a hunk/binary. Likewise, we would not want to add move patches to this category for similar reasons of a potential dependency chain forming. +makeNewPending repo YesUpdateWorking pendPs verifies that the pendPsh could be applied to pristine if we wanted to, and if so writes it to disk. If it can't be applied, pendPsA must be somehow buggy, so we save it for forensics and crash. <Replace the pending patch with the tentative pending. If NoUpdateWorkingQ, this merely deletes the tentative pending without replacing the current one.LQuestion (Eric Kow): shouldn't this also delete the tentative pending if YesUpdateWorking;? I'm just puzzled by the seeming inconsistency of the NoUpdateWorking doing deletion, but YesUpdateWorking not bothering. >tentativelyAddToPending repo NoDryRun YesUpdateWorking pend ps appends ps to the pending patch.It has no effect with NoUpdateWorking.This fuction is unsafe because it accepts a patch that works on the tentative pending and we don't currently track the state of the tentative pending. setTentativePending is basically unsafe. It overwrites the pending state with a new one, not related to the repository state.  prepend repo YesUpdateWorking ps prepends ps9 to the pending patch It's used right before removing psj from the repo. This ensures that the pending patch can still be applied on top of the recorded state.{This function is basically unsafe. It overwrites the pending state with a new one, not related to the repository state. Drecorded state of the repository, to check if pending can be applied -./None'+-;<=CFQSTV cc From a repository and a list of SubPath's, construct a filter that can be used on a Tree (recorded or unrecorded state) of this repository. This constructed filter will take pending into account, so the subpaths will be translated correctly relative to pending move patches.0Like  8 but with the pending patch passed as a parameter. The  E parameter is not used, we need it only to avoid abiguous typing of p.1AIs the given path in (or equal to) the _darcs metadata directory?  Construct a  L that removes any boring files that are not also contained in the argument .The standard use case is for the argument to be the recorded state, possibly with further patches applied, so as not to discard any files already known to darcs. The result is usually applied to the full working state. ]Construct a Tree filter that removes any darcs metadata files the Tree might have contained. 5For a repository and an optional list of paths (when  , take everything) compute a (forward) list of prims (i.e. a patch) going from the recorded state of the repository (pristine) to the unrecorded state of the repository (the working copy + pending). When a list of paths is given, at least the files that live under any of these paths in either recorded or unrecorded will be included in the resulting patch. NB. More patches may be included in this list, eg. the full contents of the pending patch. This is usually not a problem, since selectChanges will properly filter the results anyway.'This also depends on the options given:-look-for-moves: Detect pending file moves using the index. The resulting patches are added to pending and taken into consideration, when filtering the tree according to the given path list.g-look-for-adds: Include files in the working state that do not exist in the recorded + pending state.+-include-boring: Include even boring files.-look-for-replaces: Detect pending replace patches. Like detected moves, these are added to the pending patch. Note that, like detected moves, these are mere proposals for the user to consider or reject.E-ignore-times: Disables index usage completely -- for each file, we read both the unrecorded and the recorded copy and run a diff on them. This is very inefficient, although in extremely rare cases, the index could go out of sync (file is modified, index is updated and file is modified again within a single second).Note that use of the index is also disabled when we detect moves or replaces, since this implies that the index is out of date.27filteredWorking useidx scan relevant index pending_treeA reads the working tree and filters it according to options and relevant file paths. The  pending_tree is understood to have relevant( already applied and is used (only) if  useidx == 7 and scan == 1G to act as a guide for filtering the working tree. Note that even if useidx  | 7W, the index is still used to avoid filtering boring files that darcs knows about (see  ).3Witnesses the fact that in the absence of a working directory, we pretend that the working dir updates magically to the tentative state. Obtains a Tree corresponding to the "recorded" state of the repository: this is the same as the pristine cache, which is the same as the result of applying all the repository's patches to an empty directory. Obtains a Tree corresponding to the "unrecorded" state of the repository: the modified files of the working tree plus the "pending" patch. The optional list of paths allows to restrict the query to a subtree.Limiting the query may be more efficient, since hashes on the uninteresting parts of the index do not need to go through an up-to-date check (which involves a relatively expensive lstat(2) per file.  A variant of  I that takes the UseIndex and ScanKnown options into account, similar to  G. We are only interested in the resulting tree, not the patch, so the  option is irrelevant. oObtains a Tree corresponding to the complete working copy of the repository (modified and non-modified files). Obtains the recorded  with the pending patch applied. Obtains the recorded  with the pending patch applied, plus the pending patch itself. The pending patch should start at the recorded state (we even verify that it applies, and degrade to renaming pending and starting afresh if it doesn't), but we've set to say it starts at the tentative state.UQuestion (Eric Kow) Is this a bug? Darcs.Repository.Pending.readPending says it is TMark the existing index as invalid. This has to be called whenever the listing of pristine changes and will cause darcs to update the index next time it tries to read it. (NB. This is about files added and removed from pristine: changes to file content in either pristine or working are handled transparently by the index reading code.) sRemove any patches (+dependencies) from a sequence that conflict with the recorded or unrecorded changes in a repo4_Automatically detect file moves using the index. TODO: This function lies about the witnesses.5Search for possible replaces between the recordedAndPending state and the unrecorded (or working) state. Return a Sealed FL list of replace patches to be applied to the recordedAndPending state. Add an  of patches started from the pending state to the pending patch. TODO: add witnesses for pending so we can make the types precise: currently the passed patch can be applied in any context, not just after pending. Add an ^ of patches starting from the working state to the pending patch, including as much extra context as is necessary (context meaning dependencies), by commuting the patches to be added past as much of the changes between pending and working as is possible, and including anything that doesn't commute, and the patch itself in the new pending patch. WRecorded patches from repository, starting from same context as the patches to filter9Repository itself, used for grabbing unrecorded changesPatches to filter>True iff any patches were removed, possibly filtered patches50pending tree (including possibly detected moves) working tree1234567  5671234   None'+-;<=CFQSTV g6nSets scripts in or below the current directory executable. A script is any file that starts with the bytes #!/. This is used for --set-scripts-executable.  GPL-2None'+-;<=CFQSTV vi :The status of a given directory: is it a darcs repository? 'looks like a repository with some error  safest guess 5Tries to identify the repository in a given directory *identifyRepository identifies the repo at urlI. Warning: you have to know what kind of patches are found in that repo. identifyRepositoryFor repo url& identifies (and returns) the repo at urlE, but fails if it is not compatible for reading from and writing to. |hunt upwards for the darcs repository This keeps changing up one parent directory, testing at each step if the current directory is a repository or not. $ The result is: Nothing, if no repository found Just (Left errorMessage), if bad repository found Just (Right ()), if good repository found. WARNING this changes the current directory for good if matchFn succeeds findAllReposInDir topDir) returns all paths to repositories under topDir.   None'+-;<=CFQSTV )7AThe way patchfiles, inventories, and pristine trees are stored. 8, means all files are in the same directory. 9 means we create a second level of subdirectories, such that all files whose hash starts with the same two letters are in the same directory.:: takes a root hash, a patch p) and attempts to apply the patch to the  identified by h~. If we encounter an old, size-prefixed pristine, we first convert it to the non-size-prefixed format, then apply the patch. revertTentativeChanges swaps the tentative and "real" hashed inventory files, and then updates the tentative pristine with the "real" inventory hash. finalizeTentativeChanges trys to atomically swap the tentative inventory/pristine pointers with the "real" pointers; it first re-reads the inventory to optimize it, presumably to take account of any new tags, and then writes out the new tentative inventory, and finally does the atomic swap. In general, we can't clean the pristine cache at the same time, since a simultaneous get might be in progress. |readHashedPristineRoot attempts to read the pristine hash from the current inventory, returning Nothing if it cannot do so. QcleanPristine removes any obsolete (unreferenced) entries in the pristine cache. 8filterDirContents returns the contents of the directory d& except files whose names begin with VZ (directories . and .., hidden files) and files whose names are filtered by the function f, if dir! is empty, no paths are returned. +Set difference between two lists of hashes. YcleanInventories removes any obsolete (unreferenced) files in the inventories directory.;RspecialPatches list of special patch files that may exist in the directory _darcspatches. QcleanPatches removes any obsolete (unreferenced) files in the patches directory.<addToSpecificInventory adds a patch to a specific inventory file, and returns the FilePath whichs corresponds to the written-out patch. HWarning: this allows to add any arbitrary patch! Used by convert import.=Attempt to remove an FL of patches from the tentative inventory. This is used for commands that wish to modify already-recorded patches.=Precondition: it must be possible to remove the patches, i.e.!the patches are in the repository'any necessary commutations will succeed>xwriteHashFile takes a Doc and writes it as a hash-named file, returning the filename that the contents were written to. -readRepo returns the "current" repo patchset. -readRepo returns the tentative repo patchset.?5readRepoUsingSpecificInventory uses the inventory at invPath to read the repository repo.@Read a i from the repository (assumed to be located at the current working directory) by following the chain of  ^%s, starting with the given one. The  | parameter is used to locate patches and parent inventories, since not all of them need be present inside the current repo.AeRead an inventory from a file. Fails with an error message if file is not there or cannot be parsed. (copyRepo copies the hashed inventory of repo to the repository located at remote. wwriteAndReadPatch makes a patch lazy, by writing it out to disk (thus forcing it), and then re-reads the patch lazily. writeTentativeInventory writes patchSet as the tentative inventory. writeHashIfNecessary writes the patch and returns the resulting info/hash, if it has not already been written. If it has been written, we have the hash in the PatchInfoAnd, so we extract and return the info/hash.BlistInventoriesWith returns a list of the inventories hashes. The first argument is to choose directory format. The first argument can be readInventoryPrivate or readInventoryLocalPrivate. The second argument specifies whether the files are expected to be stored in plain or in bucketed format. The third argument is the directory of the parent inventory files. The fourth argument is the directory of the head inventory file. vlistInventories returns a list of the inventories hashes. This function attempts to retrieve missing inventory files.CRead the given inventory file if it exist, otherwise return an empty inventory. Used when we expect that some inventory files may be missing. Return inventories hashes by following the head inventory. This function does not attempt to retrieve missing inventory files. OlistInventoriesRepoDir returns a list of the inventories hashes. The argument repoDir is the directory of the repository from which we are going to read the head inventory file. The rest of hashed files are read from the global cache.DReturn a list of the patch filenames, extracted from inventory files, by starting with the head inventory and then following the chain of parent inventories.CThis function does not attempt to download missing inventory files.kThe first argument specifies whether the files are expected to be stored in plain or in bucketed format.=The second argument is the directory of the parent inventory.:The third argument is the directory of the head inventory. dlistPatchesLocalBucketed is similar to listPatchesLocal, but it read the inventory directory under darcsDir in bucketed format. copyPristine copies a pristine tree into the current pristine dir, and possibly copies a clean working copy. The target is read from the passed-in dir/inventory name combination. PcopyPartialsPristine copies the pristine entries for a given list of filepaths. )applyToTentativePristine applies a patch pI to the tentative pristine tree, and updates the tentative pristine hash Given a sequence of patches anchored at the end of the current repository, actually pull them to the end of the repository by removing any patches with the same name and then adding the passed in sequence. Typically callers will have obtained the passed in sequence using  findCommon and friends. Slightly confusingly named: as well as throwing away any tentative changes, revertRepositoryChanges also re-initialises the tentative state. It's therefore used before makign any changes to the repo. So the type should rather be 4... -> Repo rt p wR wU wT -> IO (Repo rt p wR wU wR) grab the pristine hash of _darcs/hash_inventory, and retrieve whole pristine tree, possibly writing a clean working copy in the process. "Used by the commands dist and diff Writes out a fresh copy of the inventory that minimizes the amount of inventory that need be downloaded when people pull from the repository.Specifically, it breaks up the inventory on the most recent tag. This speeds up most commands when run remotely, both because a smaller file needs to be transfered (only the most recent inventory). It also gives a guarantee that all the patches prior to a given tag are included in that tag, so less commutation and history traversal is needed. This latter issue can become very important in large repositories.E8Returns the patches that make the most recent tag dirty. &XOR of all hashes of the patches' metadata. It enables to quickly see whether two repositories have the same patches, independently of their order. It relies on the assumption that the same patch cannot be present twice in a repository. This checksum is not cryptographically secure, see  +http://robotics.stanford.edu/~xb/crypto06b/ .6 o p                6      o p             789None'+-;<=CFQSTV         None'+-;<=CFQSTV R      ! !         None'+-;<=CFQSTV C ";Some common flags that are needed to run rebase jobs. Normally flags are captured directly by the implementation of the specific job's function, but the rebase infrastructure needs to do work on the repository directly that sometimes needs these options, so they have to be passed as part of the job definition. " # $ % & ' ( ) * " # $ % & ' ( ) * " # $ % &GPL-2None'+-;<=CFQSTV F Similar to  (G  )H, exepts it stops execution if file it's going to fetch already exists. .ACreate packs from the current recorded version of the repository. + , - . - , + .None'+-;<=CFQSTV  / 0 1 / 0 1HIJNone'+-;<=CFQSTV  3 4 3 4None'+-;<=CFQSTV vKWThis type allows us to check multiple patch types against the constraints required by  ;LkThis type allows us to check multiple patch types against the constraints required by most repository jobsMaThis is just an internal type to Darcs.Repository.Job for calling runJob in a strongly-typed way 7A RepoJob wraps up an action to be performed with a repository. Because repositories can contain different types of patches, such actions typically need to be polymorphic in the kind of patch they work on. RepoJobO is used to wrap up the polymorphism, and the various functions that act on a RepoJobZ are responsible for instantiating the underlying action with the appropriate patch type. 8The most common RepoJobS; the underlying action can accept any patch type that a darcs repository may use. 9(A job that only works on darcs 1 patches :(A job that only works on darcs 2 patches ;8A job that works on any repository where the patch type p has f p = w.TThis was added to support darcsden, which inspects the internals of V1 prim patches.QIn future this should be replaced with a more abstract inspection API as part of  PrimPatch. @Fapply a given RepoJob to a repository in the current working directory A4apply a given RepoJob to a repository in a given url BXapply a given RepoJob to a repository in the current working directory, taking a lock C]run a lock-taking job in an old-fashion repository. only used by `darcs optimize upgrade`. DTApply a given RepoJob to a repository in the current working directory, taking a lock. If lock not takeable, do nothing. If old-fashioned repository, do nothing. The job must not touch pending or pending.tentative, because there is no call to revertRepositoryChanges. This entry point is currently only used for attemptCreatePatchIndex. EIf the )* of the given repo indicates that we have 2, then  & the repo with the refined type, else  T. NB The amount of types we have to import to make this simple check is ridiculous! 5 6 7 8 9 : ; < = > ? @ A B C D E 7 8 9 : ; < = > 5 6 B C D @ A E ?KN 5 6LOMPQ 7 8 9 : ; < = >None"#$'+-;<=CFQSTV & R working treeSrecorded and pendingTunrecorded paths HReturn all files available under the original working directory regardless of their repo state. Subdirectories get a separator (slash) appended. IReturn all files available under the original working directory that are unknown to darcs but could be added. Subdirectories get a separator (slash) appended. JReturn all files available under the original working directory that are known to darcs (either recorded or pending). Subdirectories get a separator (slash) appended. KReturn all files available under the original working directory that are modified (relative to the recorded state). Subdirectories get a separator (slash) appended. L-Return the available prefs of the given kind. MReturn an empty list.UdTurn an action that creates all possible completions into one that removes already given arguments. H I J K L M H J I K M LVWRSTNone'+-;<=CFQSTV ' N O P Q R S P Q R N O S N ONone'+-;<=CFQSTV .X)This keeps only NonWritable Repo entries.YuThis function fetches all patches that the given repository has with fetchFileUsingCache, unless --lazy is passed. UrwritePatchSet is like patchSetToRepository, except that it doesn't touch the working directory or pristine cache. VJReplace the existing pristine with a new one (loaded up in a Tree object). T U V T V UNone'+-;<=CFQSTV .\           " # $ % & ' / 0 7 8 9 : ; < = > ? @ A B D N O P Q R T U V\ 7 8 9 : ; < = >  B D @ A ? U V    " # $ % & ' / 0 P Q R N O T       None'+-;<=CFQSTV n0 WThe type of the answers to a "shall I [wiggle] that [foo]?" question They are found in a [[KeyPress]] bunch, each list representing a set of answers which belong together \<The dynamic parameters for interactive selection of patches. ^total number of patches _number of already-seen patches `the patches we offer athe user's choices bA PatchSelectionContext> contains all the static settings for selecting patches. See PatchSelectionMZ7The type of the function we use to filter patches when --match is given. lWhen asking about patches, we either ask about them in oldest-first or newest first (with respect to the current ordering of the repository), and we either want an initial segment or a final segment of the poset of patches. oW: ask for an initial segment, first patches first (default for all pull-like commands) p: ask for an initial segment, last patches first (used to ask about dependencies in record, and for pull-like commands with the  --reverse flag). n: ask for a final segment, last patches first. (default for unpull-like commands, except for selecting *primitive* patches in rollback) m: ask for a final segment, first patches first. (used for selecting primitive patches in rollback, and for unpull-like commands with the  --reverse flagIOW: First = initial segment Last = final segment Reversed = start with the newest patch instead of oldest As usual, terminology is not, ahem, very intuitive.[A  l is [` if the segment of patches we ask for is at the opposite end of where we start to present them.\A  l\ is reversed if the order in which patches are presented is latest (or newest) patch first. qA  b for selecting Prim patches. rA  b for selecting full patches ( patches) s A generic  b.]For commands without --match, ] matches all patches^^3 selects patches according to the given match flags tRun a PatchSelection action in the given  b. uThe equivalent of  t for the  darcs log command v3Generates the help for a set of basic and advanced  W groups. wThe keys used by a list of keyPress groups. xKThe function for selecting a patch to amend record. Read at your own risks._This ensures that the selected patch commutes freely with the skipped patches, including pending and also that the skipped sequences has an ending context that matches the recorded state, z, of the repository.`"Runs a function on the underlying  PatchChoices objecta justDone n notes that n! patches have just been processedb)The actual interactive selection process. y Returns a Sealed24 version of the patch we are asking the user about.c6Returns the patches we have yet to ask the user about.dModify the underlying  PatchChoices by some function zreturns Just f if the  y only modifies f, Nothing otherwise. { decide True selects the current patch, and  decide False deselects it. |like  {, but for all patches touching fileeUndecide the current patch. }Focus the next patch. ~Focus the previous patch.fTSplit the current patch (presumably a hunk), and add the replace it with its parts.gPShows the patch that is actually being selected the way the user should see it.hzReturns a list of the currently selected patches, in their original context, i.e., not commuted past unselected patches.i-Prints the list of the selected patches. See h.jSkips all remaining patches.k0The singular form of the noun for items of type p.l.The plural form of the noun for items of type p. $The question to ask about one patch. 4Asks the user about one patch, returns their answer.m,Ask the user what to do with the next patch. 9Shows the current patch as it should be seen by the user.nThe interactive part of  darcs changes .Skips patches we should not ask the user aboutoIThe action bound to space, depending on the current status of the patch.0 W X Y Z [ \ ] ^ _ ` a b c d e j f k i h g l m o n p q r s t u v w x y z { | } ~  0 l m n o p u x t q s r b c  d e f g h i j k [ \ ] ^ _ ` a y } ~ { | z W X Y Z w v pqrstuv W X Y Z \ ] ^ _ ` a b wxyz{| c}~ d e f g h i j kZ l m n o pNone'+-;<=CFQSTV Yspecify whether to ask about dependencies with respect to a particular repository, or not ZTransformer for interactions with a hijack warning state that we need to thread through hOptions for how to deal with the situation where we are somehow modifying a patch that is not our own accept all hijack requests 0prompt once, accepting subsequent hijacks if yes  always prompt 3Get the patch name and long description from one of/the configuration (flags, defaults, hard-coded)an existing log filestdin (e.g. a pipe) a text editorFIt ensures the patch name is not empty nor starts with the prefix TAG.^The last result component is a possible path to a temporary file that should be removed later. 5Run a job that involves a hijack confirmation prompt.See   for initial values gUpdate the metadata for a patch. This potentially involves a bit of interactivity, so we may return Nothing= if there is cause to abort what we're doing along the way  getAuthorX tries to return the updated author for the patch. There are two different scenarios:Z[explicit] Either we want to override the patch author, be it by prompting the user (select.) or having them pass it in from the UI ( new_author), or[implicit] We want to keep the original author, in which case we also double-check that we are not inadvertently "hijacking" somebody else's patch (if the patch author is not the same as the repository author, we give them a chance to abort the whole operation) patchname option pipe optionlogfile optionaskLongComment option4possibly an existing patch name and long descriptionchanges to recordhpatch name, long description and possibly the path to the temporary file that should be removed later verb: command name verb: command nameselect: prompt for new auhornew author: explict new authorpatch to update    None'+-;<=CFQSTV    action flags patchesE prints a string representing the action that would be taken if the  --dry-runG option had not been passed to darcs. Then darcs exits successfully. action. is the name of the action being taken, like "push" flags0 is the list of flags which were sent to darcs patches7 is the sequence of patches which would be touched by action. aGiven a repository and two common command options, classify the given list of subpaths according to whether they exist in the pristine or working tree. Paths which are neither in working nor pristine are reported and dropped. The result is a pair of path lists: those that exist only in the working tree, and those that exist in pristine or working. "For each directory in the list of Ms, add all paths under that directory to the list. If the first argument is  ", then include even boring files.MThis is used by the add and remove commands to handle the --recursive option. None'+-;<=CFQSTV  A  1 represents a command like add, record etc. The  parsedFlagsM type represents the options that are passed to the command's implementation A   is a  ' where the options type has been hidden |Set the DARCS_PATCHES and DARCS_PATCHES_XML environment variables with info about the given patches, for use in post-hooks. wSet the DARCS_FILES environment variable to the files touched by the given patch, one per line, for use in post-hooks.}Set some environment variable to the given value, unless said value is longer than 10K characters, in which case do nothing.9 >      None'+-;<=CFQSTV 7  Variant of . Return a string describing the usage of a command, derived from the header (first argument) and the options described by the second argument.;Sequences of long switches are presented on separate lines.  None'+-;<=CFQSTV T Runs the  [ codeThe interactive part of darcs whatsnew status is an alias for whatsnew, with implicit Summary and LookForAdds flags. We override the default description, to include the implicit flags.  None'+-;<=CFQSTV   None'+-;<=CFQSTV *genericObliterateCmd is the function that executes the "obliterate" and "unpull" commands. The first argument is the name under which the command is invoked (unpull or  obliterate).>Get the union of the set of patches in each specified location matchingHead returns the repository up to some tag. The tag t is the last tag such that there is a patch after t that is matched by the user's query.  None'+-;<=CFQSTV   None'+-;<=CFQSTV å Progress of BisectDirection of Bisect trackdownBisect Patch Tree2Functions defining a strategy for executing a test!test only the last recorded statelinear search (with --linear)+exponential backoff search (with --backoff)binary search (with --bisect)#Create Bisect PatchTree from the RLConvert PatchTree back to RLIterate the Patch Tree test commandnumber of patches to skippatches not yet skipped test command  None'+-;<=CFQSTV w  None'+-;<=CFQSTV /  None'+-;<=CFQSTV   None'+-;<=CFQSTV Ɵ  None'+-;<=CFQSTV W  None'+-;<=CFQSTV   None'+-;<=CFQSTV   None'+-;<=CFQSTV ɇ  None'+-;<=CFQSTV ?   None'+-;<=CFQSTV   None'+-;<=CFQSTV C$A list of all valid preferences for _darcsprefsprefs.(name, one line description)  None'+-;<=CFQSTV   None'+-;<=CFQSTV λ  None'+-;<=CFQSTV Given a set of characters and a string, returns true iff the string contains only characters from the set. A set beginning with a caret (^%) is treated as a complementary set.This function checks for  --token-chars on the command-line. If found, it validates the argument and returns it, without the surrounding square brackets. Otherwise, it returns either O or  as explained in .Note: Limitations in the current replace patch file format prevents tokens and token-char specifiers from containing any whitespace.O  ONone"#'+-;<=CFQSTV x 8check is an alias for repair, with implicit DryRun flag.  None'+-;<=CFQSTV makeRemovePatch builds a list of patches to remove the given filepaths. This function does not recursively process directories. The  Recursivee flag should be handled by the caller by adding all offspring of a directory to the files list.PTakes a file path and returns the FL of patches to remove that, wrapped in a  . Returns  y in case the path cannot be removed (if it is not tracked, or if it's a directory and it's not tracked). The three  arguments are the recorded state, the unrecorded state excluding the removal of this file, and the unrecorded state including the removal of this file.  None'+-;<=CFQSTV ~ commit is an alias for recordGCheck user specified patch name is not accidentally a command line flag                                                      None'+-;<=CFQSTV C  None'+-;<=CFQSTV   None'+-;<=CFQSTV *known to darcs, but absent in working copyTakes two filenames (as Subpath), and tries to move the first into/onto the second. Needs to guess what that means: renaming or moving into a directory, and whether it is a post-hoc move.tree of the working directory$tree of recorded and pending changestree of recorded changes    None'+-;<=CFQSTV _ A set of repository paths. g means every path in the repo, it usually originates from an empty list of path arguments. The list of Js is always kept in sorted order with no duplicates and normalised (as in ). This has the nice effect of getting rid of the idiotic "./" that Darcs insists on prepending to repo paths (which can make things like comparing paths returned from different parts of the code base a nightmare).It uses [ for easier compatibility and lists because the number of elements is expected to be small. is isomorphic to  ! but with the opposite semantics.About the name: I like the data constructor names, they are pretty suggestive. The data type name is up for grabs; a possible alternative is AtMost.,This is mostly for conversion to legacy APIsIntersection of two sConvert a list of s to a ."Convert a list of repo paths to a .. Partial function! Use only with repo paths. Convert a  to something that e.g.  takes as parameter. Convert a  to a L. Uses the English module to generate a nicely readable list of file names.'Lift a function transforming a list of  to one that transforms a . Convert a  to a .}Note: Should call this only with paths we get from the repository. This guarantees that they are relative (to the repo dir). Convert a  to a  . Same as  and only here for symmetry. ! !None'+-;<=CFQSTV Take a list of filenames and patches and produce a list of patches that actually touch the given files with a list of touched file names, a list of original-to-current filepath mappings, indicating the original names of the affected files and possibly an error. Additionaly, the function takes a "depth limit" -- maxcount, that could be Nothing (return everything) or "Just n" -- returns at most n patches touching the file (starting from the beginning of the patch list).Note, lazy pattern matching is required to make functions like filterPatchesByNames lazy in case you are only not interested in the first element. E.g.:)let (fs, _, _) = filterPatchesByNames ... +changes is an alias for logmaxcount filenames patchlist ( ) * + + ( * )None'+-;<=CFQSTV  , - , -None'+-;<=CFQSTV y .GThis is designed for use in an atexit handler, e.g. in Darcs.RunCommand . / / .2003 David RoundyGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTV nLThis function performs the actual distribution action itself. NB - it does not_ perform the pre-dist, that should already have completed successfully before this is invoked. 2 Flags/optionsThe path to the repository,An action to perform on the archive contents 0 1 2 0 1 2None'+-;<=CFQSTV Returns the command we should use for diff as a tuple (command, arguments). This will either be whatever the user specified via --diff-command or the default  }. Note that this potentially involves parsing the user's diff-command, hence the possibility for failure with an exception. 3 4 3 4None'+-;<=CDFQSTV &<Similarly for when the function changes all three witnesses.Need this to make X work with a function that changes the last two (identical) witnesses at the same time.uThis part of the help is split out because it is used twice: in the help string, and in the prompt for confirmation.gunescape turns r n " \ into their unescaped form, leaving any other -preceeded characters as they are. 5 5 None'+-;<=CFQSTV *= takes a list of flags and returns the context specified by  Context cP in that list of flags, if any. This flag is present if darcs was invoked with --context=FILE : ; < = > ; < : > =None'+-;<=CFQSTV + ? ?2004, 2007 David RoundyGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTV -L @ A @ A2002-2004 David RoundyGPLdarcs-devel@darcs.net experimentalportableNone'+-;<=CFQSTV /Command options B BNone'+-;<=CFQSTV 4R E*This class is a hack to abstract over pullapply and rebase pullapply.QsendSanitizedEmail sends a sanitized email using the given sendmailcmd It takes  DacrsFlagJ options a file with the mail contents, To:, Subject:, CC:, and mail body C D E F H G I J E F G H I J C D C D E F G H I JNone'+-;<=CFQSTV 5e C L M N O P M L N C O PNone'+-;<=CFQSTV 6E Q R S Q R SNone'+-;<=CFQSTV 7changes is an alias for log T TSafe'+-;<=CFQSTV 8BNone'+-;<=CFQSTV 9 Wurlbody mime typeresult V W X Y V W X YNone'+-;<=CFQSTV ;0POST the patch via HTTPsend patch via email Z ZNone'+-;<=CFQSTV >I [The commands that darcs knows about (e.g. whatsnew, record), organized into thematic groups. Note that hidden commands are also listed here. [ [None'+-;<=CFQSTV ou #A finite map from long switches to Vs. :Result of parsing a defaults line: switch and argument(s). ;Name of a normal command, or name of super and sub command. \-Apply defaults from all sources to a list of s (e.g. from the command line), given the command (and possibly super command) name, and a list of all options for the command.Sources for defaults are"the builtin (hard-coded) defaults,2the defaults file in the user's configuration, and,the defaults file in the current repository.Note that the pseudo command ALLt is allowed in defaults files to specify that an option should be the default for all commands to which it applies.The order of precedence for conflicting options (i.e. those belonging to same group of mutually exclusive options) is from less specific to more specific. In other words, options from the command line override all defaults, per-repo defaults override per-user defaults, which in turn override the built-in defaults. Inside the options from a defaults file, options for the given command override options for the ALL pseudo command.DConflicting options at the same level of precedence are not allowed.Errors encountered during processing of command line or defaults flags are formatted and added as (separate) strings to the list of error messages that are returned together with the resulting flag list. Make a  ; from a possible super command name and a sub command name. Turn a   into a . For a  % concatenate with a space in between.@Parse a list of lines from a defaults file, returning a list of H, given the current working directory, the command name, and a list of  DarcsOption for the command.RIn the result, defaults for the given command come first, then come defaults for ALL commands..We check that matching options actually exist.Wlines matching the command name: the option must exist in the command's option map.lines matching ALLC: there must be at least *some* darcs command with that option.]It is debatable whether these checks are useful. On the one hand they can help detect typos in defaults files. On the other hand they make it difficult to use different versions of darcs in parallel: a default for an option that is only available in a later version will make the earlier version produce an error. Maybe reduce this to a warning?Extract  5s from lines of a defaults file that match the given  . The syntax is & supercmd subcmd [--]switch [args...] ,for (super) commands with a sub command, and # cmd default [--]default [args...] #for normal commands (including the ALL pseudo command).Search an option list for a switch. If found, apply the flag constructor from the option to the arg, if any. The first parameter is the current working directory, which, depending on the option type, may be needed to create a flag from an argument.EFails if (default has argument /= corresponding option has argument).0Get all the longSwitches from a list of options. Build an  from a list of  DarcsOptions.NList of option switches of all commands (except help but that has no options). \ \  None'+-;<=CFQSTV wReturns the working directory for the posthook. For most commands, the first parameter is returned. For the 'get' command, the path of the newly created repository is returned if it is not an ssh url.xChecks if the number of extra arguments matches the number of extra arguments supported by the command as specified in  . Extra arguments are arguments that follow the command but aren't considered a flag. In `darcs push xyz`, xyz would be an extra argument. ] ]None'+-;<=CFQSTV Starting from a list of  Ts, unwrap one level to get a list of command names together with their subcommands.Given a list of (normal) arguments to the help command, produce a list of possible completions for the next (normal) argument. b?Help on each environment variable in which Darcs is interested.This module is responsible for emitting a darcs "man-page", a reference document used widely on Unix-like systems. Manpages are primarily used as a quick reference, or "memory jogger", so the output should be terser than the user manual.Before modifying the output, please be sure to read the man(7) and man-pages(7) manpages, as these respectively describe the relevant syntax and conventions.'The lines of the manpage to be printed. ^ _ ` a b ^ a b ` _      !"##$%&''()*+,-./012 3 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E FGHIJKLMNNOPQRRSTUVWXYZ[\]^_`abcdefghijklmnoppqqrstuvvwxyz{{|}~        !"##$%&'(()*+,-./0123456789:;<=>?@ABCDEFGHIJKJLLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./  0 1 2 3 4 5 6!7!8!9!:!;!<!=!>!?!@!A"B"B"C"D"E"F"G"H"I"J"K"L"M"N"O"P#Q#Q#R#S#T#U#V#W#X#Y#Z#[$\$\$]$^%_%`%a%b%c%d%e%f%g%h%i%j%k%l%m&n&o&p&q&r&s&t&u&v&v&w&x&x&y&z&z&{&{&|&|&}&~&&&&&&&&&&&&&&&&&&&'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(((((((((((((()))))))*****++++,,,,,,,,,,,---------. . . . . .............////// /!/"/#0$0%0&0'0(0)0*0+0,0-0.0/000102030405060708090:0;0<0=0>0?0@0A0B0C0D0E0F0G0H0I0J1K1L1M1N1O1P1Q1R1S1T2U2V2W2X2Y2Z2[2\2]3^3_3`3a3b3c3d3e3f3g3h3ij4k4l4m4n4o4p4q4r5s5t5u5v5w5x6y6z6{6|6}6}6~66666666666677777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777778888888888F888888888888888888888888888888 8 8 8 8 88889999999999999999 9!9"9#9$9%9&9'9(9)9*9+:,:-:.:.:/:0:1:2:3;4;5;6;7;8;9;:;;;<;=;>?@ABCDEF<G<H=I=J=K=L=M=N=O=P=Q=R=S=T>U>V>W>X>Y???Z?[?\?]?^?_?`?a?)?+?b?c?d?W?V?U?e?f?g?h?i?j?k?l?m?n?o?p?q?r?s?t?u?v?w?x?y?z?{?|?}?~???????????????J?K???????;?=?5?7?8?:????????????????????????????????????????????????????????????????????????A?%?'??,??????????????????????????>?????????????????????@@@@@ @ @ @@ @ @@@@@@@@@@@@@@ABBBB C!C"C#C$C%C&C'C(C)C*C+C,C-C.D/D0D1D2D3D4DD5D6D7E8E8E9E:E;E<E=EE>E?E@EAEAEBECEDEEEFEGEHEIFJFKFLFMFNFOFPFQFRFSFTFUFUFVFWFXFYFZF[F\F]F^F_F`FaFbFcFdFeFfGgGhGiGjGkGlGmGnGoGpGqGrGsGtGuGvGwGxGyGzG{G|G}G~GGGGGGGGGGGGHHHHHHHHHHIIIIIIJJJJJJJJJJJJJJJJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKLLLLLMMMMMMMNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO O O O O OOOOOOOOOOOOPPPPPPP P!P"P#P$P%P&P'P(P)P*P+P,P-P.P/P0P1P2P3P4P5P6P7Q8R9S:S;S<S=S>S?S@TATBTCTDTETFTGTHTITJTKTLTMTNTOTPUQURVSVTVUWVX#X XWXXXYXZXWX[X X\X]X^X_X`X-X/X0X1X2X3X?X>XaXbXcXdX@X,YeY8Z9[K\Q]f]g]h]i]j]k]l]m]n]o]p]q]r]s^t^u_v_v_w_x_y_z_{_|`}`~```aaaaaaaaaaaaaaaaaaaaaaaabbbbccccccccccccccccccccccddddddddddddddLdMdNdOdPeffffffgg;gggghhhhhShThhhUiiiiVjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkkkkkkkkkk k k k k kklllllllllllllllll l!m"m#m$m%m&m'm(m)m*m+m,m-m.m/n0n1n%n2n3n&n'n4n5n6n7n8n9n:n;n<n=n>n?n@nAnBnCnDoEoFoGoHoIoJoKoLoMoooooNoooOoPoQoRoSoToUoVoWoXoYoZo[o\o]o^o_o`oaobocodoeofogohoiojpkplpmpnpopppqprprppsptpupvpwpxpypzp{p|p}p~ppppppppppppppppppppppppppqqqqqqqqqqqqqqqqqqqrrrrrssstuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvvvvvvvvvwxxxxxxxxxxxxx x x x y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y !y "y #y $y %y &y 'z#z#z (zTzUzzzzzez )zzz?z>z@zzzKz0z1z-z/zSzQz3z2z9zV{#{#{ ({T{U{{{{{e{ ){{{?{>{@{{{K{0{1{-{/{S{Q{3{2{9{V| *| +| ,} -} .~ / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | }qsvwrtu}~y{ ~        |   X ggh                             \]  Z[                              ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  s                =                                 ! " # $X % & ' ( ) *  + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~           LJ *                                    ! " # $ % & ' ( ) * + , - . / 0 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F F G H I J K L M N N O P Q R S T U V W X Y Z Z [   \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x x y z { | } ~  6 A                    !  )                               ! " # $ % & ' ( ) * + , ' - . / 0 1 2 3 4 4 5 6 7 8 7 9 / : / ; / < = > = ? @ A @ B @ C @ D @ E @ F @ G @ H @ I @ J @ K 1 L M 1 L N 1 L O P Q P R P S P T P U P V P W P X P Y P Z P [ P \ P ] P ^ P _ P ` P a = b = c = d = e = f = g = h = i = j = k = l = m / n / o / p / q / r / / s / t u v u w u x u y u z u { u | u } 1 L ~ 1 L  1 L 1 L 1 L 1 L 1 L 1 L  = = P P P P P P P P P P P P P P P = = = = = =  / / / / / /    / / / / 1  1  1  1  1  1  1   / / / 1  1  1  1  = 1  1     /       = = = = =      4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4! 4" 4# 4$ 4% 4& 4' 4()*)+ 7, 7- u. // /0 /1 /2 /3 /4 /5 /678797: 1 L; 1 L< 1 L= > ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^V_`aabcdefghijhiklmnopqrstuvwxyz{|}~                           !!!!!! T $ %000000000000*3 44566666666666 /7A77777777777777889999 99999;;=======================I==== = == = @ @@@@@@GKKKKQUUUUUUU U!U{a"a#a$dGdHd%d&dBdCdDdEf'f'h(h h)j*j+j,n-n.n/n0o1o2o3o4o4pkr5r6u7u8u9u9u:u;u;u<v=v>x?x?x@x UxxAxBxCxFx=yDyEyFyGyHyIyDyEJKLMNOPQRSTUVWXYZ[\]^_`abccdefgh i"jklmnopqrsrtuvwxyz{|}~ I f g h       ; !"#$%&'()*+,-./01234567 89:;<=>?@ABCDEFGHFIJKLMNOPQRSTKUUVWXYZ[\]^<_`abcdefghijklmnoXpYqTrr , [  - !  ) sttuvwxy zz{ |}~#darcs-2.14.0-HRQNsSArFyaJGyUFlDXTzvDarcs.Util.PrinterDarcs.Util.RatifiedDarcs.Util.ByteStringDarcs.Util.WorkaroundDarcs.Util.FileDarcs.Util.DateTimeDarcs.Patch.FormatDarcs.Patch.RepoTypeDarcs.Patch.TypeDarcs.Patch.Witnesses.Unsafe Darcs.PreludeDarcs.Patch.Witnesses.EqDarcs.Patch.RegCharsDarcs.Patch.TokenReplaceDarcs.UI.Options.IsoDarcs.UI.Options.CoreDarcs.Util.AtExitDarcs.Util.CommandLineDarcs.Util.Download.RequestDarcs.Util.EncodingDarcs.Util.EnglishDarcs.Util.GlobalDarcs.Util.Diff.MyersDarcs.Util.Diff.PatienceDarcs.Util.DiffDarcs.Patch.ReadMonadsDarcs.Repository.FlagsDarcs.Util.HashDarcs.Util.IsoDateDarcs.Util.DateMatcherDarcs.UI.EmailDarcs.Util.Printer.ColorDarcs.Util.ProgressDarcs.Util.ExecDarcs.Util.PromptDarcs.Util.ShowDarcs.Patch.Witnesses.ShowDarcs.Patch.Witnesses.SealedDarcs.Patch.Witnesses.OrderedDarcs.Patch.Witnesses.WZipperDarcs.Patch.InvertDarcs.Patch.InspectDarcs.Patch.DebugDarcs.Patch.CommuteFnDarcs.Patch.CommuteDarcs.Patch.PermutationsDarcs.Patch.MergeDarcs.Patch.ChoicesDarcs.Patch.BracketedDarcs.Util.TextDarcs.Util.URLDarcs.Util.SignalHandlerDarcs.Util.ExceptionDarcs.Util.SshDarcs.Util.PathDarcs.Util.TreeDarcs.Util.Tree.MonadDarcs.Patch.MonadProgressDarcs.Util.Tree.HashedDarcs.Util.Tree.PlainDarcs.Util.IndexDarcs.Util.CompatDarcs.UI.Options.FlagsDarcs.UI.Options.UtilDarcs.UI.Options.MarkdownDarcs.UI.Commands.Util.TreeDarcs.Patch.SummaryDataDarcs.Patch.Read#Darcs.Patch.Prim.FileUUID.ObjectMapDarcs.Patch.Index.TypesDarcs.Patch.ApplyMonadDarcs.Patch.ApplyDarcs.Patch.TouchesFilesDarcs.Patch.ShowDarcs.Patch.InfoDarcs.Patch.FileHunkDarcs.Patch.ViewingDarcs.Patch.RepairDarcs.Patch.Prim.ClassDarcs.Patch.Prim.V1.CoreDarcs.Patch.Prim.V1.ReadDarcs.Patch.Prim.V1.DetailsDarcs.Patch.Prim.V1.ShowDarcs.Patch.Prim.V1.CommuteDarcs.Patch.Prim.V1.CoalesceDarcs.Patch.Prim.V1.ApplyDarcs.Patch.Prim.V1Darcs.Patch.Prim.FileUUID.CoreDarcs.Patch.Prim.FileUUID.Read!Darcs.Patch.Prim.FileUUID.Details!Darcs.Patch.Prim.FileUUID.Commute"Darcs.Patch.Prim.FileUUID.CoalesceDarcs.Patch.V1.CoreDarcs.Patch.V1.ShowDarcs.Patch.SplitDarcs.Patch.EffectDarcs.Patch.V2.NonDarcs.Patch.Bracketed.InstancesDarcs.Patch.ConflictDarcs.Patch.V1.CommuteDarcs.Patch.V1.ReadDarcs.Patch.SummaryDarcs.Patch.Prim.FileUUID.ShowDarcs.Patch.Prim.FileUUID.ApplyDarcs.Patch.Prim.FileUUIDDarcs.Patch.NamedDarcs.Patch.Rebase.NameDarcs.Patch.Rebase.FixupDarcs.Patch.Rebase.ItemDarcs.Patch.Rebase.ContainerDarcs.Patch.Named.WrappedDarcs.Patch.PatchInfoAndDarcs.Patch.SetDarcs.Patch.RebaseDarcs.Patch.ProgressDarcs.Patch.MatchableDarcs.Patch.Rebase.ViewingDarcs.Patch.Index.MonadDarcs.Patch.ApplyPatchesDarcs.Patch.AnnotateDarcs.Patch.V2.RepoPatchDarcs.Patch.V2.PrimDarcs.Patch.V1.PrimDarcs.Patch.V1.ApplyDarcs.Patch.V1.ViewingDarcs.Patch.RepoPatchDarcs.Patch.V2Darcs.Patch.V1Darcs.Patch.DependsDarcs.Patch.BundleDarcs.Patch.DummyDarcs.Patch.MatchDarcs.UI.Options.MatchingDarcs.UI.Options.AllDarcs.UI.OptionsDarcs.Util.LockDarcs.UI.ExternalDarcs.UI.PrintPatchDarcs.Util.DownloadDarcs.Util.ExternalDarcs.Repository.OldDarcs.Repository.FormatDarcs.Repository.CacheDarcs.Repository.PrefsDarcs.UI.FlagsDarcs.UI.CommandsAuxDarcs.Repository.DiffDarcs.Repository.ResolutionDarcs.Repository.ApplyPatchesDarcs.Repository.InventoryDarcs.Repository.InternalTypesDarcs.Repository.PatchIndexDarcs.Repository.HashedIODarcs.Repository.PendingDarcs.Repository.StateDarcs.Repository.WorkingDarcs.Repository.IdentifyDarcs.Repository.HashedDarcs.Repository.TestDarcs.Repository.RepairDarcs.Repository.RebaseDarcs.Repository.PacksDarcs.Repository.MergeDarcs.Repository.MatchDarcs.Repository.JobDarcs.UI.CompletionDarcs.Repository.CreateDarcs.Repository.CloneDarcs.UI.SelectChangesDarcs.UI.PatchHeaderDarcs.UI.Commands.UtilDarcs.UI.CommandsDarcs.UI.UsageDarcs.UI.Commands.WhatsNewDarcs.UI.Commands.UnrevertDarcs.UI.Commands.UnrecordDarcs.UI.Commands.TransferModeDarcs.UI.Commands.TestDarcs.UI.Commands.TagDarcs.UI.Commands.ShowTagsDarcs.UI.Commands.ShowRepo Darcs.UI.Commands.ShowPatchIndexDarcs.UI.Commands.ShowIndexDarcs.UI.Commands.ShowFiles"Darcs.UI.Commands.ShowDependenciesDarcs.UI.Commands.ShowContentsDarcs.UI.Commands.ShowAuthorsDarcs.UI.Commands.ShowDarcs.UI.Commands.SetPrefDarcs.UI.Commands.RollbackDarcs.UI.Commands.RevertDarcs.UI.Commands.ReplaceDarcs.UI.Commands.RepairDarcs.UI.Commands.RemoveDarcs.UI.Commands.RecordDarcs.UI.Commands.PushDarcs.UI.Commands.OptimizeDarcs.UI.Commands.MoveDarcs.UI.Commands.MarkConflictsDarcs.UI.Commands.LogDarcs.UI.Commands.InitDarcs.UI.Commands.GZCRCsDarcs.UI.Commands.DistDarcs.UI.Commands.DiffDarcs.UI.Commands.ConvertDarcs.UI.Commands.CloneDarcs.UI.Commands.AnnotateDarcs.UI.Commands.AmendDarcs.UI.Commands.AddDarcs.UI.ApplyPatchesDarcs.UI.Commands.PullDarcs.UI.Commands.ApplyDarcs.UI.Commands.RebaseDarcs.Util.Download.HTTPDarcs.UI.Commands.SendDarcs.UI.TheCommandsDarcs.UI.DefaultsDarcs.UI.RunCommandDarcs.UI.Commands.Help DarcsFlagSystem.Console.GetOptOptDescr DarcsOptDescr Data.FunctorFunctorsetEnvCautiouslyDarcs.Util.Download.CurlTreefilterDarcsUtil.Path AbsolutePathwritePatchIfNecessary readFileNameDarcs.Patch.Prim Darcs.PatchRebasemaxCountDarcs.Repository usageInfoFilePath normaliseVersionbaseData.Semigroup<> System.IOreadFileGHC.IO.Handle.Text hGetContentsbytestring-0.10.8.2Data.ByteString intercalatedirectory-1.3.0.2System.DirectorygetCurrentDirectorygetDirectoryContents renameFile time-1.8.0.2Data.Time.Clock.POSIXgetCurrentTime unix-2.7.2.2System.Posix.SignalsinstallHandler raiseSignalsigTERMsigPIPEsigINTsigHUPsigALRMsigABRTSignal CatchInfoOnce CatchInfo CatchOnceCatchIgnoreDefaultHandlerFileNameFormat OldFormat NewFormat UserFormat ListFormatListFormatDefault ListFormatV1 ListFormatV2PatchListFormatpatchListFormat$fEqFileNameFormat$fShowFileNameFormat SRepoType IsRepoTypesingletonRepoType RebaseTypeOfRepoType rebaseType IsRebaseType SRebaseType SIsRebase SNoRebase RebaseTypeIsRebaseNoRebase$fIsRebaseTypeNoRebase$fIsRebaseTypeIsRebase$fIsRepoTypeRepoType PatchType patchType unsafeCoercePunsafeCoercePStartunsafeCoercePEndunsafeCoerceP2unsafeCoerceP1 impossiblebugEq2 unsafeCompare=\/==/\=EqCheckIsEqNotEqisIsEq $fShowEqCheck $fEqEqCheckregChars tryTokReplaceforceTokReplaceannotateReplace breakToTokens defaultToks IsoFunctorimapIsoundercps PrimOptSpecOptSpecounparseoparseocheckodescoid^ onormalise defaultFlagsoimapoappendoempty parseFlags?$fIsoFunctorOptSpec$fMonoidOptSpec$fSemigroupOptSpecatexit withAtexitparseCmd addUrlencoded toSeconds startOfTimeformatDateTime parseDateTime fromClockTimeConnectionErrorCouldNotResolveHostCouldNotConnectToServerOperationTimeoutQUrlState inProgress waitToStart pipeLength randomJunk UrlRequesturlfilecachablepriorityCachable UncachableMaxAgePriorityHighLowreadQaddUsingPriorityinsertQpushQdeleteQelemQemptyQnullQ $fEqPriority$fShowCachable $fEqCachable$fEqConnectionError$fReadConnectionError$fShowConnectionErrorencodedecode encodeUtf8 decodeUtf8ThisPronounItNoun Countablepluralsingular englishNum andClauses orClausesitemizepresentParticiple capitalize$fCountableNoun$fCountablePronoun$fCountableThis setDebugMode whenDebugMode withDebugMode debugMessage debugFail putTimingsetTimingsMode timingsMode addCRCWarninggetCRCWarningsresetCRCWarnings addBadSourcegetBadSourcesList isBadSourceaddReachableSourceisReachableSourcedarcsdirdefaultRemoteDarcsCmddarcsLastMessagedarcsSendMessagedarcsSendMessageFinal FileSegment readIntPS dropSpace breakSpaceisFunkyhashPSsubstrPS breakFirstPS breakLastPSlinesPS unlinesPS#prop_unlinesPS_linesPS_left_inverseprop_linesPS_lengthprop_unlinesPS_length gzDecompressisGZFile gzReadFilePS gzWriteFilePSgzWriteFilePSs gzWriteHandle gzReadStdin readSegment mmapFilePS fromPS2Hex fromHex2PSpropHexConversionbetweenLinesPSspec_betweenLinesPSisAsciiunpackPSFromUTF8packStringToUTF8 decodeLocale encodeLocalePArray getChangesgetSliceshiftBoundariesinitPaLen DiffAlgorithm PatienceDiff MyersDiff$fEqDiffAlgorithm$fShowDiffAlgorithmParserMparselexChar lexStringstringlexEofmyLex'anyChar endOfInputcharint skipSpace skipWhiletakeTill takeTillChartakelinesStartingWithlinesStartingWithEndingWithoptionchoice checkConsumes parseStrictly$fAlternativeSM$fApplicativeSM $fFunctorSM $fMonadPlusSM $fParserMSM $fMonadSM HookConfigcmdprompt HooksConfigprepost PatchFormat PatchFormat1 PatchFormat2 ForgetParentYesForgetParentNoForgetParentWithWorkingDir NoWorkingDir WantGuiPauseYesWantGuiPauseNoWantGuiPauseWorkRepo WorkRepoDirWorkRepoPossibleURLWorkRepoCurrentDir ExternalMergeYesExternalMergeNoExternalMergeAllowConflictsNoAllowConflictsYesAllowConflictsYesAllowConflictsAndMark CloneKind LazyClone NormalClone CompleteClone ScanKnownScanAll ScanBoringUseIndex IgnoreIndex SetDefault YesSetDefault NoSetDefault RemoteRepos LeaveTestDirYesLeaveTestDirNoLeaveTestDirSetScriptsExecutableYesSetScriptsExecutableNoSetScriptsExecutableRunTest YesRunTest NoRunTest IncludeBoringYesIncludeBoringNoIncludeBoring LookForMovesYesLookForMovesNoLookForMovesLookForReplacesYesLookForReplacesNoLookForReplaces LookForAddsYesLookForAdds NoLookForAddsUMaskYesUMaskNoUMaskDryRun YesDryRunNoDryRunUseCache YesUseCache NoUseCache UpdateWorkingYesUpdateWorkingNoUpdateWorkingReorder NoReorder RemoteDarcsDefaultRemoteDarcsWithPatchIndex YesPatchIndex NoPatchIndex Compression NoCompressionGzipCompression VerbosityQuietNormalVerbosityVerbose remoteDarcs $fEqVerbosity$fShowVerbosity$fEqCompression$fShowCompression$fEqWithPatchIndex$fShowWithPatchIndex$fEqRemoteDarcs$fShowRemoteDarcs $fEqReorder$fEqUpdateWorking$fShowUpdateWorking $fEqUseCache$fShowUseCache $fEqDryRun $fShowDryRun $fEqUMask $fShowUMask$fEqLookForAdds$fShowLookForAdds$fEqLookForReplaces$fShowLookForReplaces$fEqLookForMoves$fShowLookForMoves$fEqIncludeBoring$fShowIncludeBoring $fEqRunTest $fShowRunTest$fEqSetScriptsExecutable$fShowSetScriptsExecutable$fEqLeaveTestDir$fShowLeaveTestDir$fEqRemoteRepos$fShowRemoteRepos$fEqSetDefault$fShowSetDefault $fEqUseIndex$fShowUseIndex $fEqScanKnown$fShowScanKnown $fEqCloneKind$fShowCloneKind$fEqAllowConflicts$fShowAllowConflicts$fEqExternalMerge$fShowExternalMerge $fEqWorkRepo$fShowWorkRepo$fEqWantGuiPause$fShowWantGuiPause$fEqWithWorkingDir$fShowWithWorkingDir$fEqForgetParent$fShowForgetParent$fEqPatchFormat$fShowPatchFormatSHA1HashSHA256NoHash encodeBase16 decodeBase16sha256 sha256sumrawHashmatchsha1Xorsha1zero sha1shortsha1PS showAsHex $fBinarySHA1 $fShowSHA1 $fShowHash$fEqHash $fOrdHash $fReadHash $fDataHash$fEqSHA1 $fOrdSHA1 MCalendarTimemctYearmctMonthmctDaymctHourmctMinmctSec mctPicosecmctWDaymctYDay mctTZNamemctTZmctIsDSTmctWeek TimeInterval readUTCDatecleanLocalDate getLocalTzreadUTCDateOldFashioned parseDateshowIsoDateTimegetIsoDateTimeiso8601Intervaliso8601DurationenglishDateTimeenglishInterval englishLasttoMCalendarTimeunsafeToCalendarTime addToMCalsubtractFromMCal resetCalendar unsetTime$fShowMCalendarTime DateMatcherDMparseDateMatcher getMatcherstestDate testDateAtColorBlueRedGreenCyanMagentaPrinter Printers'PrinterscolorP invisiblePhiddenP userchunkPdefP lineColorT lineColorSDocunDoc PrintableSPSBothspacenewlineminusplus backslashlparenrparenparenserrorDoc putDocWith putDocLnWithputDocputDocLn ePutDocLn hPutDocWith hPutDocLnWithhPutDoc hPutDocLn hPutDocCompr debugDocLn renderStringrenderStringWithrenderPS renderPSs renderPSWith renderPSsWithprefix prefixLinesinsertBeforeLastline lineColor hiddenPrefix unsafeBothunsafeBothText packedStringunsafePackedString invisiblePS userchunkPS unsafeChartext unsafeText invisibleText hiddenText userchunkblueTextredText greenText magentaTextcyanText colorTextwrapText printableinvisiblePrintablehiddenPrintableuserchunkPrintablesimplePrinters simplePrinterinvisiblePrinteremptydoc<+>$$vcatvsephcathsepquoted $fMonoidDoc$fSemigroupDoc $fIsStringDoc formatHeader makeEmail readEmailprop_qp_roundtriptraceDoc assertDocshowDoc fancyPrintersenvironmentHelpColorenvironmentHelpEscapeWhiteenvironmentHelpEscape beginTedious endTedious tediousSizeminlist progressListprogressprogressKeepLatest finishedOne finishedOneIOsetProgressModewithoutProgress ExecExceptionRedirectAsIsNullFileStdout RedirectsrenderExecExceptionexecexecInteractivewithoutNonBlockreadInteractiveProcess$fShowExecException$fExceptionExecException$fShowRedirect PromptConfigpPromptpBasicCharacterspAdvancedCharacterspDefaultpHelpaskUseraskEnteraskUserListItem promptYorn promptChar BSWrapperappPrec$fShowBSWrapperShow2 showDict2Show1 showDict1ShowDict ShowDictClassShowDictRecord showsPrecDshowD showListD showsPrec1show1 showsPrec2show2showOp2GapemptyGapfreeGapjoinGap FreeRight FRInternalFreeLeft FLInternalStepped unSteppedPolyunPoly FlippedSealSealed2Sealedsealseal2flipSeal unsafeUnsealunsafeUnsealFlipped unsafeUnseal2unsealunsealMliftSMmapSeal mapFlippedunseal2mapSeal2 unsealFlipped unFreeLeft unFreeRight $fShowSealed $fEqSealed $fShowSealed2$fGapFreeRight $fGapFreeLeft:||:Fork:/\::\/:RL:<:NilRLFL:>:NilFL:>nullFLnullRL filterOutFLFL filterOutRLRLfilterRL+>++<+ reverseFL reverseRLconcatFLconcatRLspanFLspanFL_M splitAtFL splitAtRLbunchFLfoldFL_MallFLanyFLallRLanyRLfoldlFLfoldlRLmapFL_FL mapFL_FL_M sequenceFL_ zipWithFLmapRL_RLmapFLfilterFLmapRLlengthFLlengthRLisShorterThanRL snocRLSealedtoFL dropWhileFL dropWhileRLeqFLeqFLRev eqFLUnsafe+>>++<<+initsFL $fShow2:>$fEq:>$fEq2:>$fShow:> $fShow1:> $fShow2FL $fShow1FL$fShowFL $fShow2RL $fShow1RL$fShowRL $fShow2:\/: $fShow:\/: $fShow2:/\: $fShow:/\:FZipper flToZippernullFZlengthFZfocusclownsjokers rightmostrightleftmostlefttoEndtoStartInvertinvertinvertFLinvertRL $fInvert:> $fInvertRL $fInvertFL PatchInspectlistTouchedFiles hunkMatches$fPatchInspectRL$fPatchInspectFL PatchDebugpatchDebugDummy$fPatchDebugRL$fPatchDebugFLMergeFnTotalCommuteFn CommuteFn commuterIdRL commuterIdFL mergerIdFLtotalCommuterIdFL commuterFLId commuterRLIdtotalCommuterFLIdtotalCommuterFLFLCommutecommute commuteRLFL commuteRL commuteFLcommuteFLorComplain selfCommuter $fCommuteRL $fCommuteFL partitionFL partitionRLcommuteWhatWeCanFLgenCommuteWhatWeCanFLcommuteWhatWeCanRLgenCommuteWhatWeCanRL removeCommonremoveFLremoveRLremoveSubsequenceFLremoveSubsequenceRLsimpleHeadPermutationsFLheadPermutationsFLheadPermutationsRLpartitionConflictingFLinverseCommuter$fEq2RL$fEq2FLMergemerge selfMergermergeFL naturalMergeprop_mergeSymmetricprop_mergeCommute $fMergeRL $fMergeFLSlotInFirstInMiddleInLast PatchChoices LabelledPatchLabellabel getLabelIntunLabel patchChoices labelPatchesmkPatchChoicesseparateFirstFromMiddleLastseparateFirstMiddleFromLast getChoices refineChoices patchSlotforceMatchingFirst forceFirsts forceFirstselectAllMiddlesforceMatchingLast forceLasts forceLast forceMiddlemakeEverythingLatermakeEverythingSooner substitute$fMergeLabelledPatch$fPatchInspectLabelledPatch$fCommuteLabelledPatch$fInvertLabelledPatch$fEq2LabelledPatch$fEq2PatchChoice$fMergePatchChoice$fPatchInspectPatchChoice$fCommutePatchChoice $fEqLabel BracketedFL Bracketed SingletonBracedParens unBracketed unBracketedFL mapBracketedmapBracketedFLFL$fPatchListFormatBracketedsentence formatText formatParas formatPara breakCommandchompTrailingNewlinequotepathlistshowCommandLine SshFilePathsshUhostsshReposshFile isRelative isAbsoluteisValidLocalPath isHttpUrlisSshUrl isSshNopath splitSshUrl sshFilePathOf setExecutable stdoutIsAPipewithSignalsHandledcatchNonSignalcatchInterrupt tryNonSignalwithSignalsBlocked$fExceptionSignalException$fShowSignalExceptioncatchall firstJustIO clarifyErrorsprettyException prettyErrordieSSHCmdSSHSCPSFTP SshSettingssshscpsftpwindows defaultSshcopySSHtransferModeHeadergetSSHenvironmentHelpSshenvironmentHelpScpenvironmentHelpSshPort$fShowSshSettings$fEqSshSettings AnchoredPathNameAbsoluteOrRemotePathAbsolutePathOrStdSubPath FilePathLike toFilePath FilePathOrURLtoPathFileNamefp2fnfn2fpfn2psps2fnsp2fn encodeWhite decodeWhiteencodeWhiteNamedecodeWhiteNameownName superName breakOnDirnormPathisParentOrEqOfmovedirfilename makeSubPathOf simpleSubPath isSubPathOf doesPathExist ioAbsolute makeAbsolute rootDirectorymakeAbsoluteOrStdstdOutioAbsoluteOrStduseAbsoluteOrStdioAbsoluteOrRemoteisRemotesetCurrentDirectoryisMaliciousPathisMaliciousSubPath filterPathsfilterFilePathsgetUniquePathName floatSubPathisPrefix appendPathcatPathsparentparents anchorPathflattenmakeName floatPath anchoredRootreplacePrefixPath appendToNameunsafeMakeName eqAnycase$fBinaryFileName$fShowFileName$fFilePathOrURLFileName$fFilePathLikeFileName $fShowSubPath$fFilePathLikeSubPath$fFilePathOrURLSubPath$fShowAbsolutePath$fFilePathLikeAbsolutePath$fFilePathOrURLAbsolutePath$fShowAbsolutePathOrStd$fShowAbsoluteOrRemotePath#$fFilePathOrURLAbsoluteOrRemotePath$fFilePathLike[]$fCharLikeChar$fFilePathOrURL[] $fEqFileName $fOrdFileName $fEqSubPath $fOrdSubPath$fEqAbsolutePath$fOrdAbsolutePath$fEqAbsolutePathOrStd$fOrdAbsolutePathOrStd$fEqAbsoluteOrRemotePath$fOrdAbsoluteOrRemotePath$fEqName $fShowName $fOrdName$fEqAnchoredPath$fShowAnchoredPath$fOrdAnchoredPath FilterTreeitemstreeHashItemTypeTreeTypeBlobTypeTreeItemSubTreeStubBlob listImmediateitemHashitemType emptyTree emptyBlobmakeBlob makeBlobBSmakeTreemakeTreeWithHashlookupfindfindFilefindTreelist expandUpdateexpand expandPath checkExpandrestrictreadBlobzipCommonFileszipFileszipTrees diffTrees modifyTreeupdateSubtrees updateTreepartiallyUpdateTreeoverlayaddMissingHashes$fFilterTreeTreem$fShowItemType $fEqItemType $fOrdItemTypeTreeRW writeFilecreateDirectoryunlinkrenamecopyTreeROcurrentDirectory withDirectoryexistsdirectoryExists fileExistsTreeIO TreeMonad TreeStatetree initialState runTreeMonadvirtualTreeMonad virtualTreeIO replaceItemfindM findTreeM findFileM $fTreeRORWST $fTreeRWRWST MonadProgressrunProgressActionsProgressActionpaAction paMessage paOnErrorsilentlyRunProgressActions$fMonadProgressRWSTdecodeDarcsHashdecodeDarcsSize darcsLocation darcsTreeHashdarcsUpdateHashesdarcsAddMissingHashesreadDarcsHashedDirreadDarcsHashedreadDarcsHashedNosizewriteDarcsHashed hashedTreeIOwithCurrentDirectory getFileStatusdoesDirectoryReallyExistremoveFileMayNotExist osxCacheDir xdgCacheDirgetRecursiveContentsgetRecursiveContentsFullPath readPlainTreewritePlainTreeIndex updateIndex listFileIDs readIndexupdateIndexFromindexFormatValid getFileIDalignxlate32xlate64$fFilterTreeIndexMIO $fShowItem canonFilename mkStdoutTemp maybeRelinksloppyAtomicCreate atomicCreate ExactVersion ListCommandsHelp ListOptionsNoTestTestOnlyChangesToFilesChangesToAllFilesTimingsDebug DebugHTTPToCcOutputOutputAutoNameMailSubject InReplyToCharset SendmailCmdAuthor SelectAuthor PatchNameOnePatch SeveralPatchOneHash AfterPatch UpToPatch AfterHashUpToHashTagNameLastNMaxCountPatchIndexRange NumberPatchesOneTagAfterTagUpToTag GenContextContextCountLogFile RmLogFile DontRmLogFileDistNameDistZipAll Recursive NoRecursiveMinimize NoMinimize RestrictPathsDontRestrictPathsAskDeps NoAskDeps IgnoreTimesDontIgnoreTimes UseMyersDiffUsePatienceDiff IntersectionUnion ComplementSignSignAsNoSignSignSSLHappyForwardingNoHappyForwardingVerify VerifySSLRemoteDarcsOptEditDescriptionNoEditDescriptionToksEditLongCommentNoEditLongCommentPromptLongCommentKeepDate NoKeepDate MarkConflicts SkipConflictsBoring SkipBoring AllowCaseOnlyDontAllowCaseOnlyAllowWindowsReservedDontAllowWindowsReserved DontGrabDepsDontPromptForDependenciesPromptForDependenciesCompress NoCompress UnCompress WorkRepoUrl RemoteRepoNewRepo NotInRemoteReplyApplyAsMachineReadable HumanReadablePipe InteractiveDiffCmdSummary NoSummary PauseForGui NoPauseForGuiUnified NonUnifiedReverseForwardCompleteLazy DiffFlags XMLOutput ForceReplace OnePatternSeveralPattern AfterPattern UpToPatternNonApply NonVerifyNonForceDisableDontSetScriptsExecutableOnceLinearBackoffBisectHashed UseFormat1 UseFormat2UseNoWorkingDir UseWorkingDirSiblingFilesNoFiles Directories NoDirectoriesPending NoPending PosthookCmd NoPosthook AskPosthook RunPosthook PrehookCmd NoPrehook AskPrehook RunPrehook StoreInMemory ApplyOnDiskNoHTTPPipeliningPacksNoPacksNoCacheAllowUnrelatedReposCheckRepair JustThisRepo ReadMarks WriteMarksNullFlagNoAmendUnrecord AmendUnrecordPatchIndexFlagNoPatchIndexFlag EnumPatches NoEnumPatches $fEqDarcsFlag$fShowDarcsFlag RawOptSpecRawNoArg RawStrArg RawAbsPathArgRawAbsPathOrStdArgRawOptAbsPathArgPrimDarcsOptionFlagnoArgstrArg optStrArg absPathArgabsPathOrStdArg optAbsPathArg withDefault singleNoArg singleStrArgsingleAbsPathArg multiStrArgmultiOptStrArgmultiAbsPathArg deprecated$fIsoFunctorRawOptSpecoptionsMarkdowntreeHasAnycasetreeHas treeHasDir treeHasFileSummOpSummAddSummRmSummMod SummDetail SummAddDir SummRmDirSummFileSummMvSummNone $fOrdSummOp $fEqSummOp$fOrdSummDetail$fEqSummDetail ReadPatch readPatch'readPatchPartial readPatch bracketedFLpeekfor $fReadPatchRL $fReadPatchFL$fReadPatchBracketed ObjectMap getObject putObject listObjectsObject Directory DirContentLocationLUUID FileContentisBlob isDirectory$fEqUUID $fOrdUUID $fShowUUID $fEqLocation$fShowLocationPatchModPTouch PCreateFile PCreateDirPRenamePRemovePInvalidPDuplicateTouchPatchIdPIDpatchIdFileIdcnamecount showFileId pid2stringshortzero$fBinaryFileId$fBinaryPatchId $fEqFileId $fShowFileId $fOrdFileId $fShowPatchId $fOrdPatchId $fEqPatchId$fShowPatchMod $fEqPatchMod$fFunctorPatchMod ApplyMonadApplyMonadBase nestedApply liftApply getApplyStateApplyMonadTreemDoesDirectoryExistmDoesFileExist mReadFilePSmCreateDirectorymRemoveDirectory mCreateFile mRemoveFilemRename mModifyFilePS mChangePrefApplyMonadStateApplyMonadStateOperationsApplyMonadTransApplyMonadOver runApplyMonadToTreetoTree withFileNames withFiles $fToTreeTree$fApplyMonadTreeRWST$fApplyMonadStateTree$fApplyMonadTreeRWST0$fApplyMonadTransTreem$fMonadProgressStateT$fApplyMonadTreeStateT$fApplyMonadTreeStateT0$fMonadProgressStateT0$fApplyMonadTreeStateT1$fApplyMonadTreeStateT2Apply ApplyStateapplyeffectOnFilePathsapplyToFilePaths applyToTree applyToStatemaybeApplyToTree $fApplyRL $fApplyFLselectTouchingdeselectNotTouchingselectNotTouchingchooseTouchingchoosePreTouching lookTouch ShowPatch showNicely descriptionsummary summaryFLthingthingsShowContextPatchshowContextPatchShowPatchBasic showPatch ShowPatchFor ForDisplay ForStorage displayPatchformatFileName PatchInfo_piDate_piName _piAuthor_piLog isInverted validDate validDatePSvalidLog validLogPS validAuthor validAuthorPS rawPatchInfo patchinfoaddJunk invertNamejustName justAuthorjustLogdisplayPatchInfopiNamepiRenamepiAuthorisTagpiDate piDateString setPiDatepiLogpiTagtoXml toXmlShort escapeXML makePatchname showPatchInfo readPatchInfo$fShowPatchInfo $fEqPatchInfo$fOrdPatchInfoIsHunkisHunkFileHunk showFileHunkshowContextHunk $fShowPatchRL$fShowContextPatchRL$fShowPatchBasicRL $fShowPatchFL$fShowContextPatchFL$fShowPatchBasicFL RepairToFLapplyAndTryToFixFLapplyAndTryToFixisInconsistent mapMaybeSnd $fCheckRL $fCheckFL $fRepairFL PrimApply applyPrimFLPrimReadreadPrimPrimShowshowPrim showPrimCtx PrimDetails summarizePrim PrimCanonize tryToShrinktryShrinkingInversesortCoalesceFLcanonize canonizeFLcoalesce PrimConstructaddfilermfileadddirrmdirmove changeprefhunk tokreplacebinary primFromHunk anIdentity PrimClassify primIsAddfile primIsRmfile primIsAdddir primIsRmdir primIsMove primIsHunkprimIsTokReplace primIsBinary primIsSetpref is_filepatch FromPrims fromPrims ToFromPrimtoPrimFromPrimfromPrim PrimPatchBasePrimOf PrimPatchPrimPatchCommon$fPrimPatchBaseRL$fPrimPatchBaseFL $fFromPrimsRL $fFromPrimsFL $fFromPrimFL DirPatchTypeRmDirAddDir FilePatchTypeRmFileAddFileHunk TokReplaceBinaryPrimMoveDPFP ChangePref isIdentity comparePrim$fEq2FilePatchType$fEq2DirPatchType$fEqPrim $fEq2Prim$fPatchDebugPrim$fPatchInspectPrim $fInvertPrim $fIsHunkPrim$fPrimConstructPrim$fPrimClassifyPrim$fEqFilePatchType$fOrdFilePatchType$fEqDirPatchType$fOrdDirPatchType$fPrimReadPrim$fPrimDetailsPrimshowHunk$fPrimShowPrim$fShowDirPatchType$fShowFilePatchType $fShow1Prim $fShow2Prim $fShowPrimCommuteFunctionPerhapsUnknownFailed Succeeded toPerhaps cleverCommute speedyCommutecommuteFiledircommuteFilepatches $fCommutePrim$fMonadPlusPerhaps$fAlternativePerhaps$fMonadPerhaps$fApplicativePerhaps$fFunctorPerhaps$fPrimCanonizePrim $fShowSimple$fPrimApplyPrim$fRepairToFLPrim $fApplyPrim$fPrimPatchCommonPrimHunkMoveManifest DemanifestIdentityHMH $fEq2Hunk $fShow2Hunk $fShow1Hunk $fEq2HunkMove$fEqHunk $fShowHunk $fEqHunkMove$fShowHunkMove$fReadPatchPrim RepoPatchV1PPMergerRegremisMerger mergerUndo$fPatchDebugRepoPatchV1$fCheckRepoPatchV1$fPatchListFormatRepoPatchV1$fFromPrimRepoPatchV1$fPrimPatchBaseRepoPatchV1$fShow2RepoPatchV1$fShow1RepoPatchV1$fShowRepoPatchV1 showPatch_$fShowPatchBasicRepoPatchV1Splitter applySplitter canonizeSplit rawSplitter noSplitter primSplitterreversePrimSplitterEffecteffecteffectRL $fEffectRL $fEffectFLNonablenonNonunNonshowNonsshowNonreadNonsreadNoncommuteOrAddToCtxcommuteOrAddToCtxRLcommutePrimsOrAddToCtxremNonscommuteOrRemFromCtxcommuteOrRemFromCtxFL*>>**>>>>*$fEqNon $fShow1Non $fShowNon$fWLRL$fWLFL$fShowPatchBasicBracketed$fFromPrimBracketed$fEffectBracketed$fPrimPatchBaseBracketed ConflictStateOkay Conflicted DuplicatedIsConflictedPrimIsCCommuteNoConflictscommuteNoConflictsConflictresolveConflictsconflictedEffectlistConflictedFilesmangleUnravelled$fCommuteNoConflictsRL$fCommuteNoConflictsFL$fShowIsConflictedPrim $fConflictRL $fConflictFL$fEqConflictState$fOrdConflictState$fShowConflictState$fReadConflictState publicUnravelunravelmerger$fEqRepoPatchV1$fEq2RepoPatchV1$fInvertRepoPatchV1$fIsHunkRepoPatchV1$fEffectRepoPatchV1$fConflictRepoPatchV1$fCommuteNoConflictsRepoPatchV1$fPatchInspectRepoPatchV1$fCommuteRepoPatchV1$fMergeRepoPatchV1$fReadPatchRepoPatchV1plainSummaryPrimplainSummaryPrims plainSummary xmlSummary$fOrdSummChunk $fEqSummChunk displayHunk$fShowPatchPrim$fShowContextPatchPrim$fShowPatchBasicPrim$fPatchListFormatPrimhunkEdit$fApplyMonadTransObjectMapm$fApplyMonadObjectMapStateT$fToTreeObjectMap$fApplyMonadObjectMapStateT0$fApplyMonadStateObjectMap$fFromPrimPrim$fPrimPatchBasePrim$fPrimPatchPrimNamedNamedP namepatch anonymous infopatchadddepsgetdepspatch2patchinfo patchname patchcontents fmapNamed fmapFL_NamedcommuterIdNamedcommuterNamedId mergerIdNamed$fPatchDebugNamed $fShow2Named $fShow1Named$fShowContextPatchNamed$fShowPatchBasicNamed $fCheckNamed$fConflictNamed$fPatchInspectNamed $fMergeNamed$fCommuteNamed $fInvertNamed $fEq2Named $fRepairNamed $fApplyNamed$fReadPatchNamed$fPatchListFormatNamed $fIsHunkNamed $fEffectNamed$fPrimPatchBaseNamed$fShowPatchNamed $fShowNamed$fEqShowDepsFormat RebaseNameAddNameDelNameRenamecommuteNamePrimcommutePrimNamecommuteNameNamedcommuteNamedNamecanonizeNamePair$fEq2RebaseName$fEffectRebaseName$fPrimPatchBaseRebaseName$fApplyRebaseName$fPatchInspectRebaseName$fInvertRebaseName$fCommuteRebaseName$fReadPatchRebaseName$fShowPatchRebaseName$fShowPatchBasicRebaseName$fShow2RebaseName$fShow1RebaseName$fShowRebaseName RebaseFixup PrimFixup NameFixup namedToFixupsflToNamesPrimscommuteNamedFixupcommuteNamedFixupscommuteFixupNamed$fCommuteRebaseFixup$fPatchInspectRebaseFixup$fInvertRebaseFixup$fEq2RebaseFixup$fEffectRebaseFixup$fApplyRebaseFixup$fPrimPatchBaseRebaseFixup$fShow2RebaseFixup$fShow1RebaseFixup$fShowRebaseFixup RebaseItemToEditFixup countToEdit simplifyPushsimplifyPushes$fPatchInspectRebaseItem$fCheckRebaseItem$fReadPatchRebaseItem$fShowPatchRebaseItem$fShowPatchBasicRebaseItem$fShow2RebaseItem$fShow1RebaseItem$fShowRebaseItem SuspendedItemsaddFixupsToSuspendedremoveFixupsFromSuspended$fRepairToFLSuspended$fCheckSuspended$fReadPatchSuspended$fPrimPatchBaseSuspended$fShowPatchSuspended$fShowPatchBasicSuspended$fApplySuspended$fConflictSuspended$fEffectSuspended$fPatchInspectSuspended$fShow2Suspended$fShow1Suspended$fRepairInternalFLRebaseFixup$fRepairInternalFLRebaseItem$fRepairInternalFL$fRepairSuspended$fShowSuspendedrunInternalChecker:~~:ReflRebaseType:~: ReflPatch WrappedNamedNormalPRebasePfmapFL_WrappedNamedactivecontentsmkRebase toRebasing fromRebasinggeneraliseRepoTypeWrappednamedInternalCheckernamedIsInternalremoveInternalFL$fMergeWrappedNamed$fCommuteWrappedNamed$fEffectWrappedNamed$fApplyWrappedNamed$fCheckWrappedNamed$fConflictWrappedNamed$fRepairWrappedNamed$fPatchInspectWrappedNamed$fShowPatchWrappedNamed$fShowContextPatchWrappedNamed$fShowPatchBasicWrappedNamed$fIsHunkWrappedNamed$fPatchListFormatWrappedNamed$fInvertWrappedNamed$fPrimPatchBaseWrappedNamed$fShow2WrappedNamed$fShow1WrappedNamed$fReadPatchReadRebasing$fPatchListFormatReadRebasing$fReadPatchWrappedNamed$fShowWrappedNamed WPatchInfo unWPatchInfo PatchInfoAndPIAPSimpleHopefullyActually Unavailable HopefullycompareWPatchInfoinfo patchDescwinfopiapn2piapatchInfoAndPatch fmapFLPIAPgeneraliseRepoTypePIAP hopefullyconscientiously hopefullyMactually createHashed extractHash unavailable$fPatchDebugPatchInfoAnd$fIsHunkPatchInfoAnd$fEffectPatchInfoAnd$fReadPatchPatchInfoAnd$fRepairPatchInfoAnd$fApplyPatchInfoAnd$fPatchInspectPatchInfoAnd$fMergePatchInfoAnd$fCommutePatchInfoAnd$fShowPatchPatchInfoAnd$fShowContextPatchPatchInfoAnd$fShowPatchBasicPatchInfoAnd$fPatchListFormatPatchInfoAnd$fInvertPatchInfoAnd$fEq2PatchInfoAnd$fPrimPatchBasePatchInfoAnd$fShow2PatchInfoAnd$fShow1PatchInfoAnd$fEq2WPatchInfo$fShowSimpleHopefully$fShowHopefully$fShowPatchInfoAndTaggedPatchSetSealedPatchSetOrigin emptyPatchSet patchSet2RL patchSet2FL appendPSFLprogressPatchSettags patchSetfMap $fShow2Tagged $fShow1Tagged$fShow2PatchSet$fShow1PatchSet $fShowTagged$fShowPatchSet takeAnyRebasetakeAnyRebaseAndTrailingPatches dropAnyRebasetakeHeadRebasetakeHeadRebaseFL progressFL progressRLprogressRLShowTags MatchableWDDNamedWithDroppedDepswddPatch wddDependedOn RebaseChangeRCFwdRCRev RebaseSelectRSFwdRSRevrsToPiafromRebaseSelecttoRebaseSelecttoRebaseChangespartitionUnconflicted commuterIdWDDextractRebaseSelectreifyRebaseSelect$fPatchInspectRebaseSelect$fCommuteRebaseSelect$fEq2RebaseSelect$fInvertRebaseSelect$fReadPatchRebaseSelect$fShowPatchRebaseSelect$fShowContextPatchRebaseSelect$fShowPatchBasicRebaseSelect$fEffectRebaseSelect$fConflictRebaseSelect$fApplyRebaseSelect$fPatchDebugRebaseSelect$fPrimPatchBaseRebaseSelect$fShow2RebaseSelect$fShow1RebaseSelect$fShowRebaseSelect$fMatchableRebaseChange$fPatchListFormatRebaseChange$fIsHunkRebaseChange $fCommuteNoConflictsRebaseChange$fPatchInspectRebaseChange$fCommuteRebaseChange$fInvertRebaseChange$fPrimPatchBaseRebaseChange$fReadPatchRebaseChange$fShowContextPatchRebaseChange$fShowPatchRebaseChange$fShowPatchBasicRebaseChange$fEffectRebaseChange$fApplyRebaseChange$fPatchDebugRebaseChange$fShowRebaseChange$fShow2RebaseChange$fShow1RebaseChange$fConflictRebaseChange$fEffectWithDroppedDeps$fPrimPatchBaseWithDroppedDeps withPatchMods makePatchIDapplyToFileMods$fApplyMonadTreeFileModMonad$fApplyMonadTreeFileModMonad0$fFunctorFileModMonad$fApplicativeFileModMonad$fMonadFileModMonad$fMonadStateFileModMonad applyPatchesAnnotateannotateAnnotateResult annotateFileannotateDirectory machineFormatformat$fAnnotatePatchInfoAnd$fAnnotateWrappedNamed$fAnnotateNamed $fAnnotateFL$fAnnotatePrim$fAnnotatePrim0$fShowFileOrDirectory$fEqFileOrDirectory$fShowAnnotated RepoPatchV2 Duplicate EtacilpudNormal Conflictor InvConflictor isDuplicate isForwardmergeUnravelled isConsistent$fIsHunkRepoPatchV2$fEffectRepoPatchV2$fNonableRepoPatchV2$fShow2RepoPatchV2$fShow1RepoPatchV2$fShowRepoPatchV2$fReadPatchRepoPatchV2$fShowPatchRepoPatchV2$fShowContextPatchRepoPatchV2$fShowPatchBasicRepoPatchV2$fPatchListFormatRepoPatchV2$fAnnotateRepoPatchV2$fRepairToFLRepoPatchV2$fApplyRepoPatchV2$fPatchInspectRepoPatchV2$fCommuteRepoPatchV2$fInvertRepoPatchV2$fEq2RepoPatchV2$fToFromPrimRepoPatchV2$fFromPrimRepoPatchV2$fCheckRepoPatchV2$fCommuteNoConflictsRepoPatchV2$fConflictRepoPatchV2$fPatchDebugRepoPatchV2$fPrimPatchBaseRepoPatchV2$fMergeRepoPatchV2unPrim$fToFromPrimPrim$fAnnotateRepoPatchV1$fRepairToFLRepoPatchV1$fApplyRepoPatchV1$fShowPatchRepoPatchV1$fShowContextPatchRepoPatchV1 RepoPatch$fRepoPatchRepoPatchV2$fMatchableRepoPatchV2$fRepoPatchRepoPatchV1$fMatchableRepoPatchV1 SPatchAndDepsgetDepsgetPatchesBeyondTag splitOnTag getUncoveredslightlyOptimizePatchsetremoveFromPatchSetfindCommonAndUncommonfindCommonWithThem findUncommon countUsThem mergeThempatchSetIntersection patchSetUnionmerge2FLareUnrelatedRepos makeBundleN scanBundlecontextPatchesscanContextFile minContext patchFilename DummyPatch$fPrimPatchCommonDummyPrim$fPatchDebugDummyPrim$fShow2DummyPrim$fPrimPatchDummyPrim$fPrimApplyDummyPrim$fPrimReadDummyPrim$fPrimShowDummyPrim$fPrimDetailsDummyPrim$fPrimClassifyDummyPrim$fPrimCanonizeDummyPrim$fPrimConstructDummyPrim$fRepairToFLDummyPrim$fApplyDummyPrim$fCommuteDummyPrim$fShowContextPatchDummyPrim$fShowPatchDummyPrim$fShowPatchBasicDummyPrim$fReadPatchDummyPrim$fPatchInspectDummyPrim$fInvertDummyPrim$fEq2DummyPrim$fPatchListFormatDummyPrim$fIsHunkDummyPrim$fPatchDebugDummyPatch$fRepoPatchDummyPatch$fPrimPatchBaseDummyPatch$fRepairToFLDummyPatch$fCheckDummyPatch$fCommuteNoConflictsDummyPatch$fFromPrimDummyPatch$fConflictDummyPatch$fMergeDummyPatch$fEffectDummyPatch$fAnnotateDummyPatch$fMatchableDummyPatch$fApplyDummyPatch$fCommuteDummyPatch$fShow2DummyPatch$fShowContextPatchDummyPatch$fShowPatchDummyPatch$fShowPatchBasicDummyPatch$fReadPatchDummyPatch$fPatchInspectDummyPatch$fInvertDummyPatch$fEq2DummyPatch$fPatchListFormatDummyPatch$fIsHunkDummyPatchInclusiveOrExclusive Inclusive Exclusive MatchFlagaddInternalMatcher matchParserhelpOnMatchershaveNonrangeMatchhaveNonrangeExplicitMatchhavePatchsetMatchgetNonrangeMatchS firstMatchgetFirstMatchS secondMatchcheckMatchSyntaxnonrangeMatchernonrangeMatcherIsTag matchAPatch matchPatch hasIndexRangematchFirstPatchsetmatchSecondPatchset splitSecondFLmatchAPatchsetgetMatchingTag matchExistsapplyInvToMatcher applyNInv $fShowMatcher$fShowMatchFlag$fEqInclusiveOrExclusive$fEqIncludeInternalPatches matchUpToOnematchOneContextmatchOneNontag matchSeveral matchLastmatchSeveralOrFirstmatchSeveralOrLast matchRangematchSeveralOrRange matchFrommatchAnycontext GzcrcsAction GzcrcsCheck GzcrcsRepair TestStrategy ChangesFormatGenXml CountPatchesNetworkOptionsnoHttpPipelining YesSummaryNoVerify VerifyKeyring HeaderFields_to_cc_from_subject _inReplyTo TestChanges NoTestChangesYesTestChanges ExternalDiffdiffCmddiffOpts diffUnified WithContext NoContext YesContextLookForaddsreplacesmovesLogfile_logfile _rmlogfileAskLongCommentYesEditLongCommentRepoCombinatorNotInDefaultRepoNotInRemotePath SelectDepsNoDepsAutoDeps PromptDeps XmlOutputNoXmlYesXml StdCmdAction RootActionRootHelpYesEnumPatchesYesNoyesno DarcsOption rootActions stdCmdActionsdebug verbositytimings anyVerbosityhookspreHookpostHookuseCache xmlOutputdryRun dryRunXmlpipe interactive pauseForGuiaskDeps selectDepschangesReverseworkReporepoDirreponamepossiblyRemoteRepo remoteReposnotInRemoteFlagName notInRemoterepoCombinatorallowUnrelatedRepos justThisRepowithWorkingDir setDefaultauthoraskLongCommentkeepDatelogfilelookfor lookforaddslookforreplaces lookformovesuseIndex includeBoringallowProblematicFilenamesallowCaseDifferingFilenamesallowWindowsReservedFilenames onlyToFiles recursive diffAlgorithm withContextextDiff testChangesrunTest leaveTestDir headerFields sendToContextsendmail sendmailCmdminimizecharseteditDescriptionccApplyreplyhappyForwardingapplyAssignverify conflictsNo conflictsYes externalMergecompressusePacks patchIndexNo patchIndexYes storeInMemoryoutput maybeSummarynetworkumasksetScriptsExecutable restrictPaths amendUnrecord selectAuthormachineReadable cloneKindmarks readMarks writeMarkshashed patchFormatdistnamedistzip changesFormattokens forceReplace testStrategyfiles directoriespendingnullFlag enumPatches gzcrcsActionssiblingsreorderoptimizePatchIndex$fYesNoWithWorkingDir$fYesNoWantGuiPause$fYesNoUseIndex$fYesNoLeaveTestDir$fYesNoSetScriptsExecutable$fYesNoRunTest$fYesNoIncludeBoring$fYesNoLookForMoves$fYesNoLookForReplaces$fYesNoLookForAdds $fYesNoDryRun$fYesNoUseCache$fYesNoReorder$fYesNoWithPatchIndex$fYesNoCompression$fYesNoEnumPatches$fYesNoXmlOutput$fYesNoWithContext$fYesNoSummary$fEqEnumPatches$fShowEnumPatches$fEqRootAction$fShowRootAction$fEqStdCmdAction$fShowStdCmdAction $fEqXmlOutput$fShowXmlOutput$fEqSelectDeps$fShowSelectDeps$fEqRepoCombinator$fShowRepoCombinator$fEqAskLongComment$fShowAskLongComment$fEqWithContext$fShowWithContext$fEqExternalDiff$fShowExternalDiff$fEqTestChanges$fEqSign $fShowSign $fEqVerify $fShowVerify $fEqOutput $fShowOutput $fEqSummary $fShowSummary$fEqChangesFormat$fShowChangesFormat$fEqTestStrategy$fShowTestStrategy$fEqGzcrcsAction$fShowGzcrcsActionoptDescrwithLockwithLockCanFailenvironmentHelpLockswithTemp withOpenTempwithStdoutTemp tempdirLocenvironmentHelpTmpdirenvironmentHelpKeepTmpdir withPermDir withTempDirwithDelayedDir rmRecursive withNamedTemp readBinFile readTextFilereadDocBinFile appendBinFileappendTextFileappendDocBinFile writeBinFile writeTextFilewriteDocBinFilewriteAtomicFilePSgzWriteAtomicFilePSgzWriteAtomicFilePSsgzWriteDocFile addToErrorLocwithNewDirectory sendmailPath diffProgram darcsProgrampipeDoc pipeDocSSH sendEmail generateEmail haveSendmail sendEmailDoc resendEmail execDocPipeexecPipeIgnoreError signStringverifyPSviewDoc viewDocWitheditTexteditFilesetDarcsEncodingsgetSystemEncoding isUTF8Locale printFriendly showFriendly printPatchprintPatchPagercontextualPrintPatchmaxPipelineLength copyUrlFirstcopyUrlwaitUrldisableHTTPPipelining setDebugHTTPenvironmentHelpProxyenvironmentHelpProxyPassword copyFileOrUrl cloneTree cloneFilebackupByRenamingbackupByCopying fetchFilePSfetchFileLazyPS gzFetchFilePSspeculateFileOrUrl readOldRepooldRepoFailMsg RepoFormatRF RepoPropertyDarcs1Darcs2HashedInventoryRebaseInProgress UnknownFormat formatHas addToFormatremoveFromFormatidentifyRepoFormattryIdentifyRepoFormatwriteRepoFormatcreateRepoFormat writeProblemtransferProblem readProblem$fShowRepoProperty$fShowRepoFormat$fEqRepoPropertyCacheCaCacheLoc cacheType cacheWritable cacheSource CacheTypeRepo WritableOrNotWritable NotWritable HashedDirHashedPristineDirHashedPatchesDirHashedInventoriesDir hashedDir allHashedDirs unionCachesunionRemoteCachescompareByLocality repo2cache cacheHashokayHashfetchFileUsingCachewritable isThisRepo bucketFolderhashedFilePath peekInCachespeculateFileUsingCachespeculateFilesUsingCachewriteFileUsingCache cleanCachescleanCachesWithHintreportBadSources$fShowCacheLoc $fEqCacheLoc $fShowCache$fEqWritableOrNot$fShowWritableOrNot $fEqCacheType$fShowCacheType$fEqOrOnlySpeculate $fEqFromWhereFileType BinaryFileTextFilewriteDefaultPrefsdarcsdirFilterglobalPrefsDirglobalPrefsDirDocenvironmentHelpHome getGlobalglobalCacheDir boringRegexpsboringFileFilterfiletypeFunction addToPreflist getPreflist setPreflist defPrefval getPrefval setPrefval changePrefval defaultrepogetDefaultRepoPath addRepoSource deleteSources getCachesgetMotdshowMotdprefsUrl prefsDirPathprefsFilesHelp $fEqFileTypeverbosequietenumeratePatches scanKnown diffingOpts wantGuiPause isInteractivewillRemoveLogFile lookForAddslookForReplaces lookForMovesallowConflictsfixRemoteReposfixUrlmaybeFixSubPaths fixSubPaths getRepourlfileHelpAuthorenvironmentHelpEmail getAuthor promptAuthor getEasyAuthorgetDateenvironmentHelpSendmailgetSendmailCmd getOutput getSubjectgetCc getInReplyTo hasXmlOutput hasLogfile checkPathsmaliciousPatcheshasMaliciousPathtreeDiffstandardResolutionexternalResolutionpatchsetConflictResolutions DefaultIO runTolerantly runSilently runDefault$fApplyMonadTreeDefaultIO$fApplyMonadTreeDefaultIO0$fMonadProgressDefaultIO$fTolerantMonadTolerantIO$fTolerantMonadSilentIO$fApplyMonadTreeTolerantWrapper $fApplyMonadTreeTolerantWrapper0$fFunctorDefaultIO$fApplicativeDefaultIO$fMonadDefaultIO$fFunctorTolerantIO$fApplicativeTolerantIO$fMonadTolerantIO$fFunctorSilentIO$fApplicativeSilentIO$fMonadSilentIO$fFunctorTolerantWrapper$fApplicativeTolerantWrapper$fMonadTolerantWrapper$fTolerantMonadTolerantWrapperInventoryEntry InventoryinventoryParentinventoryPatches HeadInventory PristineHash PatchHash InventoryHash ValidHash getValidHash mkValidHashinventoryPatchNamesemptyInventoryparseInventory showInventoryshowInventoryPatchesshowInventoryEntrypokePristineHashpeekPristineHashskipPristineHash pristineNameprop_inventoryParseShowprop_peekPokePristineHashprop_skipPokePristineHash$fValidHashInventoryHash$fValidHashPatchHash$fValidHashPristineHash$fEqInventoryHash$fShowInventoryHash $fEqPatchHash$fShowPatchHash$fEqPristineHash$fShowPristineHash $fEqInventory$fShowInventory Repository PristineType NoPristine PlainPristineHashedPristine repoLocationwithRepoLocation repoFormatrepoPristineType repoCache modifyCache repoPatchTypecoerceRcoerceUcoerceTmkRepo$fShowPristineType$fEqPristineType$fShowRepository PatchFilterdoesPatchIndexExistisPatchIndexDisabledcreateOrUpdatePatchIndexDiskcanUsePatchIndexcreatePIWithInterruptisPatchIndexInSyncdeletePatchIndexattemptCreatePatchIndexgetRelevantSubsequencemaybeFilterPatchesdumpPatchIndexpiTest$fShowFileIdSpan$fEqFileIdSpan$fOrdFileIdSpan$fShowFilePathSpan$fEqFilePathSpan$fOrdFilePathSpan$fShowFileInfo $fEqFileInfo $fOrdFileInfo copyHashedpathsAndContentscopyPartialsHashed cleanHashdirgetHashedFiles $fEqObjType pendingName readPendingsiftForPendingtentativelyRemoveFromPendingmakeNewPendingfinalizePendingtentativelyAddToPendingsetTentativePendingprepend$fShowPatchBasicFLM$fReadPatchFLM TreeFilterapplyTreeFilterrestrictSubpathsmaybeRestrictSubpathsrestrictBoringrestrictDarcsdirunrecordedChangesreadPendingAndWorking readRecordedreadUnrecordedreadUnrecordedFiltered readWorkingreadRecordedAndPendinginvalidateIndexfilterOutConflictsaddPendingDiffToPending addToPendingapplyToWorkingsetScriptsExecutablePatches IdentifyRepo BadRepository NonRepositoryGoodRepositorymaybeIdentifyRepositoryidentifyRepositoryidentifyRepositoryForamInRepositoryamInHashedRepositoryseekRepoamNotInRepositoryfindRepositoryfindAllReposInDirUpdatePristineDontUpdatePristineDontUpdatePristineNorReverthashedInventoryhashedInventoryPathinventoriesDirinventoriesDirPath pristineDirpristineDirPath patchesDirpatchesDirPathrevertTentativeChangesfinalizeTentativeChangesreadHashedPristineRoot cleanPristinefilterDirContents diffHashListscleanInventories cleanPatchesaddToTentativeInventoryreadRepoHashedreadTentativeRepocopyHashedInventorywriteAndReadPatchwriteTentativeInventorylistInventorieslistInventoriesLocallistInventoriesRepoDirlistPatchesLocalBucketed copyPristinecopyPartialsPristine unrevertUrltentativelyAddPatchtentativelyAddPatches_tentativelyAddPatch_applyToTentativePristineapplyToTentativePristineCwdtentativelyRemovePatchestentativelyRemovePatches_tentativelyReplacePatchesfinalizeRepositoryChangesrevertRepositoryChangescleanRepositorycreatePristineDirectoryTree#createPartialsPristineDirectoryTree withRecorded withTentativereorderInventoryreadReporepoXor$fEqUpdatePristinegetTest runPosthook runPrehook testTentativeRepositoryConsistencyRepositoryConsistentBrokenPristine BrokenPatchesreplayRepositoryInTempreplayRepository checkIndexRebaseJobFlagsrjoCompression rjoVerbosityrjoUpdateWorkingwithManualRebaseUpdate rebaseJobstartRebaseJobmaybeDisplaySuspendedStatuspacksDirfetchAndUnpackPatchesfetchAndUnpackBasic createPackstentativelyMergePatchesconsiderMergeToWorkingannounceMergeConflicts$fEqMakeChangesgetNonrangeMatchgetOnePatchsetIsPrimV1toPrimV1RepoJobV1JobV2Job PrimV1JobRebaseAwareJob RebaseJobStartRebaseJob withUMaskFlagwithRepositorywithRepositoryLocation withRepoLockwithOldRepoLockwithRepoLockCanFailcheckRepoIsNoRebase$fIsPrimV1Prim$fIsPrimV1Prim0fileArgsunknownFileArgs knownFileArgsmodifiedFileArgsprefArgsnoArgsEmptyRepositorycreateRepositorycreateRepositoryV1createRepositoryV2 writePristinecloneRepository writePatchSetreplacePristineKeyPresskpkpHelpInteractiveSelectionMInteractiveSelectionContextISCtotalcurrentlpschoicesPatchSelectionContext allowSkipAllPatchSelectionOptions matchFlags WhichChangesLast LastReversedFirst FirstReversedselectionContextPrimselectionContextselectionContextGeneric runSelection viewChangeshelpForkeysForwithSelectedPatchFromRepo currentPatch currentFiledecidedecideWholeFileskipOnebackOne printSummarybackAll isSingleFile promptUsershowCur skipMundaneaskAboutDepends$fEqWhichChanges$fShowWhichChanges AskAboutDepsNoAskAboutDepsHijackT HijackOptions IgnoreHijackRequestHijackPermissionAlwaysRequestHijackPermissiongetLog runHijackTupdatePatchHeader announceFilestestTentativeAndMaybeExitprintDryRunMessageAndExitfilterExistingPathsgetUniqueRepositoryNamegetUniqueDPatchName expandDirscheckUnrelatedReposrepoTags CommandArgs CommandOnlySuperCommandOnlySuperCommandSub DarcsCommand SuperCommandcommandProgramName commandName commandHelpcommandDescriptioncommandExtraArgscommandExtraArgHelpcommandCommand commandPrereqcommandCompleteArgscommandArgdefaultscommandBasicOptionscommandAdvancedOptionscommandDefaultscommandCheckOptionscommandParseOptionscommandSubCommandsCommandControl CommandData HiddenCommand GroupNameWrappedCommandextractCommandsextractAllCommands normalCommand hiddenCommand commandGroupwrappedCommandNamewrappedCommandDescription withStdOptscommandAlloptionscommandOptions nodefaultsgetSubcommands commandAlias commandStubdisambiguateCommands putVerboseputInfo putWarningputVerboseWarningabortRunsetEnvDarcsPatchessetEnvDarcsFiles defaultRepo formatOptionsusagesubusagegetCommandMiniHelpgetCommandHelpwhatsnewstatusunrevert writeUnrevertunrecordgetLastPatchesunpull obliterate matchingHead transferModetest$fShowBisectDirtagshowTagsshowReposhowPatchIndex showIndexshowPristineCmd showFilesshowDeps showContentsSpelling showAuthors rankAuthorscanonizeAuthorcompiledAuthorSpellings showCommandsetprefrollbackrevertreplacerepaircheckremovermunadd RecordConfig_workingRepoDirsse recordConfigrecordcommitpushoptimizemv$fShowFileKind $fEqFileKind$fShowFileStatus markconflicts$fTraversableOnly$fFoldableOnly $fFunctorOnly$fEqOnly $fOrdOnly $fShowOnlylog getLogInfo changelogchanges initialize initializeCmd doCRCWarningsgzcrcsdist doFastZip doFastZip' diffCommand getDiffDocconvert $fShowState $fShowRefId$fShowCopyRenameNames $fShowObjectclonegetput cloneToSSH makeRepoNameamend amendrecordaddStandardPatchApplier PatchApplierApplierRepoTypeConstraintrepoJob PatchProxy"$fPatchApplierStandardPatchApplierfetchpullpullCmd fetchPatches revertableapplyCmdgetPatchBundlerebase $fPatchApplierRebasePatchApplierfetchUrlpostUrl requestUrl waitNextUrlsendcommandControlList applyDefaults runTheCommandhelpCmdlistAvailableCommands printVersionenvironmentHelpsingletonRebaseTypeGHC.Base++ghc-primGHC.PrimseqGHC.Listzipprint Data.Tuplefstsnd otherwisemap$GHC.Real fromIntegral realToFracGHC.EnumBoundedminBoundmaxBoundEnumenumFrom enumFromThenenumFromThenTo enumFromTofromEnumtoEnumsucc GHC.ClassesEq==/= GHC.FloatFloatingexpsqrt**logBasesincostanasinacosatansinhcoshtanhasinhacoshatanh Fractional fromRational/recipIntegral toIntegerquotremdivmodquotRemdivModMonad>>=>>returnfailfmap<$GHC.NumNum*+-negate fromIntegerabssignumOrd>=minmax><<=compareGHC.ReadRead readsPrecreadListReal toRational RealFloat floatRadix floatDigits floatRange decodeFloat encodeFloatexponent significand scaleFloatisNaN isInfiniteisDenormalizedisNegativeZeroisIEEEatan2RealFracproperFractiontruncateroundceilingfloorGHC.ShowShow showsPrecshowshowList Applicativepure<*><*liftA2 Data.FoldableFoldablefoldrlengthfoldMapnullfoldlfoldl1sumproductfoldr1maximumminimumelemData.Traversable TraversabletraversemapM sequenceAsequence SemigroupsconcatstimesMonoidmemptymappendmconcat GHC.TypesBoolFalseTrueCharDoubleFloatInt integer-gmpGHC.Integer.TypeIntegerMaybeNothingJustOrderingLTEQGTRationalIOWord Data.EitherEitherLeftRight Text.ReadreadStringreadIOreadLn appendFileinteract getContentsgetLinegetCharputStrLnputStrputCharGHC.IO.ExceptionioErrorGHC.IO userErrorIOErrornotElemallanyorand concatMapconcat sequence_mapM_ Data.OldListunwordswordsunlineslinesreadseitherlex readParenText.ParserCombinators.ReadPReadS<$>lcmgcd^^oddeven showParen showStringshowCharshowsShowSunzip3unzipzipWith3zipWithzip3!!reversebreakspansplitAtdrop dropWhile takeWhilecycle replicaterepeatiteratescanr1scanrscanl1scanlinitlasttailhead Data.MaybefromJustmaybeuncurrycurrysubtractasTypeOfuntil$!flip.constid=<<GHC.Err undefinederrorWithoutStackTraceerror&&||not unescapeCharsnormalRegChars breakOutTokenFTableData.ByteString.Internal ByteStringmarkColldiffArrcmpseqfindDiagfindOne findSnake findOneRev findSnakeRev nextUnchangedskipOneUnChangednextUnchangedN nextChanged prevUnchangedlcus patientLcslcsHunkMap HunkMapInfoSM ParserStatework peekInputmyLexlinesStartingWith'linesStartingWithEndingWith' alterInputstuple:*:unsafeWithInternalsXYZ'old-time-1.1.0.3-EQ1oW6cr5WVGJaPhD3t2Ok System.Time CalendarTimereadDatedateTimecaseChar$parsec-3.1.11-Jx0X6lpzdHgC5NMoYR1Rc5Text.Parsec.Char caseStringmanyNmanyNtoM cvsDateTimeiso8601DateTime oldDateTimerfc2822DateTime iso8601Date iso8601TimeoptchainmySpacesdayNameyearmonthNum intToMonth monthNamedayhourminutesecondzone englishDate englishTime englishAgoenglishDuration theBeginning multiplyDiff copyCalendar withinDay dateRange cDateRangewithinsamePartialDate tryMatchers testDateAtCal showMatcherDocumentStspacePnewlinePhPrintPrintableshPrintPrintable renderWithsimplePrinters'appendvplusEmptyprinters currentPrefixqEncodePolicypoColorpoEscape poLineColor poAltColor poIsprintpo8bitpoNoEscXpoEscX poTrailingpoCRpoSpace getPolicylineColorTransescapenoEscapeisPrintableAscii quoteChar markEscapecolor makeAsciiart resetColor withColorsetColormakeBold makeInvert _progressData ProgressDatasofarlatestcurl_pipelining_enabledcurl_enable_debug curl_last_urlcurl_wait_next_urlcurl_request_urlpipeliningEnabled cachableToInt PatchChoicepcPatch _pcIsLast pcSetLast pushLastspcsMiddleLastsforceMatchingMiddleOrLastPCs pcsFirstsPCLPSshFPcatchSignalException firstJustMRepoId Connection detectSshsshConnectionsGHC.MVarMVargetSshConnectionnewSshConnectiondropSshConnectionCinpouterrord simpleClean pathToPosix normSlashesunNameCharLiketoCharAbsPRmtPAPAPStdFN sortedUnion modifyItem flushSomeexpandTochanged changesizemaxage updateHashupdatereadDarcsHashed'fsCreateHashedFilenextFresitemF_fileIDsnexttreeitemresitemItem createItempeekItem updateItem mmapIndexResultFResultState dirlengthpathstartIndexM EmptyIndexmmapbasedirhashtree predicateiBaseiHashAndDescriptorSingleArgOptDescr switchNames rawUnparserawParsedefHeadaddDefaultHelpmultiArgtrackOrigRenamevalidCharForDate readPatchDatemetadataToStringstorePatchInfo readBinary coalesceFwd shrinkABittryOnesortCoalesceFL2pushCoalescePatchSimpleSFPSDPWLtoRLinvertWL mergerCommute actualMerge SummChunkApplyMonadObjectMap editDirectoryShowDepsFormatShowDepsVerboseShowDepsSummaryRepairInternalrepairInternalRepairInternalFLrepairInternalFL ReadRebasing ReadNormal ReadSuspendedInternalChecker dropRebaseRLtakeHeadRebaseRL pushThroughforceCommuteNameConflictedEffectResultgetConflictedEffectResultResolveConflictsResultgetResolveConflictsResult FileModMonadFMM Annotated annotatedwhat currentInfoFileOrDirectoryCommonRLCommonmergeAfterConflicting allNormal pullCommon pullCommonRLtaggedIntersectionmaybeSplitSetOnTagunwrapOneTagged fastRemoveFL fastRemoveRL hashBundle makeBundle2filterGpgDashesunavailablePatches piUnavailable getContext-:- getPatchessillyLexMatcherMatchFun applyMatcher strictJust firstMatcherhasLastndropn findAPatch applyInvpsafetakeprimitiveMatchersIncludeInternalPatchesExcludeInternalPatchesMATCHindexindexeswithDirText WithDirKindPermTempDelayed PipeToSsh PipeToOtherget_system_encoding ortryrunningGHC.IO.EncodinggetFileSystemEncodingsetLocaleEncoding WhereToPipecheckWaitToStart makeFilename darcs1Format darcs2FormathashedInventoryFormat findProblemsisKnownhashedFilePathReadOnlycopyFileUsingCachecheckCacheReachabilityfilterBadSources checkHashedInventoryReachabilityfetchFileUsingCachePrivatewrite FromWhere LocalOnlyAnywhereOrOnlySpeculate ActuallyCopy OnlySpeculatetryMakeBoringRegexpdefaultBinariesDiffAddedRemovedChangedexternallyResolveFileTolerantWrapperrunTolerantWrapperSilentIOSIOrunSIO TolerantIOTIOrunTIO TolerantMonadwarningrunIOrunTM runDefaultIO PatchIndexpidsInfoMap FilePathSpans FileIdSpansFileInfoversionapplyPatchModscreateFidStartSpan startFpSpan stopFpSpan startFidSpan stopFidSpan createInfo insertTouch lookupFid lookupFid' lookupFidf' lookupFids lookupFids'createPatchIndexDiskpatches2patchModsfpSpans2fileNamesremovePidSuffixupdatePatchIndexDiskcreatePatchIndexFromloadPatchIndexloadSafePatchIndexstorePatchIndexfpSpans2filePathsfpSpans2filePaths' canCreatePIfidspansfpspansinfomisFiletouching FilePathSpanFpSpan FileIdSpanFidSpan readHashFilegetaObjTypeFDHashDircacherootHashreadTentativePendingreadNewPendingreadPendingFilewriteTentativePendingwriteNewPending crudeSiftisSimpleFLMunFLMrestrictSubpathsAfter inDarcsDirfilteredWorkingworkDirLessRepoWitnessgetMoves getReplacessetScriptsExecutable_ DirLayout PlainLayoutBucketedLayoutapplyToHashedPristinespecialPatchesaddToSpecificInventoryremoveFromTentativeInventory writeHashFilereadRepoUsingSpecificInventoryreadRepoFromInventoryListreadInventoryPrivatelistInventoriesWithreadInventoryLocalPrivatelistPatchesLocalmisplacedPatchesfetchFilesUsingCachevoid MakeChangesDontMakeChanges UsesPrimV1IsTree RepoPatchTypeRepoV1RepoV2haveknownnew notYetListed RepoTrees dropNonReposfetchPatchesIfNecessaryMatchCriterionbackwardreversedtriviswantedwspfr liftChoicesjustDone textSelecttodo modifyChoices postponeNext splitCurrentreprselected printSelectedskipAll textSelectOnetextView getDefault WithSkipped_skippedReason skippedPatch SkippedReasonSkippedAutomaticallySkippedManuallyPSCoptssplittermatchCriterionjobnamepristine whichChanges mcHasNonrange mcFunctionPName FlagPatchNamePriorPatchName NoPatchNamerunInteractiveinteractiveHunksgenericObliterateCmd remotePatches BisectState BisectDir PatchTreeStrategyoneTest trackLinear trackBackoff trackBisectpatchTreeFromRL patchTree2RLtrackNextBisecttrackNextBackoff BisectLeft BisectRightLeaf validPrefDataisTok chooseToks filenameToks replaceHelpmakeRemovePatch makeRemoveGapcheckNameIsNotOptionShadowmoveFile fileStatus FileStatus NonexistantUnaddedKnownFileKindDirPathSet EverythingOnlyfromOnly isectPathSetsps2psfps2psps2fps showPathSet liftToPathSetfp2spsp2fpfilterPatchesByNamesdoDistgetDiffCmdAndArgsW3W2 convertHelp'unescapeToplevelInCommitDoneResetCommitTagModifyGitlinkCopyDeleteFromProgressEndCopyRenameNamesQuotedUnquotedRefIdMarkIdHashIdInlineunW3unW2 AmendConfigaddFiles AddMessages msgSkipping msgAddingmsgIsmsgAresendSanitizedEmailRebasePatchApplierweakhashPostSendMailWhatToDo OptionMapCmdName mkCmdName showCmdNameSuperCmd parseDefaultsparseDefaultsLines defaultToFlagoptionSwitches optionMapallOptionSwitches NormalCmdgetPosthookDirextraArgumentsError unwrapTree completeArgs manpageLines