Catalin Marinas [Wed, 28 Feb 2007 11:10:22 +0000 (11:10 +0000)]
Use and..or as a ternary operator rather than a dictionary
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 28 Feb 2007 08:41:56 +0000 (08:41 +0000)]
Add EditorException to stgit/utils.py
The patch adds the stgit.main.main handling of this exception as well.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 28 Feb 2007 08:41:56 +0000 (08:41 +0000)]
Add an interractive 2-way merge option
Since emacs can handle 2-way merges as well with ediff-merge-files,
this patch changes the 'imerger' config option to 'i3merge' and also
adds an 'i2merge' option. The gitmergeonefile.py algorithm was
modified to handle 2-way merges interactively as well.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Wed, 28 Feb 2007 08:41:56 +0000 (08:41 +0000)]
Add missing files to stgit manifest.
Many things, including Makefile and all documentation were left out of
various packaging because they're not included in the tarball.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 28 Feb 2007 08:41:55 +0000 (08:41 +0000)]
Merge doc/ and Documentation/ directories.
This merges everything into Documentation, to match the GIT layout
("make doc" did not work anyway since "doc" was not marked phony).
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 28 Feb 2007 08:41:55 +0000 (08:41 +0000)]
Add a Documentation directory inspired by the git one.
The html and manpages are generated from asciidoc source. Short
description strings are extracted from the python modules.
Only the stg(7) frontpage and the stg-new(1) command page are already
written. A template is provided for new command pages.
This also reworks a couple of help strings and command classification.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 28 Feb 2007 08:41:55 +0000 (08:41 +0000)]
Factorize editor handling.
At the same time we trap the editor error for all editor calls, not
just when called from "stg mail". We may want to define a new
exception for this though.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 28 Feb 2007 08:41:42 +0000 (08:41 +0000)]
Add a testcase for the safety of pull-policy='pull'.
This testcase demonstrates a long-standing problem with the handling
of conflicts on a rewinding branch, when "stg pull" calls git-pull.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Tue, 27 Feb 2007 22:39:09 +0000 (22:39 +0000)]
Correctly raise exception on unknown pull-policy.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Fri, 23 Feb 2007 22:09:06 +0000 (22:09 +0000)]
Add --branch option to 'patches'
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Sam Vilain [Fri, 23 Feb 2007 22:09:06 +0000 (22:09 +0000)]
Some minor debian packaging fixes
Yann Dirson [Tue, 20 Feb 2007 23:16:11 +0000 (00:16 +0100)]
Rework of the 'stg pull' policy.
This patch changes the way "stg pull" behaviour is selected, by
replacing stgit.pull-does-rebase and stgit.pullcmd with
stgit.pull-policy, stgit.pullcmd and stgit.fetchcmd. In the standard
case, only pull-policy needs to be set.
Those 3 config variables are also available per-branch as
branch.*.stgit.<name>.
This patch also add a set of tests for the fetch-rebase policy,
including interferences with "stg commit" occuring with 0.12.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Tue, 20 Feb 2007 00:14:24 +0000 (01:14 +0100)]
Refuse to pull/rebase when rendered unsafe by (un)commits.
This can be overriden by a new --force flag.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Tue, 20 Feb 2007 00:14:19 +0000 (01:14 +0100)]
Keep track of safe base changes.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Tue, 20 Feb 2007 00:14:13 +0000 (01:14 +0100)]
Various cleanups for clarity.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Tue, 20 Feb 2007 00:14:08 +0000 (01:14 +0100)]
Move stack-base querying into Series class.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Tue, 20 Feb 2007 00:14:03 +0000 (01:14 +0100)]
Factorize rebasing behaviour.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Mon, 19 Feb 2007 22:22:54 +0000 (23:22 +0100)]
Support for pre-1.5 git in stgit tests.
Support for older Git versions was broken in
5cd9e87faa0a116ce2b378be6a5c89d5f20629f1 (post 0.12).
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Wed, 21 Feb 2007 18:30:30 +0000 (18:30 +0000)]
Fix the mail command to parse longer address headers
If an address header is split over multiple lines, the old code was
only parsing the first line, missing the other addresses.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 21 Feb 2007 18:30:30 +0000 (18:30 +0000)]
Fix the alias check in the mail --bcc command
A check for an empty alias was performed if autobcc wasn't set in the
config file.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 21 Feb 2007 18:30:30 +0000 (18:30 +0000)]
Display whether the patch is empty after refresh
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sat, 17 Feb 2007 23:57:39 +0000 (23:57 +0000)]
Fix import to allow --name and --strip for most import types
Originally, those options were only valid for a basic file import but
not for e-mail or url. This patch also replaces invalid characters in
the patch name with dashes.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Clark Williams [Sat, 17 Feb 2007 20:42:27 +0000 (14:42 -0600)]
URL import for stgit
Signed-off-by: Clark Williams <clark.williams@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 16 Feb 2007 22:42:35 +0000 (22:42 +0000)]
Add --author option to series
This is similar to the --description option, only that the author name
is displayed instead.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 16 Feb 2007 22:42:35 +0000 (22:42 +0000)]
Allow importing mbox files from stdin
The UnixMailbox does not support reading from stdin as it uses seek()
(at least on Python 2.3). This patch reads the stdin into a StringIO
object.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 13 Feb 2007 22:26:37 +0000 (22:26 +0000)]
Fix the behaviour when there is no user information configured
If there is no user.name or user.email set in the gitconfig files,
just use the defaults rather than failing.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 13 Feb 2007 22:26:36 +0000 (22:26 +0000)]
Make StGIT aware of the STGIT_DEBUG_LEVEL environment variable
For now, setting this environment variable will make StGIT dump the
backtrace in case of a failure.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Tue, 13 Feb 2007 22:26:36 +0000 (22:26 +0000)]
Use canonical command name in help message.
Let's expand shortcut command names in help messages, in all 3 forms
("help foo", "--help foo" and "foo --help").
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Tue, 13 Feb 2007 22:26:36 +0000 (22:26 +0000)]
Add --merged option to rebase.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Tue, 6 Feb 2007 22:48:03 +0000 (22:48 +0000)]
Release 0.12
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 6 Feb 2007 23:00:28 +0000 (23:00 +0000)]
Add extra files to MANIFEST.in
These are needed for building the rpm distribution.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 6 Feb 2007 22:45:18 +0000 (22:45 +0000)]
Escape the quotes in example/gitconfig
With the new git-repo-config, the quotes are ignored unless escaped,
breaking some functionality (emacs interactive merger).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Mon, 5 Feb 2007 22:41:41 +0000 (22:41 +0000)]
Stop the e-mail sending if editor fails
With this patch, if the editor exits with a non-zero status, stop
sending any e-mails.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Mon, 5 Feb 2007 22:18:23 +0000 (22:18 +0000)]
Use branch.*.stgit.parentbranch for authoritative parent information.
Also set the API to use remote=None as "parent branch is local", and
have set_parent() translate that to branch.*.remote=".".
Also enforces that we never set a parent-branch info without a
parent-remote (so they are now both set or both untouched), and try to
give useful info when we have to use the old "origin" defaults.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Pavel Roskin [Mon, 5 Feb 2007 22:18:22 +0000 (22:18 +0000)]
Add missing spaces in warnings about default remote
Signed-off-by: Pavel Roskin <proski@gnu.org>
Pavel Roskin [Sun, 4 Feb 2007 05:32:37 +0000 (00:32 -0500)]
Assorted typos
Signed-off-by: Pavel Roskin <proski@gnu.org>
Pavel Roskin [Sun, 4 Feb 2007 17:44:03 +0000 (12:44 -0500)]
Don't print "rebasing" if the head doesn't change
Signed-off-by: Pavel Roskin <proski@gnu.org>
Pavel Roskin [Sun, 4 Feb 2007 05:32:26 +0000 (00:32 -0500)]
Copy remote and merge settings when cloning a branch
Signed-off-by: Pavel Roskin <proski@gnu.org>
Pavel Roskin [Sun, 4 Feb 2007 05:32:21 +0000 (00:32 -0500)]
Rename branch section in config when the branch is renamed
Signed-off-by: Pavel Roskin <proski@gnu.org>
Yann Dirson [Sat, 3 Feb 2007 21:29:30 +0000 (22:29 +0100)]
Use FETCH_HEAD to know where to rebase to after pull.
Since 'git fetch' already takes care of the branch.*.merge parameters,
resolves the new tip of the parent branch and puts it in FETCH_HEAD,
we're better just taking it from there.
This fixes the regression on t1200-push-modified.sh.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Sat, 3 Feb 2007 16:04:25 +0000 (17:04 +0100)]
Warn the user when there is no parent information in the config.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Sat, 3 Feb 2007 16:04:20 +0000 (17:04 +0100)]
Correctly check the pull-does-rebase parameter in 'stg pull'.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Pavel Roskin [Fri, 2 Feb 2007 17:18:40 +0000 (17:18 +0000)]
Allow .git/branches and .git/remotes to be missing
Both directories are now obsoleted by .git/config file. This fixes
"make test" in StGIT with git 1.5.0-rc3.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Yann Dirson [Fri, 2 Feb 2007 17:18:40 +0000 (17:18 +0000)]
Do not return 'origin' as parent remote when there is no such remote.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Fri, 2 Feb 2007 17:18:40 +0000 (17:18 +0000)]
Rebase to parent branch after git-fetch in "stg pull".
Previously we were just assuming that the remote from which we
just failed defined a local branch whose name was the same as the
remote def, and that this branch was the parent. While this is true
for the most common case (branch "origin" from remote "origin"), it is
quite an unflexible assumption.
Also move the rebasing from git.pull to commands.pull.func since that
is clearly stgit-level stuff, and rename git.pull() to git.fetch() to
match default behaviour.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Fri, 2 Feb 2007 17:18:40 +0000 (17:18 +0000)]
The user does not want to mess with the refspecs.
The only use I know of for this parameter is 'stg pull . <branch>',
for which 'stg rebase <branch>' should be used instead.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Fri, 2 Feb 2007 17:18:40 +0000 (17:18 +0000)]
Check for invalid patch names before acting
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 1 Feb 2007 22:52:02 +0000 (22:52 +0000)]
set() is not a builtin function in Python 2.3
This patch uses the sets.Set class rather than the builtin function.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Thu, 1 Feb 2007 22:52:02 +0000 (22:52 +0000)]
Fixes to doc strings.
At least the docstring for "branch" is still very confusing, but
that's hard to fix. We'll likely have to wait for the post-1.0
command-line redesign.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 31 Jan 2007 23:41:11 +0000 (23:41 +0000)]
Make 'stg pull' use git-fetch and not git-pull.
We introduce a new pull-does-rebase setting, as companion to pullcmd.
This allows to use both pullcmd's that need a rebase (like git-fetch)
and pullcmd's that do not (like git-pull).
To be able to rebase, we rely on parent information being available
for the stack.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 31 Jan 2007 23:34:06 +0000 (23:34 +0000)]
Have 'stg branch --create' record parent information.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 31 Jan 2007 23:27:55 +0000 (23:27 +0000)]
Basic support for keeping a ref to the parent branch.
This adds a framework to handle the parent branch of a stack, in
addition to the parent remote, and to set them when creating a stack.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 31 Jan 2007 23:15:38 +0000 (23:15 +0000)]
Allows extraction of information about remotes.
We want to know the list of declared remotes, the local branches they
hold, and which remotes holds a given branch. All this regardless of
where the information is stored.
If there are any git-1.5 remotes declared in .git/config, we suppose
you know what you're doing and they will take precedence on any
pre-1.5 remotes.
This does not use git-remote for now, since it is 1.5 material not
released yet, does not support legacy branches/ remotes, and does not
allow yet to query all of the information we need.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 31 Jan 2007 23:15:38 +0000 (23:15 +0000)]
Move identification of parent branch's remote def up into stack class.
Also adds the __set_parent_remote() counterpart method, but only
private since it is expected to be called only through set_parent, to
be introduced in subsequent patch.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 31 Jan 2007 23:15:38 +0000 (23:15 +0000)]
Add caching to the new config class.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Wed, 31 Jan 2007 23:15:38 +0000 (23:15 +0000)]
Make stgit.config use git-repo-config.
This is an initial implementation without any sort of caching. If we
want that, we could do it with this new API. We could even just
simply generalize the use of ConfigOption instead.
I just copypasted __run from stgit.git to avoid too much work, but
it's definitely something to cleanup.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Fri, 26 Jan 2007 22:29:10 +0000 (22:29 +0000)]
Make the 'series --short' length configurable
The 'shortnr' config option was added so that one can set a different
length than the default 5.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 26 Jan 2007 22:29:10 +0000 (22:29 +0000)]
Add support to hide and unhide patches
Hidden patches are only listed with 'series' -a or -i options.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 25 Jan 2007 22:28:39 +0000 (22:28 +0000)]
'--showbranch' and '--noprefix' options for 'series'
This option modify the display of patches in 'series'. Useful for
scripting.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 25 Jan 2007 22:28:39 +0000 (22:28 +0000)]
Allow a patch range to be specified for 'series'
If a patch range is specified, the series will only show those
files. Useful for scripting.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 25 Jan 2007 22:28:38 +0000 (22:28 +0000)]
Hide the test_create_repo output
git-init-db now prints some info when initialising a tree, just hide
it in the test scripts, unless --verbose was specified.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 25 Jan 2007 22:28:38 +0000 (22:28 +0000)]
Synchronise the current patch if none specified for 'sync'
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 21 Jan 2007 23:24:56 +0000 (23:24 +0000)]
Fix the displaying of unknown files for 'stg status'
Unknown files (marked with '?' by "stg status") are all displayed
regardless of any files or dir explicitely specified on command-line.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Sat, 20 Jan 2007 18:04:21 +0000 (19:04 +0100)]
Add new 'rebase' command.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Fri, 12 Jan 2007 23:10:44 +0000 (23:10 +0000)]
Track the files conflict history
This commit refreshes a pushed patch even if there was a conflict (in
which case only the correctly merged files are merged). The refresh
after fixing the conflict would log the conflict files in the patch
history.
The patch also updates the index in the case of the interactive merge.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 10 Jan 2007 19:38:26 +0000 (19:38 +0000)]
Add option to automatically invoke the interactive merger
The 'autoimerge' option was added (defaulting to 'no') to
automatically invoke the interactive merging tool when a conflict
occurs.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 10 Jan 2007 19:38:26 +0000 (19:38 +0000)]
Allow e-mail aliases for the "mail" command
The addresses passed via options or in the template file can also be
aliases stored in the [aliases] section of the configuration
file. They get expanded automatically when building the patch or cover
e-mails.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 10 Jan 2007 19:38:25 +0000 (19:38 +0000)]
Indent the example gitconfig file
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Pavel Roskin [Wed, 10 Jan 2007 19:38:25 +0000 (19:38 +0000)]
Check git pull remote before defaulting to 'origin'
Check git pull remote before defaulting to 'origin'
Signed-off-by: Pavel Roskin <proski@gnu.org>
Catalin Marinas [Wed, 10 Jan 2007 19:38:25 +0000 (19:38 +0000)]
Pipe the 'patches --diff' output through the pager
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 4 Jan 2007 19:30:18 +0000 (19:30 +0000)]
Fix the branch renaming to also rename the reflogs
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 4 Jan 2007 19:30:18 +0000 (19:30 +0000)]
Add '--missing' option to 'series'
This option lists the patches on a remote branch which are missing
from the current branch.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 13 Dec 2006 17:10:40 +0000 (17:10 +0000)]
Fix the bash completion when there is no patch applied
When there aren't any patches applied, the
.git/patches/<branch>/current file is removed and the bash completion
script fails to read it.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 12 Dec 2006 22:07:17 +0000 (22:07 +0000)]
Allow the mail command to send unapplied patches as well
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 12 Dec 2006 22:07:17 +0000 (22:07 +0000)]
Add the --unapplied option to pick
This option picks a commit id but doesn't actually apply it to the
stack (also useful for duplicating patches).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Pavel Roskin [Mon, 11 Dec 2006 22:21:12 +0000 (22:21 +0000)]
The author's address is incorrect in setyp.py
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Mon, 11 Dec 2006 22:21:11 +0000 (22:21 +0000)]
Allow the abbreviation of StGIT commands
If a partial command name is given, StGIT tries to find a unique
match, otherwise it fails.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 8 Dec 2006 22:31:52 +0000 (22:31 +0000)]
Don't always use git-merge-recursive because of speed
There are situations like picking patches, folding a patch onto a base
or synchronising patches where the distance between base and heads is
in general small. In this case, git-read-tree --aggressive is much
faster. We currently use the recursive merge when picking or pushing a
patch (the base change might involve some renames).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 7 Dec 2006 22:02:42 +0000 (22:02 +0000)]
Add the 'sync' command
This command is used to keep patches on several branches/trees in
sync.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 7 Dec 2006 22:02:42 +0000 (22:02 +0000)]
Make 'push --undo' safer
Make the push undoing a bit safer by asking the user to first clean
the local changes or conflicts rather than silently resetting them.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 7 Dec 2006 22:02:41 +0000 (22:02 +0000)]
Fix a merge case with files added in both heads but different
Since using git-merge-recursive instead of git-read-tree, the local
file is removed if it was added in both heads but different. We now
re-generated it in gitmergeonefile.merge. The patch also cleans the
working directory of extra files generated by git-merge-recursive
since our own merge re-generates them with nicer naming.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 7 Dec 2006 22:02:40 +0000 (22:02 +0000)]
Print 'refresh done' before pushing other patches
This is for the case where --patch was specified
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 6 Dec 2006 22:12:15 +0000 (22:12 +0000)]
Pipe the 'stg help <command>' output through the pager
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 6 Dec 2006 22:12:14 +0000 (22:12 +0000)]
Allow patch ranges for the 'pop' command
This patch is to make 'pop' accept patch ranges. Only the patches
specified in the range are now popped from the stack, the command
performing the necessary pop/push operations.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 6 Dec 2006 22:12:14 +0000 (22:12 +0000)]
Allow ranges for the 'export' command
The command is now slightly changed in that the arguments for export
are patch ranges rather than a directory. The export directory is
specified with the --dir option. The patch also removes the --diff
option and adds a more general --extension option.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 6 Dec 2006 22:12:13 +0000 (22:12 +0000)]
Fix the 'clean' command not to pop all the patches
With this patch, the 'clean' command only pops to the first empty
patch.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 5 Dec 2006 22:07:24 +0000 (22:07 +0000)]
Flush the stdout in the commit command
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 5 Dec 2006 22:07:24 +0000 (22:07 +0000)]
Fix "series -d" when the patch description is empty
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 5 Dec 2006 22:07:24 +0000 (22:07 +0000)]
Allow the cloning of branches not under StGIT control
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Tue, 5 Dec 2006 22:07:23 +0000 (22:07 +0000)]
Document some current bugs and add to the TODO list.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Tue, 5 Dec 2006 22:07:23 +0000 (22:07 +0000)]
Create a StgitObject class to factorise code for property handling.
This change makes it easier to add new stored fields to the Series object,
without having to duplicate existing code from Patch.
Generic field accessors were taken from the Patch class. Dir accessors
were added to avoid making the __dir attribute public, and were used
to replace Series::__series_dir (that name was a bit redundant anyway).
Create_empty_field came as a natural addition to factorise more code.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Karl Hasselström [Tue, 5 Dec 2006 22:07:23 +0000 (22:07 +0000)]
Ask git for author and committer name
(patch modified by Catalin Marinas)
Consistently do the following to get hold of default user, author and
committer:
1. Use the value specified on the command line, if any.
2. Otherwise, use the environment variables, if any.
3. Otherwise, read the configuration files
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Pavel Roskin [Tue, 5 Dec 2006 22:07:22 +0000 (22:07 +0000)]
Set HOME to the test directory to avoid reading ~/.stgitrc
This makes the tests more system independent and allows better testing
for "stg mail" command.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Catalin Marinas [Tue, 5 Dec 2006 22:07:22 +0000 (22:07 +0000)]
Only print the progress message if on a TTY
The "Checking for changes..." message should only be printed if stdout
is a TTY to avoid unnecessary information for people redirecting the
output to a file.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 5 Dec 2006 22:07:22 +0000 (22:07 +0000)]
Use gitconfig rather than stgirc
This patch enables the use of gitconfig files (~/.gitconfig or
.git/config) rather than stgitrc. These files can have a [stgit]
section. Currently, the git config lines have to be stripped since the
options are prepended with spaces.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Tue, 5 Dec 2006 22:07:21 +0000 (22:07 +0000)]
More config examples.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Fri, 24 Nov 2006 22:57:56 +0000 (22:57 +0000)]
Complete patch names after a patch (range) option
Commands like export, refresh and diff have options that take a patch
argument. Modify the bash completion script to allow this.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Fri, 24 Nov 2006 22:57:55 +0000 (22:57 +0000)]
Allows to refresh a non-top applied patch.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Fri, 24 Nov 2006 22:57:55 +0000 (22:57 +0000)]
Bomb out when --ack and --sign are both passed to "refresh".
Old behaviour was silently ignoring --ack, which could be confusing.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Yann Dirson [Fri, 24 Nov 2006 22:57:54 +0000 (22:57 +0000)]
Optimize stg goto in the pop case.
Signed-off-by: Yann Dirson <ydirson@altern.org>