Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
Joey Hess [Fri, 26 Oct 2007 01:57:18 +0000 (21:57 -0400)]
* Add support for including one mrconfig file from another. Unlike chaining,
this doesn't change the paths, and is not tied to a particular
subdirectory. It's useful for loading up library mrconfig files.
* Split git fake-bare support out into a mrconfig.git-fake-bare.
Partly because it's a good example of how to add a new revision control
type, and partly because it's currently too ugly to be in mr itself
due to bugs and limitations in git.
Joey Hess [Thu, 25 Oct 2007 23:45:45 +0000 (19:45 -0400)]
split up actions by rcs
This will make it much easier to add new rcses, or modify just the command
that mr uses for one command for one rcs, without duplicating a lot of code.
martin f. krafft [Thu, 25 Oct 2007 23:33:28 +0000 (01:33 +0200)]
Fix fake-bare worktree checkout
We have to jump through hoops to check out fake-bare repositories since
the target directory probably already exists. Thus, we cheat by telling
git-clone *not* to checkout and then read-tree and checkout-index
ourselves. We also convert the non-bare repository to a fake bare one by
moving stuff around.
Probably a bit hackish but this is the best I can do for now.
martin f. krafft [Thu, 25 Oct 2007 23:33:28 +0000 (01:33 +0200)]
Fix fake-bare worktree checkout
We have to jump through hoops to check out fake-bare repositories since
the target directory probably already exists. Thus, we cheat by telling
git-clone *not* to checkout and then read-tree and checkout-index
ourselves. We also convert the non-bare repository to a fake bare one by
moving stuff around.
Probably a bit hackish but this is the best I can do for now.
martin f. krafft [Thu, 25 Oct 2007 23:11:08 +0000 (01:11 +0200)]
Do not fail determining git url
If no remote URL is in GIT_CONFIG, git-config returns non-zero and thus
causes the script to fail due to set -e. We test for $url anyway, so we
can just keep going here.
martin f. krafft [Thu, 25 Oct 2007 20:41:12 +0000 (22:41 +0200)]
Refactor checking for (type of) Git repository
lib now has two new functions:
is_git_repo returns 0/true if its argument is a git repository
get_git_repo_type return 0/true if its argument is a git repository and
prints one of non-bare/bare/fake-bare to stdout
The mr function implementations now use these functions and have been
simplified. We also allow bare repositories with limited functionality.
martin f. krafft [Thu, 25 Oct 2007 19:57:17 +0000 (21:57 +0200)]
Implement (initial) support for fake bare git repositories
Fake bare git repositories are non-bare git repositories with a detached
worktree. Thus, they require core.worktree set in the configuration. The
current implementation assumes that such repositories are named foo.git.
So far, support has only been added for register, update, log, and
status. Specifically diff and commit do not work yet.
Joey Hess [Sun, 21 Oct 2007 18:08:36 +0000 (14:08 -0400)]
* hours_since was broken by design, and fixing it involved changing
its calling convention. If you used the old version, you'll get errors
from the new old.
Joey Hess [Sat, 20 Oct 2007 21:08:54 +0000 (17:08 -0400)]
* Incorporate code from on Anthony Towns's mrs, to allow running
multiple jobs in parallel. The -j flag controls this.
This can produce enormous speedups. For me, mr update takes
12 minutes, while mr -j 10 update takes 1 minute!
Joey Hess [Sat, 20 Oct 2007 00:52:55 +0000 (20:52 -0400)]
* Change mr update to use git pull -t origin master, to make sure new tags
are pulled. And since those might not always be the right parameters
for git pull, any parameters passed to mr update will replace them.
Joey Hess [Fri, 19 Oct 2007 20:01:11 +0000 (16:01 -0400)]
* Removed special case repository deletion handling code. The same
thing can be accomplished in a mrconfig by skipping a repo unless
it exists, and printing a reminder on update. See the mrconfig file
for an example.
Joey Hess [Thu, 18 Oct 2007 20:42:30 +0000 (16:42 -0400)]
don't abs_path($ENV{MR_CONFIG})
mrconfig files can be symlinks to files in other directories. But the directory
the file is is significant, as it's the directory paths in the file
are relative to. abs_path follows the symlink, so take care not to use it.
Joey Hess [Thu, 18 Oct 2007 20:11:31 +0000 (16:11 -0400)]
incomplete work to try to guess the right mrconfig to register to
madduck suggested that mr register should register to the closest
mrconfig file. This branch is a start at trying to do that, by redefining
MR_CONFIG to hold either the config file that registers the given repo,
or for unregistered repos, the closest mrconfig file
Current issues:
- absolute path is always passed in MR_CONFIG, which makes mr config
add new repos with absolute paths
- MR_CONFIG is not set to the closest mrconfig file for unregistered repos
yet. The problem is, if I do this, then it will override the setting
from -c, and so it won't be possible to use mr register to register in an
explicitly specified config file.
I think it also has some other bugs. For example, the current mapping
between directory and config file only allows for one config file in a given
directory. Which might not be true if you're using mr -c.
As far as I can take it for now, so stashing away in this branch.