Steven Walter [Tue, 15 Sep 2009 17:03:34 +0000 (15 13:03 -0400)]
Revert "cmd_unstage: work correctly from a subdirectory"
I must have been smoking crack. unstage does not work correctly with
this change, and does work correctly without it.
This reverts commit
98a6e8d1cbacef674fc346a8d10e1b34b857855e.
Steven Walter [Fri, 14 Aug 2009 19:41:26 +0000 (14 15:41 -0400)]
svn: fix tags
Steven Walter [Fri, 14 Aug 2009 18:06:45 +0000 (14 14:06 -0400)]
workdirs: ensure the .yap directory exists in the new repo
Steven Walter [Mon, 6 Apr 2009 20:24:21 +0000 (6 16:24 -0400)]
cmd_log: use local time
Steven Walter [Mon, 6 Apr 2009 20:24:08 +0000 (6 16:24 -0400)]
cmd_init: create the .git/yap directory
Steven Walter [Mon, 6 Apr 2009 19:50:23 +0000 (6 15:50 -0400)]
svn: be more tolerant of other git-svn repos
Steven Walter [Wed, 11 Mar 2009 14:05:09 +0000 (11 10:05 -0400)]
workdir: cleanup after ourselves if branch -d fails
This may happen in the case of a leaf branch
Steven Walter [Fri, 20 Feb 2009 15:28:56 +0000 (20 10:28 -0500)]
workdir: override cmd_branch
Prevent deleting a branch that is checked-out in another working copy
Steven Walter [Thu, 5 Feb 2009 14:51:17 +0000 (5 09:51 -0500)]
workdir: fix locking
In some cases the lockfile contained a relative path, which caused the
existance test te behave oddly
Steven Walter [Wed, 14 Jan 2009 22:11:29 +0000 (14 17:11 -0500)]
workdir: the yap dir must be shared between workdirs
Steven Walter [Wed, 14 Jan 2009 14:43:24 +0000 (14 09:43 -0500)]
Merge branch 'pu'
Steven Walter [Wed, 3 Dec 2008 21:26:45 +0000 (3 16:26 -0500)]
svn: only allow one process to fetch at a time
Steven Walter [Wed, 3 Dec 2008 21:14:38 +0000 (3 16:14 -0500)]
workdir: cleanup the created tmp file
Steven Walter [Wed, 3 Dec 2008 21:13:38 +0000 (3 16:13 -0500)]
workdir: create tmpfiles in the correct directory
Steven Walter [Wed, 3 Dec 2008 21:02:01 +0000 (3 16:02 -0500)]
workdir: create the lock dir if needed on unlock
swalter [Wed, 3 Dec 2008 17:41:08 +0000 (3 12:41 -0500)]
workdir: add usage and a completion message
swalter [Wed, 3 Dec 2008 17:37:34 +0000 (3 12:37 -0500)]
workdir: unlock branches when appropriate
swalter [Wed, 3 Dec 2008 17:33:41 +0000 (3 12:33 -0500)]
workdir: prevent switching to in-use branches
Also allow dead locks to be broken
swalter [Wed, 3 Dec 2008 14:56:17 +0000 (3 09:56 -0500)]
workdir: new plugin
Create a plugin to automatic creating new workdirs for git repositories.
Steven Walter [Thu, 20 Nov 2008 21:44:31 +0000 (20 16:44 -0500)]
cmd_repo: don't hardcode deletion to "origin"
Steven Walter [Mon, 10 Nov 2008 19:00:30 +0000 (10 14:00 -0500)]
cmd_add: recurse through directories
Steven Walter [Mon, 10 Nov 2008 18:53:12 +0000 (10 13:53 -0500)]
cmd_stage: recurse through directories
Steven Walter [Thu, 16 Oct 2008 19:45:05 +0000 (16 15:45 -0400)]
Replace usage of diff-files + apply with "git add -u"
Yay, performance increases
Steven Walter [Wed, 15 Oct 2008 20:28:36 +0000 (15 16:28 -0400)]
backup: it only makes sense to backup files that exist
Steven Walter [Wed, 15 Oct 2008 20:19:58 +0000 (15 16:19 -0400)]
svn: alter ordering in resolv_rev
Prefer using the metadata directly, as this is faster than fork/exec'ing
git to do the same thing. We still fall back to git-svn if we don't
find the hash, however.
Steven Walter [Wed, 15 Oct 2008 20:06:43 +0000 (15 16:06 -0400)]
cmd_revert: work correctly when run from a subdirectory
git checkout-index only operates on the current repository subdirectory,
so we want to run it from the repository root
Steven Walter [Wed, 15 Oct 2008 20:03:53 +0000 (15 16:03 -0400)]
cmd_unstage: work correctly from a subdirectory
Steven Walter [Wed, 15 Oct 2008 19:59:04 +0000 (15 15:59 -0400)]
check_commit, cmd_switch: git apply needs to run from repo-root
This fixes some irregularities with commit, revert, etc, when run from a
subdirectory
Steven Walter [Wed, 15 Oct 2008 19:55:06 +0000 (15 15:55 -0400)]
Refactor "rev-parse --show-cdup" into a utility function
Steven Walter [Sat, 6 Sep 2008 18:44:46 +0000 (6 14:44 -0400)]
add_one: check for just-added files as well
Steven Walter [Sat, 6 Sep 2008 14:50:48 +0000 (6 10:50 -0400)]
cmd_unstage: give a more helpful message
Showing the usage after running "yap unstage -a" in a repo with nothing
staged is particularly unintuitive.
Steven Walter [Mon, 25 Aug 2008 18:17:39 +0000 (25 14:17 -0400)]
Correct users of for-each-ref
Using a pattern ending in "/*" unintentionally caused only the first
level of references to be shown. i.e., refs/heads/a/b would not be
listed as a branch.
Steven Walter [Sun, 24 Aug 2008 20:18:26 +0000 (24 16:18 -0400)]
cmd_help: properly detect failure of get_attr
Unlike __getattribute__, get_attr doesn't raise an exception
Steven Walter [Sun, 24 Aug 2008 20:11:57 +0000 (24 16:11 -0400)]
cmd_help: use get_attr to find the usage for a command
Without this command that are overridden by plugins would not have their
help displayed properly.
Closes: #
27bd1a6fc1ce6eabd91ce9f7856a34d0b66c165e
Steven Walter [Fri, 22 Aug 2008 01:19:29 +0000 (21 21:19 -0400)]
Merge branch 'svn-log'
Steven Walter [Thu, 21 Aug 2008 17:59:17 +0000 (21 13:59 -0400)]
svn: store keys for all svn-remotes
Steven Walter [Wed, 20 Aug 2008 20:54:24 +0000 (20 16:54 -0400)]
cmd_status: properly strip the common prefix
This code assumed that os.path.split would return an n-tuple, but it
fact it always returns only two components, the basename and the
dirname.
Steven Walter [Wed, 20 Aug 2008 00:41:59 +0000 (19 20:41 -0400)]
Merge branch 'progress'
Steven Walter [Tue, 19 Aug 2008 18:09:31 +0000 (19 14:09 -0400)]
cmd_switch: show progress
Steven Walter [Tue, 19 Aug 2008 18:10:20 +0000 (19 14:10 -0400)]
cmd_point: show status output from read-tree
This change has the nice effect of also simplifying the code
Steven Walter [Tue, 19 Aug 2008 12:49:07 +0000 (19 08:49 -0400)]
svn: avoid calls to resolve_svn_rev when possible
resolve_svn_rev isn't terribly expensive, but in a log the cost quickly
adds up. Once we see a commit whose hash matches its git-svn-id, we
know all parents of that hash will too. Take advantage of that fact to
avoid calls to resolve_svn_rev. The result noticably speeds "yap log"
Steven Walter [Tue, 19 Aug 2008 12:17:36 +0000 (19 08:17 -0400)]
svn: don't call resolve_rev directly
resolve_rev will throw an exception when the revision doesn't resolve.
Instead factor the SVN logic into a seperate helper and call that
function directly
swalter [Sun, 17 Aug 2008 14:18:07 +0000 (17 10:18 -0400)]
do_commit: simplify popen use
We only need a unidirectional pipe to "stripspace", so we can use popen
instead of popen2
swalter [Sun, 17 Aug 2008 14:10:58 +0000 (17 10:10 -0400)]
svn: implement filter_log
filter_log does two things; one, it strips out the annoying git-svn-id
lines. Two, it add a line in the header for the subversion metadata
when it is accurate.
swalter [Sun, 17 Aug 2008 14:12:13 +0000 (17 10:12 -0400)]
get_pager_cmd: use 'less', not 'more'
swalter [Sun, 17 Aug 2008 03:18:04 +0000 (16 23:18 -0400)]
cmd_log: implement in terms of rev-list and show
More of the git-log logic needs to me implemented in python to better
allow for filtering of commit log messages
swalter [Sun, 17 Aug 2008 14:07:07 +0000 (17 10:07 -0400)]
svn: fix the case in resolve_rev when git-svn works
rare though it may be, this case shouldn't break
swalter [Sun, 17 Aug 2008 14:04:45 +0000 (17 10:04 -0400)]
tcommit: fix copy/paste bug
swalter [Sun, 17 Aug 2008 14:12:58 +0000 (17 10:12 -0400)]
cmd_cherry_pick: use resolve_rev
swalter [Sat, 16 Aug 2008 23:56:17 +0000 (16 19:56 -0400)]
svn: don't disable metadata
swalter [Sat, 16 Aug 2008 14:47:14 +0000 (16 10:47 -0400)]
svn: recognize file:// URLs
Steven Walter [Sat, 16 Aug 2008 03:30:17 +0000 (15 23:30 -0400)]
cmd_repo: additionally list remote branches
Steven Walter [Sat, 16 Aug 2008 03:20:27 +0000 (15 23:20 -0400)]
Merge branch 'svn-rev'
Steven Walter [Sat, 16 Aug 2008 03:18:39 +0000 (15 23:18 -0400)]
cmd_log and cmd_show: go through the resolve_rev interface
Steven Walter [Sat, 16 Aug 2008 03:16:57 +0000 (15 23:16 -0400)]
svn: accept subversion revisions
Override _resolve_rev so that we can intercept SVN revisions
Steven Walter [Sat, 16 Aug 2008 03:20:16 +0000 (15 23:20 -0400)]
resolve_rev: factor into a new utility function
Steven Walter [Sat, 16 Aug 2008 02:56:10 +0000 (15 22:56 -0400)]
unstage_one: accept relative paths
Steven Walter [Sat, 16 Aug 2008 02:50:30 +0000 (15 22:50 -0400)]
cmd_status: show relative paths
Relative paths are much easier to copy and paste
Steven Walter [Sat, 16 Aug 2008 02:50:05 +0000 (15 22:50 -0400)]
show unstaged and unmerged files for the entire repository
Since ls-files only inspects from $PWD down, we must chdir to the top
of the repository in order to see the full-repository status
Steven Walter [Sun, 10 Aug 2008 03:40:27 +0000 (9 23:40 -0400)]
get_unstaged_files: don't double-account for new files
Staging a new file doesn't remove it's newness; therefore a file will
appear in the "new" list and the "staged" list. Remove such duplicates.
Steven Walter [Sun, 10 Aug 2008 03:34:02 +0000 (9 23:34 -0400)]
tcommit: forget a branch if the user deletes it
Steven Walter [Sun, 10 Aug 2008 03:30:50 +0000 (9 23:30 -0400)]
yap.zsh: flesh out completions
Steven Walter [Sat, 9 Aug 2008 16:41:11 +0000 (9 12:41 -0400)]
cmd_version: use an autogenerated version
Steven Walter [Mon, 11 Aug 2008 17:57:44 +0000 (11 13:57 -0400)]
cmd_repo: delete the refs belonging to a deleted repo
Steven Walter [Mon, 11 Aug 2008 17:12:10 +0000 (11 13:12 -0400)]
cmd_repo: fix typo
Steven Walter [Mon, 11 Aug 2008 17:35:47 +0000 (11 13:35 -0400)]
svn: create the svn "repo" when cloning a cache repo
Steven Walter [Fri, 8 Aug 2008 13:13:36 +0000 (8 09:13 -0400)]
clear_state: don't bail out if one of the files doesn't exist
Steven Walter [Fri, 8 Aug 2008 13:12:40 +0000 (8 09:12 -0400)]
Update TODO
Steven Walter [Fri, 8 Aug 2008 13:12:26 +0000 (8 09:12 -0400)]
svn: make the tagged metadata blob more robust
Store all keys in the svn-remote.svn section, not just known ones.
Additionally, record the value of the branch pointer that corresponds to
each metadata file; if they don't match, the remote will try to
regenerate it.
Steven Walter [Fri, 8 Aug 2008 13:11:36 +0000 (8 09:11 -0400)]
svn: remove hack in metadata blob
Now that plugins are properly imported, we don't have to use ugly
namespace hacks to get pickle to work
Steven Walter [Fri, 8 Aug 2008 13:10:36 +0000 (8 09:10 -0400)]
backup: be quiet if the file doesn't exist
This could happen during clone, for example
Steven Walter [Fri, 8 Aug 2008 13:09:52 +0000 (8 09:09 -0400)]
svn: be careful not to hijack non-SVN clones
Steven Walter [Fri, 8 Aug 2008 13:06:52 +0000 (8 09:06 -0400)]
Merge branch 'plugins2'
Steven Walter [Wed, 6 Aug 2008 13:45:28 +0000 (6 09:45 -0400)]
unstage_one: don't fail when there are staged and unstaged changes
Steven Walter [Tue, 5 Aug 2008 15:18:27 +0000 (5 11:18 -0400)]
cmd_unstage: don't mark conflicting files as resolved
Steven Walter [Wed, 6 Aug 2008 17:42:18 +0000 (6 13:42 -0400)]
Implement the merge subcommand
Steven Walter [Tue, 5 Aug 2008 19:00:35 +0000 (5 15:00 -0400)]
Reimplement cmd_plugins
Steven Walter [Tue, 5 Aug 2008 19:00:23 +0000 (5 15:00 -0400)]
Refactor load_plugins() out of yap_metaclass
Steven Walter [Mon, 4 Aug 2008 18:54:04 +0000 (4 14:54 -0400)]
svn: factor out the "applicable" helper
Useful for determining if a push/fetch request should be handled by the
plugin or not.
Steven Walter [Mon, 4 Aug 2008 18:05:57 +0000 (4 14:05 -0400)]
Allow plugins to inherit from other plugins
When plugins inherit from other plugins, we need to simplify "bases" or else
python may not be able to derive an acceptable MRO.
Steven Walter [Mon, 4 Aug 2008 17:21:47 +0000 (4 13:21 -0400)]
Properly descend the ancestry for help/usage/options
Plugins shouldn't have to duplicate help/usage messages when
unnecessary. Look through the inheritance chain when the leaf object
doesn't define them.
Steven Walter [Tue, 5 Aug 2008 12:31:59 +0000 (5 08:31 -0400)]
Port plugins to the new plugin API
Steven Walter [Mon, 4 Aug 2008 16:49:49 +0000 (4 12:49 -0400)]
cmd_resolved: obvious fix
Steven Walter [Tue, 29 Jul 2008 17:06:46 +0000 (29 13:06 -0400)]
Implement a new plugin system using multiple-inheritance
First, we split all the interesting functions out of Yap into a new
class, YapCore. Yap retains only the "main" method. Yap is a metaclass
with dynamically-determined inheritance. The yap_metaclass function
loads all plugins and creates the list of parents of Yap. In this way,
commands (and even utility functions) can be overriden in a sane way
using standard python OO.
Steven Walter [Tue, 29 Jul 2008 17:57:56 +0000 (29 13:57 -0400)]
Clear out awkward manual inheritance system
Steven Walter [Tue, 29 Jul 2008 14:29:31 +0000 (29 10:29 -0400)]
svn: remove branch@rev remotes
Steven Walter [Mon, 28 Jul 2008 13:39:23 +0000 (28 09:39 -0400)]
svn: be tolerant of branches without metadata
Steven Walter [Sun, 27 Jul 2008 19:34:29 +0000 (27 15:34 -0400)]
README: Add a "features" section
Steven Walter [Sun, 27 Jul 2008 19:41:38 +0000 (27 15:41 -0400)]
Create new README file
Steven Walter [Sat, 26 Jul 2008 17:47:46 +0000 (26 13:47 -0400)]
Move "README" out of the way for a better one
Steven Walter [Fri, 25 Jul 2008 18:09:27 +0000 (25 14:09 -0400)]
cmd_history: make sure the index is clean before running am
Steven Walter [Thu, 24 Jul 2008 19:12:31 +0000 (24 15:12 -0400)]
Add descriptions to the plugins
Steven Walter [Thu, 24 Jul 2008 19:12:21 +0000 (24 15:12 -0400)]
cmd_help: show commands provided by plugins
Steven Walter [Thu, 24 Jul 2008 18:51:36 +0000 (24 14:51 -0400)]
svn: be tolerant of multiple fetch lines
Steven Walter [Thu, 24 Jul 2008 18:26:56 +0000 (24 14:26 -0400)]
svn: don't set branches/tags to fetch from trunk
If a non-standard repo (one without "trunk" in the URL) were cloned, it
would result in bogus values for branches/tags. Don't even try to deal
with branches and tags in this case.
Steven Walter [Thu, 24 Jul 2008 18:16:54 +0000 (24 14:16 -0400)]
Change the interface for pre- and post- hooks
Pre-hooks are more useful if they can modify the incoming parameter
stream. To accomate that, we have to change the API.
Steven Walter [Thu, 24 Jul 2008 17:12:19 +0000 (24 13:12 -0400)]
svn: setup git-svn after cloning an SVN mirror
If the tag "yap-svn" exists on the remote, it points to a blob with
configuration data. Use that data to setup git-svn in the new
repository.
Steven Walter [Thu, 24 Jul 2008 15:09:07 +0000 (24 11:09 -0400)]
svn: create a tagged blob with vital repository information
In order to setup git-svn info on the other end of a clone, there is
some information needed that cannot readily be derived. Put this
information into a tagged blob that "git clone" will carry across for
us.
Steven Walter [Thu, 24 Jul 2008 17:11:07 +0000 (24 13:11 -0400)]
svn: give configure_repo an optional parameter for better reuse
Steven Walter [Thu, 24 Jul 2008 16:34:57 +0000 (24 12:34 -0400)]
svn: fix stupid bug in clone