mr: Lazy processing of repositories

2011-11-03 Thread Svend Sorensen
I'm using mr to manage the repositories for the various software that I
track. However, I don't want to check out all the repos by default. (The
list is getting long). I also don't want to make a modification to the
.mrconfig each time I want to check out a repo. (E.g. have 'skip = true'
on all repos, and remove the skip if I decide to check out a repo.)

I'm looking for a way to do lazy checkouts and updates. A lazy repo
would not be checked out unless I run a command to tell mr to check out
the repo. (Something like mr checkout foo.) After I force mr to check
out a lazy repo, mr would act on the repo for future mr runs.

One way to do this is to have skip check for the existence of a
different file for each repo. Creating the file would activate the repo.
Any ideas for a better approach?

Svend
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: mr: Lazy processing of repositories

2011-11-03 Thread Joey Hess
Svend Sorensen wrote:
 I'm using mr to manage the repositories for the various software that I
 track. However, I don't want to check out all the repos by default. (The
 list is getting long). I also don't want to make a modification to the
 .mrconfig each time I want to check out a repo. (E.g. have 'skip = true'
 on all repos, and remove the skip if I decide to check out a repo.)
 
 I'm looking for a way to do lazy checkouts and updates. A lazy repo
 would not be checked out unless I run a command to tell mr to check out
 the repo. (Something like mr checkout foo.) After I force mr to check
 out a lazy repo, mr would act on the repo for future mr runs.
 
 One way to do this is to have skip check for the existence of a
 different file for each repo. Creating the file would activate the repo.
 Any ideas for a better approach?

Good idea! In mr git, you can now use skip = lazy to get this behavior.

The lazy shell function is built into mr, but this shows how it works:

lazy() {
if [ $MR_ACTION = checkout ] || [ -d $MR_REPO ]; then
return 1
else
return 0
fi
}

-- 
see shy jo


signature.asc
Description: Digital signature
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

Re: mr: Lazy processing of repositories

2011-11-03 Thread Svend Sorensen
On Thu, Nov 03, 2011 at 01:56:53PM -0400, Joey Hess wrote:
 
 Good idea! In mr git, you can now use skip = lazy to get this behavior.

Thanks for implementing this feature!

 The lazy shell function is built into mr, but this shows how it works:
 
 lazy() {
 if [ $MR_ACTION = checkout ] || [ -d $MR_REPO ]; then
 return 1
 else
 return 0
 fi
 }

I can't get this to work. (Maybe I'm using it incorrectly.)

How do I force mr to checkout a lazy repo? 'mr checkout' seems to ignore any
arguments, so 'mr checkout repo' skips repos that have 'skip = lazy'. If I
manually create the repo directory, mr thinks the repo is already checked out.

Svend
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: mr: Lazy processing of repositories

2011-11-03 Thread Joey Hess
Svend Sorensen wrote:
 How do I force mr to checkout a lazy repo? 'mr checkout' seems to ignore any
 arguments, so 'mr checkout repo' skips repos that have 'skip = lazy'. If I
 manually create the repo directory, mr thinks the repo is already checked out.

Yes, this is a use case for mr checkout somehow taking a parameter, or
for the stuff that Adam has been talking about to let mr be told which
repos to act on.

-- 
see shy jo


signature.asc
Description: Digital signature
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

Re: mr: Lazy processing of repositories

2011-11-03 Thread Joey Hess
Joey Hess wrote:
 Svend Sorensen wrote:
  How do I force mr to checkout a lazy repo? 'mr checkout' seems to ignore any
  arguments, so 'mr checkout repo' skips repos that have 'skip = lazy'. If I
  manually create the repo directory, mr thinks the repo is already checked 
  out.
 
 Yes, this is a use case for mr checkout somehow taking a parameter, or
 for the stuff that Adam has been talking about to let mr be told which
 repos to act on.

Actually, this already works:

mr -d foo checkout

-- 
see shy jo


signature.asc
Description: Digital signature
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home