|
Data.FileStore.Utils | Portability | portable | Stability | alpha | Maintainer | John MacFarlane <jgm@berkeley.edu> |
|
|
|
Description |
Utility functions for running external processes.
|
|
Synopsis |
|
|
|
Documentation |
|
|
|
|
|
:: (String, ByteString) | (label, contents) of edited version
| -> (String, ByteString) | (label, contents) of original revision
| -> (String, ByteString) | (label, contents) of latest version
| -> IO (Bool, String) | (were there conflicts?, merged contents)
| Do a three way merge, using either git merge-file or RCS merge. Assumes
that either git or merge is in the system path. Assumes UTF-8 locale.
|
|
|
|
A number of VCS systems uniquely identify a particular revision or change via a
cryptographic hash of some sort. These hashs can be very long, and so systems like
Git and Darcs don't require the entire hash - a *unique prefix*. Thus a definition
of hash equality is ==, certainly, but also simply whether either is a prefix of the
other. If both are reasonably long, then the likelihood the shorter one is not a unique
prefix of the longer (that is, clashes with another hash) is small.
The burden of proof is on the caller to not pass a uselessly short short-hash like '1', however.
|
|
|
Inquire of a certain repository whether another file lies within its ambit.
This is basically asking whether the file is above the repository in the filesystems's
directory tree. Useful for checking the legality of a filename.
|
|
|
|
|
A parser function. This is intended for use on strings which are output by grep programs
or programs which mimic the standard grep output - which uses colons as delimiters and has
3 fields: the filename, the line number, and then the matching line itself. Note that this
is for use on only strings meeting that format - if it goes file:match, this will throw
a pattern-match exception.
parseMatchLine "foo:10:bar baz quux" ~>
SearchMatch {matchResourceName = "foo", matchLineNumber = 10, matchLine = "bar baz quux"}
|
|
Produced by Haddock version 2.6.0 |