On 2005-08-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> --=_
>
> I started using darcs to keep certain files in my home directory under revi=
> sion
> control. This is nice both to keep a history of changes and also so that w=
> hen I am
> on a new machine I can, for example, get my favorite .vimrc setup.
>
> Unfortunately, the get command refuses to create a repository in a director=
> y
> that already exists. I added the --force option to get to allow this sort =
> of
> thing when you are sure it is want you want. Hopefully other people agree =
> that
> this is useful.
I see the usefulness, but it's easily worked around with 'darcs init; darcs
pull;'
I would want a more specific flag name besides, such as --force-existing-dir.
There are other things we may want to force in later.
Today I would have liked to have this feature, along with
--force-overwrite-files
Why? I was converting a live website to use darcs, and I wanted the
transition to happen as fast as possible.
If darcs could have always deferred to the copy of files that it pulled,
that would have been ideal.
As it was, extra steps were needed to take an inventory of all files
that darcs was managing, and then delete them before I did a 'darcs
init' and 'darcs pull'
>
> I haven't done any Haskell before, so feel free to nitpick about style.
>
> Tue Aug 9 13:17:06 EDT 2005 [EMAIL PROTECTED]
> * Added --force option to get command
> This option allows the get command to create a repository in a directory
> that already exists.
>
>
> --=_
> Content-Type: text/x-darcs-patch
> Content-Transfer-Encoding: quoted-printable
> Content-Description: A darcs patch for your repository!
>
> gpg: Invalid passphrase; please try again ...
>
>
> New patches:
>
> [Added --force option to get command
> [EMAIL PROTECTED]
> This option allows the get command to create a repository in a directory
> that already exists.
> ] {
> hunk ./DarcsArguments.lhs 59
> - - files, directories, pending, nullFlag
> + files, directories, pending, force_get, nullFlag,
> hunk ./DarcsArguments.lhs 178
> - - logfile, rmlogfile, leave_test_dir, from_opt, set_default, pristine_tr=
> ee
> + logfile, rmlogfile, leave_test_dir, from_opt, set_default, pristine_tree=
> ,
> + force_get
> hunk ./DarcsArguments.lhs 983
> +
> +\begin{code}
> +force_get =3D DarcsMultipleChoiceOption
> + [DarcsNoArgOption [] ["force"] ForceGet
> + "proceed with get even if directory already exists",
> + DarcsNoArgOption [] ["no-force"]
> + NonForce "don't force the get if the directory exists"]
> +\end{code}
> +
> hunk ./DarcsFlags.lhs 65
> - - | Pending | NoPending
> + | Pending | NoPending | ForceGet
> hunk ./Get.lhs 29
> - - Verbose, Quiet, Context ),
> + Verbose, Quiet, Context, ForceGet ),
> hunk ./Get.lhs 32
> - - pristine_tree )
> + pristine_tree, force_get )
> hunk ./Get.lhs 96
> - - pristine_tree]}
> + pristine_tree,
> + force_get]}
> hunk ./Get.lhs 115
> - - createDirectory mysimplename
> + if not (ForceGet `elem` opts)
> + then
> + createDirectory mysimplename
> + else
> + putVerbose $ text "Using existing directory"
> hunk ./Get.lhs 187
> - -make_repo_name (RepoName n:_) _ =3D
> +make_repo_name (RepoName n:opts) _ =3D
> hunk ./Get.lhs 190
> - - if exists || file_exists
> + if not (ForceGet `elem` opts) && (exists || file_exists)
> addfile ./tests/get_force.sh
> hunk ./tests/get_force.sh 1
> +#!/bin/sh
> +
> +set -ev
> +
> +test $DARCS || DARCS=3D$PWD/../darcs
> +
> +rm -rf temp1 temp2
> +mkdir temp1
> +cd temp1
> +$DARCS initialize
> +cd ..
> +mkdir temp2
> +$DARCS get --force temp1 temp2 || exit 1
> +
> +rm -rf temp1 temp2
> }
>
> Context:
>
> [remove TODO annotation for two tests that now pass.
> David Roundy <[EMAIL PROTECTED]>**20050728115034] =
>
> [fix bug introduced in 208 fix which messed up --list-options output.
> David Roundy <[EMAIL PROTECTED]>**20050729121804
> We need to make sure that drop_paths doesn't do anything to an absolute
> path or URL.
> ] =
>
> [Merge changes
> Ian Lynagh <[EMAIL PROTECTED]>**20050728230858] =
>
> [Don't die on sigALRM (linking with -threaded means we see loads of them)
> Ian Lynagh <[EMAIL PROTECTED]>**20050728131023] =
>
> [Give help for 'c' in selectchanges
> Ian Lynagh <[EMAIL PROTECTED]>**20050728125910] =
>
> [Update QueryManifest with the Repository changes
> Ian Lynagh <[EMAIL PROTECTED]>**20050728185646] =
>
> [Merge changes
> Florian Weimer <[EMAIL PROTECTED]>**20050607203225] =
>
> [Fix typo
> Florian Weimer <[EMAIL PROTECTED]>**20050510113824] =
>
> [Test case for "query manifest"
> Florian Weimer <[EMAIL PROTECTED]>**20050510113803] =
>
> [Remove the "query changes" and "query annotate" subcommands
> Florian Weimer <[EMAIL PROTECTED]>**20050510060221] =
>
> [Do not mention file name in error message for disabled commands
> Florian Weimer <[EMAIL PROTECTED]>**20050510054931
> =
>
> We have multiple configuration files, and we do not know tat this point wh=
> ich
> file contains the "disable" option.
> ] =
>
> [Remove --disable on supercommands
> Florian Weimer <[EMAIL PROTECTED]>**20050510054744] =
>
> [Resolve conflict
> Florian Weimer <[EMAIL PROTECTED]>**20050510054405] =
>
> [Add --help in command_options, like --disable
> Florian Weimer <[EMAIL PROTECTED]>**20050510053348
> =
>
> --list-options is still separate, to keep it undocumented.
> ] =
>
> [Resolve conflict
> Florian Weimer <[EMAIL PROTECTED]>**20050510052119] =
>
> [Move --disable to the end of the option list
> Florian Weimer <[EMAIL PROTECTED]>**20050510051905] =
>
> [Include the query subcommand documentation in Query.lhs
> Florian Weimer <[EMAIL PROTECTED]>**20050510051533] =
>
> [Print usage information if the subcommand is missing
> Florian Weimer <[EMAIL PROTECTED]>**20050509101427
> =
>
> Add a separating line to the invalid subcommand error message.
> ] =
>
> [Fix empty lines in "darcs query --help" output
> Florian Weimer <[EMAIL PROTECTED]>**20050509100509] =
>
> [Resolve conflicts
> Florian Weimer <[EMAIL PROTECTED]>**20050509094729] =
>
> [Add the --disable option in command_options, not in run_the_command
> Florian Weimer <[EMAIL PROTECTED]>**20050509093929
> =
>
> This change makes it possible to specialize the list of default commands
> (such as --disable) on different DarcsCommand constructors.
> ] =
>
> [Add --pending option to "query manifest"
> Florian Weimer <[EMAIL PROTECTED]>**20050508080502] =
>
> [Add the --files and --directories options to "query manifest"
> Florian Weimer <[EMAIL PROTECTED]>**20050507223327] =
>
> [Implement list_slurpy_dirs
> Florian Weimer <[EMAIL PROTECTED]>**20050507223257] =
>
> [Add --null flag to the "query manifest" command
> Florian Weimer <[EMAIL PROTECTED]>**20050507213547] =
>
> [Add "query manifest" command
> Florian Weimer <[EMAIL PROTECTED]>**20050507163125] =
>
> [Implement the \haskell command for subcommands
> Florian Weimer <[EMAIL PROTECTED]>**20050507160607] =
>
> [Mention the structure of subcommands in the documentation
> Florian Weimer <[EMAIL PROTECTED]>**20050507151003] =
>
> [Handle subcommands in the preprocessor
> Florian Weimer <[EMAIL PROTECTED]>**20050507150829
> =
>
> You can use "\options{SUPER SUB}" to document the options of a
> subcommand.
> ] =
>
> [Do not include the "query" command in the manual
> Florian Weimer <[EMAIL PROTECTED]>**20050507150707
> =
>
> The commands will be documented individually, in the relevant section.
> ] =
>
> [Mention "query" subcommands in the man page
> Florian Weimer <[EMAIL PROTECTED]>**20050507135756
> =
>
> "changes" is now documented as "query changes". "query annotate" is
> mentioned, too.
> ] =
>
> [add subcommand infrastructure and (currently useless) query command.
> David Roundy <[EMAIL PROTECTED]>**20050507115457
> The idea of course is that this can be readily extended to add nice new
> simple subcommands under query.
> ] =
>
> [Include autoconf-detected libs in LDFLAGS
> Joshua J. Berry <[EMAIL PROTECTED]>**20050728031609
> Autoconf uses @LIBS@ -- not @LDFLAGS@ -- for libraries it detects (e.g. us=
> ing
> AC_SEARCH_LIBS).
> ] =
>
> [resolve conflict with myself...
> David Roundy <[EMAIL PROTECTED]>**20050727100745] =
>
> [fix pulling from a relative defaultrepo from within a subdirectory.
> David Roundy <[EMAIL PROTECTED]>**20050722105708
> This is a fix for bug #208. It is perhaps a tad more invasive than
> necesary, and introduces a FilePathUtils module that is perhaps
> overkill... especially since it doesn't do much.
> ] =
>
> [Small tweaks to the with_new_pending patch
> Ian Lynagh <[EMAIL PROTECTED]>**20050727025308] =
>
> [replace write_pending with "with_new_pending".
> David Roundy <[EMAIL PROTECTED]>**20050722125725
> This patch is basically an extension of Ian's earlier patch that created a
> "write_pending_then" function. This one creates two functions,
> with_new_pending and add_to_pending.
> =
>
> The idea is that we can't check if a new pending is valid until after we'v=
> e
> updated the pristine cache. But it's possible that the pending patch
> itself was lazily generated with get_unrecorded, in which case it's not
> safe to modify the pristine cache until after we've written pending. This
> new interface makes it much harder to make this kind of mistake. I also
> think it's pretty intuitive.
> ] =
>
> [Removed an unused reference to Slurpy
> Ian Lynagh <[EMAIL PROTECTED]>**20050709114603] =
>
> [new changelog entries.
> David Roundy <[EMAIL PROTECTED]>**20050726123329] =
>
> [clean up formatting in Depends.
> David Roundy <[EMAIL PROTECTED]>**20050723130807] =
>
> [changelog entry for fix to RT#208.
> David Roundy <[EMAIL PROTECTED]>**20050722113803] =
>
> [make make_changelog a bit more flexible in its parsing.
> David Roundy <[EMAIL PROTECTED]>**20050722113701
> One can now have blank lines between the match: lines and the actual
> comments.
> ] =
>
> [give better error message when dealing with a non-repository.
> David Roundy <[EMAIL PROTECTED]>**20050722105908] =
>
> [make make_changelog ignore boring files (emacs backups) in changelog.in/en=
> tries/.
> David Roundy <[EMAIL PROTECTED]>**20050726121455] =
>
> [add changelog entry for get --partial fix.
> David Roundy <[EMAIL PROTECTED]>**20050723130715] =
>
> [scrunch up the tla/cvs tables a bit in the manual.
> David Roundy <[EMAIL PROTECTED]>**20050724181011] =
>
> [another alternative formatting for cvs/tla tables.
> Erik Schnetter <[EMAIL PROTECTED]>**20050724134656] =
>
> [fix bug in get_patches_beyond_tag that broke get --partial.
> David Roundy <[EMAIL PROTECTED]>**20050723125507
> The bug was that we sometimes looked at patches that weren't strictly
> necesary. This was because of the concat in get_patches_beyond_tag, which
> loses information about tag dependencies. A clean implementation of a
> get_extra that accepts a true PatchSet would be a nicer fix (since it migh=
> t
> fix other similar problems), but this fix is also correct and simple.
> ] =
>
> [alternative formatting for cvs/tla tables.
> Erik Schnetter <[EMAIL PROTECTED]>**20050724113905] =
>
> [make add/remove --list-options not output preceding ./
> David Roundy <[EMAIL PROTECTED]>**20050723134758
> We were treating the repository root differently from subdirectories
> because the file paths didn't need to get "fixed". Addresses bug #158.
> ] =
>
> [fix unit test that prompts for input
> Will <[EMAIL PROTECTED]>**20050722181028] =
>
> [put configure.ac back in the public domain.
> David Roundy <[EMAIL PROTECTED]>**20050720115702] =
>
> [advance DARCS_VERSION to 1.0.4pre2.
> David Roundy <[EMAIL PROTECTED]>**20050720115536
> In the new tradition of changing the version after a release rather than
> before a release (although when the release type changes to rc or actual
> release it'll have to be done before the release).
> ] =
>
> [drop $srcdir use; build-directories aren't supported anyway
> Peter Simons <[EMAIL PROTECTED]>**20050719140044] =
>
> [clean generated manual files at realclean
> Peter Simons <[EMAIL PROTECTED]>**20050719135935] =
>
> [cosmetic changes
> Peter Simons <[EMAIL PROTECTED]>**20050719135834] =
>
> [move comment to the right place
> Peter Simons <[EMAIL PROTECTED]>**20050719135818] =
>
> [let config.status generate config.command
> Peter Simons <[EMAIL PROTECTED]>**20050719135733] =
>
> [make use of autoconf 2.5x's AC_INIT macro
> Peter Simons <[EMAIL PROTECTED]>**20050719135611] =
>
> [use ./config.status to re-configure build after autoconf changes
> Peter Simons <[EMAIL PROTECTED]>**20050719135435] =
>
> [update distclean and realclean targets
> Peter Simons <[EMAIL PROTECTED]>**20050719135415] =
>
> [canonize [EMAIL PROTECTED]
> Peter Simons <[EMAIL PROTECTED]>**20050719134834] =
>
> [cosmetic change
> Peter Simons <[EMAIL PROTECTED]>**20050719134816] =
>
> [update test suite to work with Peter's makefile changes.
> David Roundy <[EMAIL PROTECTED]>**20050721102319] =
>
> [fix error in name of --reorder-patches flag.
> David Roundy <[EMAIL PROTECTED]>**20050722110752] =
>
> [Make DarcsRepo.add_to_inventory take a list.
> Juliusz Chroboczek <[EMAIL PROTECTED]>**20050720174029
> This avoids opening the inventory multiple times. Thanks to Ian for the h=
> int.
> ] =
>
> [Use mapM_ instead of the comprehensible alternative.
> Juliusz Chroboczek <[EMAIL PROTECTED]>**20050720164258
> Mentioning mapM_ always impresses people at dinner parties. Thanks to
> Ian for the hint.
> ] =
>
> [Move iterateGitTree out of the IO monad.
> Juliusz Chroboczek <[EMAIL PROTECTED]>**20050720162841
> We're reading immutable on-disk data, it's safe to do it unsafely.
> ] =
>
> [Clean up usage of interleaveIO in Git.
> Juliusz Chroboczek <[EMAIL PROTECTED]>**20050720162251] =
>
> [TAG 1.0.4pre1
> David Roundy <[EMAIL PROTECTED]>**20050718112234] =
>
> [make configure automatically guess the release state based on defaultrepo =
> and tags.
> David Roundy <[EMAIL PROTECTED]>**20050718112222] =
>
> [fix write_problem to show all problems.
> David Roundy <[EMAIL PROTECTED]>**20050717110628] =
>
> [don't import head and tail, which are in the prelude.
> David Roundy <[EMAIL PROTECTED]>**20050716143547] =
>
> [Push and pull can now show the detailed diffs of patches
> Jim Radford <[EMAIL PROTECTED]>**20050717042645
> The same distinction is now made between --summary and --verbose
> as changes makes.
> ] =
>
> [Rename bound variable in fromJust macro.
> Juliusz Chroboczek <[EMAIL PROTECTED]>**20050716221705
> Avoids ``shadows existing variable'' warnings which for some reason are
> errors.
> =
>
> Could we please use Lisp macros instead?
> ] =
>
> [TAG 2005-07-18
> Ian Lynagh <[EMAIL PROTECTED]>**20050718193534] =
>
> Patch bundle hash:
> 56b84639baea97dbd27b2db5d144311a02a12803
>
> --=_
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> _______________________________________________
> darcs-devel mailing list
> [email protected]
> http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
>
> --=_--
>
> .
>
>
>
>
--
http://mark.stosberg.com/
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel