(Note: --repodir for changes updated to not conflict with previous patches)
Fri Dec 30 01:54:24 CET 2005 Eric Kow <[EMAIL PROTECTED]>
* Added --repodir argument to init (RT #104 and part of RT #196)
This implementation also tries to create the repodir if it does not exist.
Fri Dec 30 03:16:52 CET 2005 Eric Kow <[EMAIL PROTECTED]>
* --repodir argument for several commands (RT #196 and RT #559)
Commands affected: dist, optimize, repair, replace, setpref, tag, trackdown
Includes a small repodir test script.
Note that wrt RT #196
* replace and setpref (marked "no need" in the bug report -- but I don't
see why not)
* changes (--repo) untouched [ I'd suggest having both flags available ]
* get (--repo-name) [ no reccomendations ]
Fri Dec 30 14:36:05 CET 2005 Eric Kow <[EMAIL PROTECTED]>
* --repodir argument for get (RT #196 - controversial?)
get already accepts a --repo-name flag, but I see no reason to keep this
distinction, especially if we accept that init should accept --repodir
In this implementation, we also keep the old --repo-name around for backwards
compatability (of dubious value here), but the internal representation is
changed to that of repodir
Mon Jan 9 01:12:24 CET 2006 Eric Kow <[EMAIL PROTECTED]>
* --repodir for changes (RT #196 and #567)
Changes already accepts a --repo flag for possibly remote repo dirs, but there
is no reason not to also accept --repodir. The gain in consistency outweighs
the cost in redundancy.
Also, do not attempt to get_repodir unless --repo is in the arguments. This
is so that --repodir can work with relative paths. (Otherwise, darcs tries to
change directory twice, which is bad).
New patches:
[Added --repodir argument to init (RT #104 and part of RT #196)
Eric Kow <[EMAIL PROTECTED]>**20051230005424
This implementation also tries to create the repodir if it does not exist.
] {
hunk ./DarcsRepo.lhs 124
-am_not_in_repo _ = do air <- doesFileExist "_darcs/inventory" `mand`
+am_not_in_repo f = do go_to_workdir True f
+ air <- doesFileExist "_darcs/inventory" `mand`
hunk ./DarcsRepo.lhs 132
-am_in_repo (WorkDir d:_) = do setCurrentDirectory d `catchall`
- (fail $ "can't set directory to "++d)
- am_in_repo []
-am_in_repo (_:fs) = am_in_repo fs
-am_in_repo [] = a_i_r ""
+am_in_repo fs = do go_to_workdir False fs
+ a_i_r ""
hunk ./DarcsRepo.lhs 156
+
+go_to_workdir :: Bool -> [DarcsFlag] -> IO ()
+go_to_workdir create (WorkDir d:_) =
+ do when create $ createDirectoryIfMissing False d
+ -- note that the above could always fail
+ setCurrentDirectory d
+ `catchall` (fail $ "can't set directory to "++d)
+go_to_workdir c (_:fs) = go_to_workdir c fs
+go_to_workdir _ [] = return ()
hunk ./Init.lhs 23
-import DarcsArguments ( DarcsFlag, pristine_tree )
+import DarcsArguments ( DarcsFlag, pristine_tree, working_repo_dir )
hunk ./Init.lhs 64
- command_darcsoptions = [pristine_tree]}
+ command_darcsoptions = [pristine_tree,
+ working_repo_dir]}
addfile ./tests/init.pl
hunk ./tests/init.pl 1
+#!/usr/bin/env perl
+
+# Some tests for the repodir flag
+
+use lib qw(lib/perl);
+
+use Test::More qw/no_plan/;
+
+use Test::Darcs;
+use Shell::Command;
+
+use strict;
+
+my $test_name = 'Make sure that a simple init works.';
+cleanup 'temp1';
+mkpath 'temp1';
+chdir 'temp1';
+darcs 'init';
+ok((-d '_darcs'), '_darcs directory was created');
+
+$test_name = 'Make sure that init in a pre-existing darcs directory fails.';
+like(darcs('init'), qr/not run this command in a repository/, $test_name);
+
+$test_name = 'Make sure that init --repodir creates the directory if it does not exist';
+chdir '../';
+cleanup 'temp1';
+darcs 'init --repodir=temp1';
+ok((-d 'temp1/_darcs'), '_darcs directory was created');
+
+# cleanup
+chdir '../';
+cleanup 'temp1';
+ok((!-d 'temp1'), 'temp1 directory was deleted');
}
[--repodir argument for several commands (RT #196 and RT #559)
Eric Kow <[EMAIL PROTECTED]>**20051230021652
Commands affected: dist, optimize, repair, replace, setpref, tag, trackdown
Includes a small repodir test script.
Note that wrt RT #196
* replace and setpref (marked "no need" in the bug report -- but I don't see why not)
* changes (--repo) untouched [ I'd suggest having both flags available ]
* get (--repo-name) [ no reccomendations ]
] {
hunk ./Dist.lhs 26
-import Repository ( amInRepository )
+import Repository ( amInRepository, withRepoLock )
hunk ./Dist.lhs 76
- command_darcsoptions = [distname_option, verbose]}
+ command_darcsoptions = [distname_option, verbose, working_repo_dir]}
hunk ./Dist.lhs 81
-dist_cmd opts _ = do
+dist_cmd opts _ = withRepoLock $ \_ -> do
hunk ./Optimize.lhs 34
+ working_repo_dir,
hunk ./Optimize.lhs 86
+ working_repo_dir,
hunk ./Repair.lhs 27
- any_verbosity,
+ any_verbosity, working_repo_dir,
hunk ./Repair.lhs 65
- command_darcsoptions = [any_verbosity]}
+ command_darcsoptions = [any_verbosity, working_repo_dir]}
hunk ./Replace.lhs 119
- command_darcsoptions = [tokens, force_replace, verbose]}
+ command_darcsoptions = [tokens, force_replace, verbose, working_repo_dir]}
hunk ./SetPref.lhs 24
-import DarcsArguments ( DarcsFlag, )
-import Repository ( identifyRepository, amInRepository, add_to_pending )
+import DarcsArguments ( DarcsFlag, working_repo_dir )
+import Repository ( amInRepository, add_to_pending, withRepoLock )
hunk ./SetPref.lhs 92
- command_darcsoptions = []}
+ command_darcsoptions = [working_repo_dir]}
hunk ./SetPref.lhs 97
-setpref_cmd _ [pref,val] = do
- repository <- identifyRepository "."
+setpref_cmd _ [pref,val] = withRepoLock $ \repository -> do
hunk ./Tag.lhs 65
- pipe_interactive, verbose]}
+ pipe_interactive, verbose,
+ working_repo_dir]}
hunk ./TrackDown.lhs 24
-import DarcsArguments ( DarcsFlag, verbose )
+import DarcsArguments ( DarcsFlag, verbose, working_repo_dir )
hunk ./TrackDown.lhs 26
-import Repository ( identifyRepository, amInRepository, read_repo )
+import Repository ( amInRepository, read_repo, withRepoLock )
hunk ./TrackDown.lhs 66
- command_darcsoptions = [verbose]}
+ command_darcsoptions = [verbose, working_repo_dir]}
hunk ./TrackDown.lhs 71
-trackdown_cmd opts args = do
- repository <- identifyRepository "."
+trackdown_cmd opts args = withRepoLock $ \repository -> do
addfile ./tests/repodir.pl
hunk ./tests/repodir.pl 1
+#!/usr/bin/env perl
+
+# Some tests for the repodir flag
+
+use lib qw(lib/perl);
+
+use Test::More qw/no_plan/;
+
+use Test::Darcs;
+use Shell::Command;
+
+use strict;
+
+cleanup 'temp1';
+mkpath 'temp1';
+
+my $repo_flag = '--repodir=temp1';
+my $test_name = 'Make sure that init works with --repodir';
+darcs "init $repo_flag";
+ok((-d 'temp1/_darcs'), '_darcs directory was created');
+
+# add some meat to that repository
+chdir 'temp1';
+touch 'baz';
+darcs qw( add baz ) ;
+darcs qw( record -A me -m moo -a ) ;
+chdir '../';
+
+$test_name = 'dist accepts --repodir.';
+like( darcs("dist $repo_flag"), qr/Created dist/i, $test_name );
+
+$test_name = 'optimize accepts --repodir.';
+like( darcs("optimize --reorder-patches $repo_flag"), qr/done optimizing/i, $test_name );
+
+$test_name = 'repair accepts --repodir.';
+like( darcs("repair $repo_flag"), qr/already consistent/i, $test_name );
+
+$test_name = 'replace accepts --repodir.';
+like( darcs("replace $repo_flag foo bar"), qr//i, $test_name );
+
+$test_name = 'setpref accepts --repodir.';
+like( darcs("setpref $repo_flag test echo"), qr/Changing value of test/i, $test_name );
+
+$test_name = 'trackdown accepts --repodir.';
+like( darcs("trackdown $repo_flag"), qr/Success!/i, $test_name );
+
+# cleanup
+chdir '../';
+cleanup 'temp1';
+ok((!-d 'temp1'), 'temp1 directory was deleted');
}
[--repodir argument for get (RT #196 - controversial?)
Eric Kow <[EMAIL PROTECTED]>**20051230133605
get already accepts a --repo-name flag, but I see no reason to keep this
distinction, especially if we accept that init should accept --repodir
In this implementation, we also keep the old --repo-name around for backwards
compatability (of dubious value here), but the internal representation is
changed to that of repodir
] {
hunk ./DarcsArguments.lhs 101
-get_content (RepoName s) = Just s
hunk ./DarcsArguments.lhs 105
+get_content (WorkDir s) = Just s
hunk ./DarcsArguments.lhs 674
-reponame = DarcsArgOption [] ["repo-name"] RepoName "DIRECTORY"
+reponame = DarcsArgOption [] ["repo-name"] WorkDir "DIRECTORY"
hunk ./DarcsFlags.lhs 44
- | RepoName String
hunk ./Get.lhs 27
-import DarcsArguments ( DarcsFlag( RepoName, Partial,
+import DarcsArguments ( DarcsFlag( WorkDir, Partial,
hunk ./Get.lhs 32
- pristine_tree )
+ pristine_tree, working_repo_dir )
hunk ./Get.lhs 100
- pristine_tree]}
+ pristine_tree,
+ working_repo_dir]}
hunk ./Get.lhs 105
-get_cmd opts [inrepodir, outname] = get_cmd (RepoName outname:opts) [inrepodir]
+get_cmd opts [inrepodir, outname] = get_cmd (WorkDir outname:opts) [inrepodir]
hunk ./Get.lhs 196
-make_repo_name (RepoName n:_) _ =
+make_repo_name (WorkDir n:_) _ =
hunk ./tests/repodir.pl 15
+cleanup 'temp2';
hunk ./tests/repodir.pl 30
+$test_name = 'get accepts --repodir.';
+like( darcs("get --repodir=temp2 temp1"), qr/Finished getting/i, $test_name );
+ok((-d 'temp2/_darcs'), '_darcs directory was created');
+cleanup 'temp2';
+$test_name = 'get accepts absolute --repodir.';
+like( darcs("get --repodir=`pwd`/temp2 temp1"), qr/Finished getting/i, $test_name );
+ok((-d 'temp2/_darcs'), '_darcs directory was created');
+
hunk ./tests/repodir.pl 60
+cleanup 'temp2';
+ok((!-d 'temp2'), 'temp1 directory was deleted');
}
[--repodir for changes (RT #196 and #567)
Eric Kow <[EMAIL PROTECTED]>**20060109001224
Changes already accepts a --repo flag for possibly remote repo dirs, but there
is no reason not to also accept --repodir. The gain in consistency outweighs
the cost in redundancy.
Also, do not attempt to get_repodir unless --repo is in the arguments. This
is so that --repodir can work with relative paths. (Otherwise, darcs tries to
change directory twice, which is bad).
] {
hunk ./Changes.lhs 26
+ RepoDir,
hunk ./Changes.lhs 30
+ working_repo_dir,
hunk ./Changes.lhs 84
+ working_repo_dir,
hunk ./Changes.lhs 96
- let files = sort $ map (fix_filepath opts) args
+ let files = sort $ map (fix_filepath opts) args
+ -- Why '.'? Because if it was WorkDir (--repodir); then the
+ -- findRepository prereq would already have cd'd its way up
+ repodir = if hasRepoDir opts then get_repodir opts else "."
hunk ./Changes.lhs 101
- repository <- identifyRepository (get_repodir opts)
+ repository <- identifyRepository repodir
hunk ./Changes.lhs 117
+
+hasRepoDir :: [DarcsFlag] -> Bool
+hasRepoDir [] = False
+hasRepoDir (RepoDir _:_) = True
+hasRepoDir (_:fs) = hasRepoDir fs
hunk ./tests/repodir.pl 38
+$test_name = 'changes accepts --repodir.';
+like( darcs("changes $repo_flag"), qr/moo/i, $test_name );
+$test_name = 'changes accepts absolute --repo.';
+like( darcs("changes --repo=`pwd`/temp1"), qr/moo/i, $test_name );
+TODO: {
+ local $TODO = 'waiting on coding';
+ $test_name = 'changes accepts relative --repo.';
+ like( darcs("changes --repo=temp1"), qr/moo/i, $test_name );
+}
+
}
Context:
[Update "darcs init" documentation to match its behavior.
Bill Trost <[EMAIL PROTECTED]>**20060105040737]
[add a --without-docs option to configure
[EMAIL PROTECTED]
[fix for Issue14 remove darcs-createrepo
Jason Dagit <[EMAIL PROTECTED]>**20051224002230]
[Support --interactive option in changes command (issue #59).
Zachary P. Landau <[EMAIL PROTECTED]>**20051221052049]
[Fix type incompatibility between C code and Haskell foreign declaration.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060106154108]
[Move patchSetToPatches to Repository.lhs
Zachary P. Landau <[EMAIL PROTECTED]>**20051219043719]
[Use _darcs/pristine instead of _darcs/current.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20051215180814
All versions of Darcs since 1.0.2rc1 are able to handle either name. This
will break compatibility of new repositories with older versions.
]
[Allow rename to different case (RT #466, case-insensitive file systems)
Eric Kow <[EMAIL PROTECTED]>**20060106000141
Creates an exception in the check that the new name does not already exists;
it's ok if both names reduce to the same canonical path
]
[Invert 'file exists already' error message in mv
Eric Kow <[EMAIL PROTECTED]>**20051230220431
mv used the wrong error message for --case-ok and opposite
]
[bug fixes for darcs help
Eric Kow <[EMAIL PROTECTED]>**20051230011003]
[Canonize myself and almost all other contributers.
Eric Kow <[EMAIL PROTECTED]>**20051229140428
Add function to append name to email address
Merged: Marnix Klooster, Eric Kow, Andres Loeh, Esa Ilari Vuokko
Looked up name on Google for most orphaned email addresses.
Hope nobody actually objects to this.
]
[Do not document "darcs query manifest" twice.
Erik Schnetter <[EMAIL PROTECTED]>**20051222125103]
[Rename git.c to gitlib.c
Erik Schnetter <[EMAIL PROTECTED]>**20051222115318
On case-insensitive file systems, the source files Git.lhs and git.c
lead to the same object file git.o. Renaming git.c to gitlib.c solves
this problem.
]
[Remove periods from the AC_MSG_CHECKING call for the release state.
Matt Kraai <[EMAIL PROTECTED]>**20051220174536]
[Implementation of help command
Eric Kow <[EMAIL PROTECTED]>**20051218172558
(RT #307)
Provides a command to display usage information on the screen.
darcs help = darcs --help
darcs help --verbose = darcs --extended-help
darcs help command = darcs command --help
This implementation understands abbreviated commands and subcommands.
Slightly refactors darcs.lhs.
]
[Extended date matching functionality.
Eric Kow <[EMAIL PROTECTED]>**20051228210942
(issue31 and RT #34)
Now accepts ISO 8601 intervals (mostly) as well as a larger subset of
English (including times like "yesterday at noon").
Note: also includes corrections to ISO 8601 date/time parsing, using
a more elegant technique of building dates up.
]
[Partial implementation of iso 8601 dates
Eric Kow <[EMAIL PROTECTED]>**20051228123040
(issue31) - first step
reluctant to implement (ambiguous!):
* years > 9999
* truncated representations with implied century (89 for 1989)
unimplemented:
* time intervals -- this might be good to have in darcs
* negative dates (BC)
]
[only print 'making executable' in verbose mode
Eric Kow <[EMAIL PROTECTED]>**20051226182817]
[reorganize comments (and add a comment) in Depends.lhs.
David Roundy <[EMAIL PROTECTED]>**20051218122029]
[fix bug in doesDirectoryReallyExist.
David Roundy <[EMAIL PROTECTED]>**20051020121710
We were failing with an exception if there was no such object. The error
message was:
Fail: getSymbolicLinkStatus: does not exist
]
[fix type of foreign calls in FastPackedString.
David Roundy <[EMAIL PROTECTED]>**20050920125800]
[rename RepoTypes to PatchSet.
David Roundy <[EMAIL PROTECTED]>**20050917133920]
[remove PatchSequence, which has long been obsolete.
David Roundy <[EMAIL PROTECTED]>**20050917133313
The patch removes remaining vestiges of PatchSequence, which was obsoleted
long ago by PatchSet (which stores patches in the opposite order (better
for lazy use) and which has additional information about tags that allows
us to avoid looking at old history.
]
[RemoteApply no longer depends on cd, use --repodir instead.
[EMAIL PROTECTED]
This is a minor change to make darcs no longer use cd
before applying patches to a remote repository.
Now the --repodir option for the apply command is used.
This patch came from a hack to rssh[http://sf.net/projects/rssh]
to allow using darcs as a restricted command without depending
on the cd binary.
http://sf.net/tracker/index.php?func=detail&aid=1351939&group_id=65349&atid=510643
]
[Support signed push
Esa Ilari Vuokko <[EMAIL PROTECTED]>**20051129082159]
[Fix typo in multirepo pull.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20051217201918]
[Fix merge conflicts.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20051217201903]
[add changelog entry for multirepo pull.
David Roundy <[EMAIL PROTECTED]>**20051215122808]
[add support for pulling from multiple repositories simultaneously.
David Roundy <[EMAIL PROTECTED]>**20050919125012]
[Use POSIX-style option for 'head', instead of obsolescent syntax
Marnix Klooster <[EMAIL PROTECTED]>**20051216111731]
[Clarify wording for changes that can't be unreverted
[EMAIL PROTECTED]
[Set attachment filename when sending a patch bundle by e-mail.
Zachary P. Landau <[EMAIL PROTECTED]>**20051217195009]
[save long comment file if a test fails during record
Zachary P. Landau <[EMAIL PROTECTED]>**20051216023948]
[correction for send.sh test
Eric Kow <[EMAIL PROTECTED]>**20051218095652
previously failed on (at least) MacOS X 10.3.9
]
[properly quote paths so that paths with spaces in them are okay
[EMAIL PROTECTED]
[fix up debug printouts in cygwin-wrapper.bash
[EMAIL PROTECTED]
[smoother invocation of cygwin-wrapper.bash -- it detects fully-qualified path to itself by leading /
[EMAIL PROTECTED]
[modernize amend-record.pl to be more portable.
Mark Stosberg <[EMAIL PROTECTED]>**20050402133417
This depends on the new "echo_to_darcs()" function in Test::Darcs
]
[implementation of --set-scripts-executable on local darcs get
[EMAIL PROTECTED]
proposed fix for issue38
The --set-scripts-executable flag is normally evaluated when you apply
patches. But when you do a local darcs get, no patches are applied.
So as a solution, we traverse the directory on local darcs get , and set
any script files to be executable.
Note: one flaw in this patch is that it duplicates the definition of
what a script is -- a file that starts with #! -- in PatchApply.lhs and
Get.lhs. It might be good to refactor these somehow.
]
[extended set-scripts-executable test
[EMAIL PROTECTED]
added check for local darcs get (issue 38) as well as initial sanity check
]
[Fix merge conflicts.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20051214223217]
[Add --subject flag to 'darcs send'
Joeri van Ruth <[EMAIL PROTECTED]>**20051205120301]
[print out the patch name when a test fails.
Zachary P. Landau <[EMAIL PROTECTED]>**20051205055109]
[revert maybe_relink and atomic_create to original C code.
David Roundy <[EMAIL PROTECTED]>**20051208131213]
[resolve conflicts between stable and unstable.
David Roundy <[EMAIL PROTECTED]>**20051206134818]
[Merge changes
Ian Lynagh <[EMAIL PROTECTED]>**20051008225210]
[fix mkstemp implementation for win32
Peter Strand <[EMAIL PROTECTED]>**20050810211303]
[Implement parts of System.Posix.(IO|Files) for win32
[EMAIL PROTECTED]
[implement RawMode with library functions instead of ffi
[EMAIL PROTECTED]
[call hsc2hs without output filename argument
[EMAIL PROTECTED]
[Rename compat.c to c_compat.c to avoid object filename conflict with Compat.hs
[EMAIL PROTECTED]
[Move atomic_create/sloppy_atomic_create to Compat
Ian Lynagh <[EMAIL PROTECTED]>**20050730141703]
[Split the raw mode stuff out into its own .hsc file. Windows needs some TLC
Ian Lynagh <[EMAIL PROTECTED]>**20050730134030]
[Move maybe_relink out of compat.c
Ian Lynagh <[EMAIL PROTECTED]>**20050730131205]
[Remove is_symlink
Ian Lynagh <[EMAIL PROTECTED]>**20050730122255]
[Move mkstemp to Compat.hs
Ian Lynagh <[EMAIL PROTECTED]>**20050730020918]
[Start Compat.hs, and move stdout_is_a_pipe from compat.c
Ian Lynagh <[EMAIL PROTECTED]>**20050730004829]
[Fix mistyped /dev/null, fixes --sendmail-command in Windows
Esa Ilari Vuokko <[EMAIL PROTECTED]>**20051129160120]
[Use \ as path separator for GnuPG in Windows -- makes apply --verify work
Esa Ilari Vuokko <[EMAIL PROTECTED]>**20051129164533]
[make dangers and recommended use of "Amend" clearer in the docs.
Mark Stosberg <[EMAIL PROTECTED]>**20051213140523
I think it's important to be clearer about when it's appropriate to use 'amend',
so I moved some notes into the short and mid-length help texts.
]
[update web page to reflect 1.0.5 as latest stable source.
Tommy Pettersson <[EMAIL PROTECTED]>**20051213111137]
[fix handling of absolute paths containing drive letters
Will <[EMAIL PROTECTED]>**20051208054737
This fixes issue 47 where paths containing drive letters (i.e. on windows)
are not treated as absolute paths.
]
[bump version to 1.0.6pre1
Tommy Pettersson <[EMAIL PROTECTED]>**20051208092839]
[TAG 1.0.5
Tommy Pettersson <[EMAIL PROTECTED]>**20051207112730]
Patch bundle hash:
6c6365bd2b5bd447d5de8e3bc7b8dd8ae054a5da
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel