darcs

Issue 990 record --working-dir

Title record --working-dir
Priority wishlist Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, galbolle, jaredj, kowey, thorkilnaur, tommy
Assigned To
Topics Git, ProbablyEasy, Provisional, UI

Created on 2008-08-12.17:19:03 by galbolle, last changed 2017-07-30.22:59:41 by gh.

Files
File name Uploaded Type Edit Remove
unnamed dagit, 2008-08-12.17:24:37 text/html
Messages
msg5422 (view) Author: galbolle Date: 2008-08-12.17:18:52
In complement to issue #431, it would be nice to be able to do darcs record
--repository /some/where, and have darcs record into repository /some/where,
using the current directory as the working directory. (likewise for
amend-record). Conversely, add the --repository option to revert, turning the
current directory into the pristine of the repository.

Why have this feature ? It would make sense if working-directory-less repos were
implemented (cf issue 431). Together, they would allow a workflow like git's
with one working repository for several branches. Each of the branches would be
a working-directory-less repo, and one would use darcs revert --repository
my-branch to change the current branch (ala git checkout branch, if i'm not
mistaken). Even if it is not our favourite workflow (and probably shouldn't be),
it can be a life-saver when disk space is scarce (or when the repo contains big
files). In that case, the über-cache and hardlinks mean that having numerous
repos is not that much more expensive than having just one, and having only one
copy of the working dir for them all divides disk-usage by the number of branches.

Additionally, and if I understand rebase correctly, it would also make a simple
implementation of rebase. Go to the repository where your functionality is
implemented, and darcs record --repository /new/base gives you a «rebasing patch».
msg5423 (view) Author: dagit Date: 2008-08-12.17:24:37
On Tue, Aug 12, 2008 at 10:19 AM, Florent Becker <bugs@darcs.net> wrote:

>
> New submission from Florent Becker <florent.becker@ens-lyon.org>:
>
> In complement to issue #431, it would be nice to be able to do darcs record
> --repository /some/where, and have darcs record into repository
> /some/where,
> using the current directory as the working directory. (likewise for
> amend-record). Conversely, add the --repository option to revert, turning
> the
> current directory into the pristine of the repository.

Could you clarify if --repodir=DIRECTORY            specify the repository
directory

Is what you want or how it is different?

Thanks,
Jason
Attachments
msg5434 (view) Author: galbolle Date: 2008-08-12.19:26:02
As for as I can tell, they are different. (correct me if I'm wrong)

darcs record --repodir=repo amounts to:
pushd;cd repo; darcs record; popd

What I would like amounts to (with tar and cp set to ignore _darcs ...):
tar -cf /tmp/repo.tar repo; cp -R . repo; pushd; cd repo; darcs record;
tar -xf /tmp/repo.tar; popd
msg5480 (view) Author: galbolle Date: 2008-08-13.12:48:53
Given the existence of --repodir=repo, the simplest way to implement this
feature would be to have a --working-dir option. Then my --repository option
would become 
darcs record --repodir=/path/to/repo/ --working-dir=.

The semantic of the --working-dir=DIR option would be that record (and
amend-record, and probably also revert) would work on DIR instead of the
repository's working directory.
msg8425 (view) Author: kowey Date: 2009-08-23.18:51:34
This is related to issue555 which wants cheap local branches.  I don't think
this approach solves the problem of cognitive cost in figuring out where to put
a branch (apparently, people really hate needing a parent directory), so I'm a
bit doubtful of the benefit this will have for that.

See also issue938 for a proper rebase/transplant command.

I don't want to rule this out right way; maybe this is one of those things
that's so general that the uses for it emerge only after you've implemented it.
History
Date User Action Args
2008-08-12 17:19:03galbollecreate
2008-08-12 17:24:41dagitsetfiles: + unnamed
nosy: tommy, beschmi, kowey, dagit, jaredj, galbolle
status: unread -> unknown
messages: + msg5423
2008-08-12 19:26:15galbollesetnosy: tommy, beschmi, kowey, dagit, jaredj, galbolle
messages: + msg5434
2008-08-13 12:49:05galbollesetnosy: + simon
messages: + msg5480
2008-08-13 12:49:39galbollesetnosy: tommy, beschmi, kowey, dagit, simon, jaredj, galbolle
title: --repository option for record -> --repository / --working-dir option for record
2009-08-06 21:10:41adminsetnosy: + dmitry.kurochkin, thorkilnaur, - beschmi
2009-08-11 00:20:09adminsetnosy: - dagit
2009-08-23 18:51:43koweysetstatus: unknown -> needs-implementation
nosy: tommy, kowey, simon, thorkilnaur, jaredj, dmitry.kurochkin, galbolle
topic: + Provisional
messages: + msg8425
title: --repository / --working-dir option for record -> record --working-dir
2009-08-25 17:24:12adminsetnosy: + darcs-devel, - simon
2009-08-25 19:11:48koweysetnosy: tommy, kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, galbolle
2009-08-27 14:31:09adminsetnosy: tommy, kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, galbolle
2017-07-30 22:59:41ghsetstatus: needs-implementation -> given-up