Here's that 4th attempt.
The conflict is pretty odd to me, two seemingly unrelated replace patches (no
apparant overlaps). On the surface at least, it seems like they should commute.
Maybe the reason they conflict would make more sense on further thought...
(for example, they do seem to involve different tokens, which I could believe
to be tricky)
Mon Sep 22 13:07:27 BST 2008 Dmitry Kurochkin <[EMAIL PROTECTED]>
* Rename --ignore-unrelated-repos to --allow-unrelated-repos.
Ignore-this: a5990f1741c867316a948e6721118651
Mon Sep 22 15:05:20 BST 2008 Eric Kow <[EMAIL PROTECTED]>
* Check for filepath package in configure.
Mon Sep 22 15:15:32 BST 2008 Eric Kow <[EMAIL PROTECTED]>
* Add --reserved-ok flag for darcs add and mv.
This is just the flag, not the actual effect.
Mon Sep 22 16:22:56 BST 2008 Eric Kow <[EMAIL PROTECTED]>
* Add test for issue53.
Mon Sep 22 18:15:19 BST 2008 Eric Kow <[EMAIL PROTECTED]>
* Use --reserved-ok to allow a file with ':' in it in tests.
It's likely that this test will just fail under Windows and
we will have to disable it.
Mon Sep 22 18:20:04 BST 2008 Eric Kow <[EMAIL PROTECTED]>
* Resolve issue53: check for windows filename validity in darcs add/mv.
Mon Sep 22 21:26:47 BST 2008 Eric Kow <[EMAIL PROTECTED]>
* Resolve conflict between replace patches in Darcs.Arguments
New patches:
[Rename --ignore-unrelated-repos to --allow-unrelated-repos.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080922120727
Ignore-this: a5990f1741c867316a948e6721118651
] replace ./src/Darcs/Arguments.lhs [A-Za-z_0-9] IgnoreUnrelatedRepos AllowUnrelatedRepos
replace ./src/Darcs/Arguments.lhs [A-Za-z_0-9] ignore_unrelated_repos allow_unrelated_repos
replace ./src/Darcs/Arguments.lhs [A-Za-z_0-9\-\.] ignore-unrelated-repos allow-unrelated-repos
replace ./src/Darcs/Commands/Pull.lhs [A-Za-z_0-9] ignore_unrelated_repos allow_unrelated_repos
replace ./src/Darcs/Commands/Push.lhs [A-Za-z_0-9] ignore_unrelated_repos allow_unrelated_repos
replace ./src/Darcs/Commands/Send.lhs [A-Za-z_0-9] ignore_unrelated_repos allow_unrelated_repos
replace ./src/Darcs/Flags.lhs [A-Za-z_0-9] IgnoreUnrelatedRepos AllowUnrelatedRepos
replace ./src/Darcs/Repository.lhs [A-Za-z_0-9] IgnoreUnrelatedRepos AllowUnrelatedRepos
hunk ./tests/issue1039.sh 67
echo no | darcs send --all [EMAIL PROTECTED] --sendmail-command=false ../temp1
echo yes | not darcs send --all [EMAIL PROTECTED] --sendmail-command=false ../temp1
-not darcs send --all [EMAIL PROTECTED] --sendmail-command=false --ignore-unrelated-repos ../temp1
+not darcs send --all [EMAIL PROTECTED] --sendmail-command=false --allow-unrelated-repos ../temp1
cd ..
rm -rf temp1 temp2
[Check for filepath package in configure.
Eric Kow <[EMAIL PROTECTED]>**20080922140520] hunk ./configure.ac 158
AC_SUBST(HAVE_HTTP)
+dnl Look for System.FilePath
+
+GHC_CHECK_MODULE(System.FilePath, filepath, isValid,,
+ AC_MSG_ERROR(Cannot find System.FilePath; try installing the Haskell package filepath?))
+
dnl See if we need a package for QuickCheck
GHC_CHECK_MODULE(Test.QuickCheck( quickCheck ), QuickCheck, quickCheck True,,
[Add --reserved-ok flag for darcs add and mv.
Eric Kow <[EMAIL PROTECTED]>**20080922141532
This is just the flag, not the actual effect.
] hunk ./src/Darcs/Arguments.lhs 208
getContent NoAllowConflicts = NoContent
getContent Boring = NoContent
getContent AllowCaseOnly = NoContent
+getContent AllowWindowsReserved = NoContent
getContent DontGrabDeps = NoContent
getContent Compress = NoContent
getContent NoCompress = NoContent
hunk ./src/Darcs/Arguments.lhs 1058
\begin{code}
noskip_boring = DarcsNoArgOption [] ["boring"]
Boring "don't skip boring files"
-allow_caseonly = DarcsNoArgOption [] ["case-ok"]
- AllowCaseOnly "don't refuse to add files differing only in case"
+allow_caseonly = DarcsMultipleChoiceOption
+ [DarcsNoArgOption [] ["case-ok"] AllowCaseOnly
+ "don't refuse to add files differing only in case"
+ ,DarcsNoArgOption [] ["reserved-ok"] AllowWindowsReserved
+ "don't refuse to add files with Windows-reserved names"
+ ]
diffflags = DarcsArgOption [] ["diff-opts"]
DiffFlags "OPTIONS" "options to pass to diff"
\end{code}
conflictor [
replace ./src/Darcs/Arguments.lhs [A-Za-z_0-9\-\.] ignore-unrelated-repos allow-unrelated-repos
]
:
replace ./src/Darcs/Arguments.lhs [A-Za-z_0-9] allow_caseonly allow_problematic_filenames
replace ./src/Darcs/Commands/Add.lhs [A-Za-z_0-9] allow_caseonly allow_problematic_filenames
replace ./src/Darcs/Commands/Mv.lhs [A-Za-z_0-9] allow_caseonly allow_problematic_filenames
hunk ./src/Darcs/Flags.lhs 57
| Toks String
| EditLongComment | NoEditLongComment | PromptLongComment
| AllowConflicts | MarkConflicts | NoAllowConflicts
- | Boring | AllowCaseOnly
+ | Boring | AllowCaseOnly | AllowWindowsReserved
| DontGrabDeps | Compress | NoCompress | UnCompress
| WorkDir String | RepoDir String | RemoteRepo String
| Reply String | ApplyAs String
[Add test for issue53.
Eric Kow <[EMAIL PROTECTED]>**20080922152256] addfile ./tests/issue53.sh
hunk ./tests/issue53.sh 1
+#!/usr/bin/env bash
+
+set -ev
+
+# The builtin ! has the wrong semantics for not.
+not () { "$@" && exit 1 || :; }
+
+if echo $OS | grep -i windows; then
+ echo This test does not work under Windows
+ exit 0
+fi
+
+# pull from not empty repo to empty repo
+rm -rf temp1
+mkdir temp1
+
+cd temp1
+darcs init
+echo a > Aux.hs
+not darcs add Aux.hs
+darcs add --reserved-ok Aux.hs
+echo b > foo
+darcs add foo
+darcs record -am 'two files'
+not darcs mv foo com1
+darcs mv --reserved-ok foo com1
+cd ..
+
+rm -rf temp1
[Use --reserved-ok to allow a file with ':' in it in tests.
Eric Kow <[EMAIL PROTECTED]>**20080922171519
It's likely that this test will just fail under Windows and
we will have to disable it.
] hunk ./tests/filepath.pl 39
darcs "add dir";
chdir 'dir';
`touch foo:bar`;
-unlike( darcs("add foo:bar"), qr/failed/i );
+unlike( darcs("add --reserved-ok foo:bar"), qr/failed/i );
chdir '../..';
cleanup 'temp2';
[Resolve issue53: check for windows filename validity in darcs add/mv.
Eric Kow <[EMAIL PROTECTED]>**20080922172004] hunk ./src/Darcs/Commands/Add.lhs 29
fancy_move_add,
recursive, working_repo_dir, dry_run_noxml, umask_option,
list_files, list_unregistered_files,
- DarcsFlag (AllowCaseOnly, Boring, Recursive,
- Verbose, Quiet, FancyMoveAdd, DryRun),
+ DarcsFlag (AllowCaseOnly, AllowWindowsReserved, Boring, Recursive,
+ Verbose, Quiet, FancyMoveAdd, DryRun),
fixSubPaths,
)
import Darcs.Utils ( withCurrentDirectory, nubsort )
hunk ./src/Darcs/Commands/Add.lhs 50
import Darcs.Repository.Prefs ( darcsdir_filter, boring_file_filter )
import Data.Maybe ( maybeToList )
import System.IO ( hPutStrLn, stderr )
+import qualified System.FilePath.Windows as WindowsFilePath
\end{code}
\begin{code}
hunk ./src/Darcs/Commands/Add.lhs 177
where
addp' :: Slurpy -> FilePath -> IO (Slurpy, Maybe (FL Prim), Maybe FilePath)
addp' cur f =
- if (if gotAllowCaseOnly
- then slurp_has f cur
- else slurp_has_anycase f cur)
+ if already_has
then do return (cur, Nothing, Just f)
else do
hunk ./src/Darcs/Commands/Add.lhs 180
+ if is_badfilename
+ then do putInfo $ "The filename " ++ f ++ " is invalid under Windows.\nUse --reserved-ok to allow it."
+ return add_failure
+ else do
isdir <- doesDirectoryReallyExist f
if isdir
then trypatch $ myadddir f
hunk ./src/Darcs/Commands/Add.lhs 194
if islink then
putInfo $ "Sorry, file " ++ f ++ " is a symbolic link, which is unsupported by darcs."
else putInfo $ "File "++ f ++" does not exist!"
- return (cur, Nothing, Nothing)
- where trypatch p =
+ return add_failure
+ where already_has = if gotAllowCaseOnly
+ then slurp_has f cur
+ else slurp_has_anycase f cur
+ is_badfilename = not (gotAllowWindowsReserved || WindowsFilePath.isValid f)
+ add_failure = (cur, Nothing, Nothing)
+ trypatch p =
case apply_to_slurpy p cur of
Nothing -> do putInfo $ msg_skipping msgs ++ " '" ++ f ++ "' ... " ++ parent_error
return (cur, Nothing, Nothing)
hunk ./src/Darcs/Commands/Add.lhs 220
then addfile (d++"-"++date) :>:
move (d++"-"++date) d :>: NilFL
else addfile d :>: NilFL
-
putVerbose = if Verbose `elem` opts || DryRun `elem` opts
then putStrLn
else \_ -> return ()
hunk ./src/Darcs/Commands/Add.lhs 226
putInfo = if Quiet `elem` opts then \_ -> return () else hPutStrLn stderr
gotFancyMoveAdd = FancyMoveAdd `elem` opts
gotAllowCaseOnly = AllowCaseOnly `elem` opts
+ gotAllowWindowsReserved = AllowWindowsReserved `elem` opts
data AddMessages =
AddMessages
hunk ./src/Darcs/Commands/Mv.lhs 27
import Darcs.SignalHandler ( withSignalsBlocked )
import Darcs.Commands ( DarcsCommand(..), nodefaults )
-import Darcs.Arguments ( DarcsFlag( AllowCaseOnly ),
+import Darcs.Arguments ( DarcsFlag( AllowCaseOnly, AllowWindowsReserved ),
fixSubPaths, working_repo_dir,
list_files, allow_problematic_filenames, umask_option,
)
hunk ./src/Darcs/Commands/Mv.lhs 44
import Darcs.SlurpDirectory ( Slurpy, slurp, slurp_has, slurp_has_anycase,
slurp_remove, slurp_hasdir, slurp_hasfile )
import FileName ( fp2fn, fn2fp, super_name )
+import qualified System.FilePath.Windows as WindowsFilePath
#include "impossible.h"
\end{code}
hunk ./src/Darcs/Commands/Mv.lhs 141
check_new_and_old_filenames
:: [DarcsFlag] -> Slurpy -> Slurpy -> (FilePath, FilePath) -> IO (Maybe Prim)
check_new_and_old_filenames opts cur work (old,new) = do
+ unless (AllowWindowsReserved `elem` opts || WindowsFilePath.isValid new) $
+ fail $ "The filename " ++ new ++ " is not valid under Windows.\n" ++
+ "Use --reserved-ok to allow such filenames."
maybe_add_file_thats_been_moved <-
if slurp_has old work -- We need to move the object
then do unless (slurp_hasdir (super_name $ fp2fn new) work) $
[Resolve conflict between replace patches in Darcs.Arguments
Eric Kow <[EMAIL PROTECTED]>**20080922202647] replace ./src/Darcs/Arguments.lhs [A-Za-z_0-9] allow_caseonly allow_problematic_filenames
Context:
[fix bug I introduced into issue1039 test.
David Roundy <[EMAIL PROTECTED]>**20080921213043
Ignore-this: 5b3c6476abae6bb050be014555d05bbe
]
[Fix hang after a user input error (for example, EOF).
Judah Jacobson <[EMAIL PROTECTED]>**20080918163017]
[replace consRLSealed with a more general mapFlipped.
David Roundy <[EMAIL PROTECTED]>**20080921185241
Ignore-this: c28f73f165254582cba6a14ba6ce93
]
[make issue1039 fix allow small dissimilar repositories.
David Roundy <[EMAIL PROTECTED]>**20080921184515
Ignore-this: 918a09df18ef48c649c1bfaa866d6176
]
[revert refactor that breaks type witnesses.
David Roundy <[EMAIL PROTECTED]>**20080921182331
Ignore-this: dd692cffc1a238d6726448bacfe9cacc
]
[Add '--ignore-unrelated-repos' option to disable unrelated repositories check.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919152631]
[Resolve issue1039: detect seemingly unrelated repositories when doing push, pull and send.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919144553]
[Refactor in pull_cmd.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919135349
Ignore-this: e26a489a7a53aeaba544ae5ad0006700
]
[Test for issue1039.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919153011]
[manual: add an example of record --pipe prompts similar to tag --pipe docs
Simon Michael <[EMAIL PROTECTED]>**20080918205353]
[user manual corrections regarding what record and tag --pipe prompt for
Simon Michael <[EMAIL PROTECTED]>**20080918204500]
[clarify the short help for --pipe
Simon Michael <[EMAIL PROTECTED]>**20080918193717]
[Spaces in Darcs.Arguments.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919150440]
[Spaces in Darcs.Commands.Send.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919150139]
[Spaces in Darcs.Commands.Pull.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919145812]
[Spaces in Darcs.Commands.Push.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919145553]
[Print "We have the following patches to send:" only when we really have somthing to send.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919114229]
[Use gmakeisms for prettier output.
Trent W. Buck <[EMAIL PROTECTED]>**20080919071358]
[fix changes.pl test (translating to bash)
David Roundy <[EMAIL PROTECTED]>**20080917182432
Ignore-this: 5f8bc7e1f9eadc073402a935142281c4
This test made assumptions such as that darcs wouldn't ever add a long
comment to its internal representation of changes, which are now
broken.
]
[hokey fix to allow unit tests to generate random input.
David Roundy <[EMAIL PROTECTED]>**20080917170913
Ignore-this: 31e847e82eef741f4c6cc857fd79a245
A nicer fix would be to move namepatch and patchinfo into some sort of
random-number monad rather than leaving them in IO and using
unsafePerformIO in the example-generation scripts.
]
[resolve issue27: add junk to patch identifiers.
David Roundy <[EMAIL PROTECTED]>**20080917154657
Ignore-this: b91ab6f6e05e0fda25488fa51653b741
]
[TAG 2.0.3pre1
Eric Kow <[EMAIL PROTECTED]>**20080918023645]
Patch bundle hash:
e3f3ba6371fdaa18f98e9494ee6a546d2892a60c
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users