stgit
17 years agoAllow a patch range to be specified for 'series'
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>
17 years agoHide the test_create_repo output
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>
17 years agoSynchronise the current patch if none specified for 'sync'
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>
17 years agoFix the displaying of unknown files for 'stg status'
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>
17 years agoAdd new 'rebase' command.
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>
17 years agoTrack the files conflict history
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>
17 years agoAdd option to automatically invoke the interactive merger
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>
17 years agoAllow e-mail aliases for the "mail" command
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>
17 years agoIndent the example gitconfig file
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>
17 years agoCheck git pull remote before defaulting to 'origin'
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>
17 years agoPipe the 'patches --diff' output through the pager
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>
17 years agoFix the branch renaming to also rename the reflogs
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>
17 years agoAdd '--missing' option to 'series'
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>
17 years agoFix the bash completion when there is no patch applied
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>
17 years agoAllow the mail command to send unapplied patches as well
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>
17 years agoAdd the --unapplied option to pick
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>
17 years agoThe author's address is incorrect in setyp.py
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>
17 years agoAllow the abbreviation of StGIT commands
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>
17 years agoDon't always use git-merge-recursive because of speed
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>
17 years agoAdd the 'sync' command
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>
17 years agoMake 'push --undo' safer
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>
17 years agoFix a merge case with files added in both heads but different
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>
17 years agoPrint 'refresh done' before pushing other patches
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>
17 years agoPipe the 'stg help <command>' output through the pager
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>
17 years agoAllow patch ranges for the 'pop' command
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>
17 years agoAllow ranges for the 'export' command
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>
17 years agoFix the 'clean' command not to pop all the patches
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>
17 years agoFlush the stdout in the commit command
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>
17 years agoFix "series -d" when the patch description is empty
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>
17 years agoAllow the cloning of branches not under StGIT control
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>
17 years agoDocument some current bugs and add to the TODO list.
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>
17 years agoCreate a StgitObject class to factorise code for property handling.
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>
17 years agoAsk git for author and committer name
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>
17 years agoSet HOME to the test directory to avoid reading ~/.stgitrc
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>
17 years agoOnly print the progress message if on a TTY
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>
17 years agoUse gitconfig rather than stgirc
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>
17 years agoMore config examples.
Yann Dirson [Tue, 5 Dec 2006 22:07:21 +0000 (22:07 +0000)]
More config examples.

Signed-off-by: Yann Dirson <ydirson@altern.org>
17 years agoComplete patch names after a patch (range) option
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>
17 years agoAllows to refresh a non-top applied patch.
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>
17 years agoBomb out when --ack and --sign are both passed to "refresh".
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>
17 years agoOptimize stg goto in the pop case.
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>
17 years agoMake Series::patch_applied public.
Yann Dirson [Fri, 24 Nov 2006 22:57:54 +0000 (22:57 +0000)]
Make Series::patch_applied public.

Signed-off-by: Yann Dirson <ydirson@altern.org>
17 years agoAdd a boundary to parse_patches()
Catalin Marinas [Wed, 22 Nov 2006 20:14:58 +0000 (20:14 +0000)]
Add a boundary to parse_patches()

This is useful since specifying the ".." range would generate all the
applied and unapplied patches for commands like "show" and
"delete". With this patch, the boundary is crossed only if
specifically asked (i.e. the first and last patch of the range are on
each side of the boundary).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAllow 'show' to display many patches
Catalin Marinas [Wed, 22 Nov 2006 20:14:57 +0000 (20:14 +0000)]
Allow 'show' to display many patches

The show command should be allowed to display more than one patch.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoFix a bug in gitmergeonefile.py introduced recently
Catalin Marinas [Mon, 20 Nov 2006 21:45:17 +0000 (21:45 +0000)]
Fix a bug in gitmergeonefile.py introduced recently

The bug was introduced by the change of merger and keeporig variables
from string to ConfigOption.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoOnly read the config files when running a command
Catalin Marinas [Fri, 17 Nov 2006 22:20:40 +0000 (22:20 +0000)]
Only read the config files when running a command

This reduces the time to display the help by about 12ms (on my PC).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd a 'sender' configuration option
Catalin Marinas [Fri, 17 Nov 2006 22:20:40 +0000 (22:20 +0000)]
Add a 'sender' configuration option

This variable is expanded in the e-mail templates on the 'From:'
header line. It replaces the current 'maintainer' variable. This code
will undergo some reworking as there are pending patches affecting it.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoOnly create a 'From: author' line if needed
Catalin Marinas [Fri, 17 Nov 2006 22:20:39 +0000 (22:20 +0000)]
Only create a 'From: author' line if needed

When the sender is the same as the author, there is no need to add a
'From:' line to the patch description.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoEdit the cover or patch message before e-mail encoding
Catalin Marinas [Thu, 16 Nov 2006 19:45:32 +0000 (19:45 +0000)]
Edit the cover or patch message before e-mail encoding

This is needed because the user might introduce characters not handled
by the current encoding and StGIT could no longer change it. The
disadvantage is that not all the e-mail headers are visible in the
editor but users shouldn't manually modify them anyway.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoUpdate the bash-completion script
Catalin Marinas [Thu, 16 Nov 2006 19:45:32 +0000 (19:45 +0000)]
Update the bash-completion script

This version automatically gets the command options and also has support
for more commands taking patch ranges.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoReduce the imports in stgit/main.py
Catalin Marinas [Thu, 16 Nov 2006 19:45:32 +0000 (19:45 +0000)]
Reduce the imports in stgit/main.py

Some module are only needed when executing a command and not when just
invoking the help. This reduces the delay slightly, useful for stgit bash
completion.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoStGIT bash completion
Karl Hasselström [Thu, 16 Nov 2006 19:45:31 +0000 (19:45 +0000)]
StGIT bash completion

A minimal bash completion script for StGIT. It completes the
subcommand names, and options and patch names for some subcommands.

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoFix the mail import regex to remove the [...PATCH...] text
Catalin Marinas [Thu, 16 Nov 2006 19:45:31 +0000 (19:45 +0000)]
Fix the mail import regex to remove the [...PATCH...] text

With the addition of a prefix to the [PATCH] string, the mail
importing regex was no longer able to remove it.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoRegression test for "stg mail"
Karl Hasselström [Thu, 16 Nov 2006 19:45:30 +0000 (19:45 +0000)]
Regression test for "stg mail"

Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoRegression test for "stg import"
Karl Hasselström [Thu, 16 Nov 2006 19:45:30 +0000 (19:45 +0000)]
Regression test for "stg import"

Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoDon't mention deprecated template variables
Karl Hasselström [Thu, 16 Nov 2006 19:45:29 +0000 (19:45 +0000)]
Don't mention deprecated template variables

%(endofheaders)s and %(date)s are deprecated and expand to the empty
string, so don't mention them in the help text.

Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoPrint progress message to stderr, not stdout
Karl Hasselström [Thu, 16 Nov 2006 19:45:28 +0000 (19:45 +0000)]
Print progress message to stderr, not stdout

Printing progress messages to stdout causes them to get mixed up with
the actual output of the program. Using stderr is much better, since
the user can then redirect the two components separately.

Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd file renaming support
Catalin Marinas [Wed, 8 Nov 2006 17:35:50 +0000 (17:35 +0000)]
Add file renaming support

The merge method was changed from gitmergeonefile.merge() to the external
git-merge-recursive which handles renames properly. The 'mv' command was
added as well.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoOptionally repack the object repository after every pull
Chuck Lever [Wed, 8 Nov 2006 22:30:03 +0000 (22:30 +0000)]
Optionally repack the object repository after every pull

Add an option to .stgitrc which causes the object repository to be repacked
after every "stg pull" operation.  Especially on NFS, this improves overall
performance considerably.  The only downside is that the first time it runs
it will take a very long time if the repository hasn't been packed
recently.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
17 years agoAdd a new option to "stg applied" and "stg unapplied" that provides a count
Chuck Lever [Wed, 8 Nov 2006 22:30:03 +0000 (22:30 +0000)]
Add a new option to "stg applied" and "stg unapplied" that provides a count

of patches rather than a list.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
17 years agoPrint a message while checking for changes in the working directory.
Chuck Lever [Wed, 8 Nov 2006 22:30:02 +0000 (22:30 +0000)]
Print a message while checking for changes in the working directory.

Helpful on slow file systems such as NFS.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
17 years agoAdd mbox support to "import"
Catalin Marinas [Wed, 8 Nov 2006 22:30:02 +0000 (22:30 +0000)]
Add mbox support to "import"

This patch allows the "import" command to read an mbox file. It also fixes
various bugs and modifies git.apply_patch() to dump the failed patch to
the .stgit-failed.patch file for easy inspection or manual applying.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd a trash directory with deleted patches
Catalin Marinas [Wed, 8 Nov 2006 22:30:02 +0000 (22:30 +0000)]
Add a trash directory with deleted patches

Since the delete command now supports multiple patches (and a ".." would
remove the whole stack), it is safer to copy the commit ids to
.git/patches/<branch>/trash/ in case a restore is needed. There is no
command allowing the restoring yet.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd support for multipart messages to import
Catalin Marinas [Tue, 7 Nov 2006 19:03:49 +0000 (19:03 +0000)]
Add support for multipart messages to import

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoProperly import qp-encoded e-mail headers
Catalin Marinas [Tue, 7 Nov 2006 19:03:49 +0000 (19:03 +0000)]
Properly import qp-encoded e-mail headers

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoProperly encode the e-mail headers and body
Catalin Marinas [Tue, 7 Nov 2006 19:03:48 +0000 (19:03 +0000)]
Properly encode the e-mail headers and body

The headers are QP-encoded and the body is left as utf-8. The mail command
now uses the email Python package for setting the headers and encoding. The
template files were modified as there is no need for "Date:" and
"%(endofheaders)s".

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoGenerate unique patch names
Karl Hasselström [Tue, 7 Nov 2006 19:03:48 +0000 (19:03 +0000)]
Generate unique patch names

"stg assimilate" was already making sure that automatically generated
patch names were non-empty and unique, by suffixing them with a dash
and a number if necessary. This patch moves that functionality into
the autogeneration function itself, so that all its callers can
benefit from it (and the user can benefit from uniform behavior from
all stgit commands).

As an added bonus, this permits the removal of a number of checks that
would abort with an error if the automatically generated name was
empty.

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoGenerate shorter patch names
Karl Hasselström [Tue, 7 Nov 2006 19:03:47 +0000 (19:03 +0000)]
Generate shorter patch names

Not all commits are blessed with a really short first-line summary in
their commit messages. This means that we shouldn't blindly take the
entire first line of the comment, since that sometimes results in
truly spectacular patch names.

I chose 30 characters as a reasonable value, considering that we don't
yet have any tab-completion on patch names. There's probably not much
point in making it configurable.

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoSlightly change the multiple patches delete function
Catalin Marinas [Thu, 2 Nov 2006 21:18:33 +0000 (21:18 +0000)]
Slightly change the multiple patches delete function

The function now first checks whether it can do the operation (i.e. the
applied patches are in consecutive reverse order starting from topmost)
before performing any deletes. It also eliminates the need to check for
local changes with every delete or when the operation is targetted to a
different branch.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAllow deletion of several patches at once
Karl Hasselström [Thu, 2 Nov 2006 21:18:33 +0000 (21:18 +0000)]
Allow deletion of several patches at once

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoFixes "stg goto `stg top`" to no-op & adds test
Ilpo Järvinen [Thu, 2 Nov 2006 21:18:32 +0000 (21:18 +0000)]
Fixes "stg goto `stg top`" to no-op & adds test

Please forgive me that didn't read the test metadata through while
producing the last patch. This time also it should be correct...

StGIT tried to access index that is not valid when goto'ing to
the current patch. Adds also a test for it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
17 years agoAllow hand-editing of patches before sending
Karl Hasselström [Thu, 2 Nov 2006 21:18:32 +0000 (21:18 +0000)]
Allow hand-editing of patches before sending

This adds a new flag to 'stg mail', allowing the user to hand-edit
each patch e-mail before it is sent, just like it is currently
possible to edit the cover message.

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoBash snippet to show branch and patch in bash prompt
Robin Rosenberg [Thu, 2 Nov 2006 21:18:32 +0000 (21:18 +0000)]
Bash snippet to show branch and patch in bash prompt

Modified according to Eran Tromer's suggestions. Also added some personal
preference to the default PS1 but people should really adapt this to their
needs.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
17 years agoClean-up the number of imports in main.py
Catalin Marinas [Thu, 2 Nov 2006 21:18:32 +0000 (21:18 +0000)]
Clean-up the number of imports in main.py

This is needed to reduce the start-up time to about a half. Only the module
for the given command is loaded.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoStgit: allow importing series files where patch names include slashes
Paolo 'Blaisorblade' Giarrusso [Thu, 2 Nov 2006 21:18:31 +0000 (21:18 +0000)]
Stgit: allow importing series files where patch names include slashes

Do that by converting slashes in patch name to dashes. Actually one could think
that different quilt folders relate to topic branches, but I do not see an
obviously correct mapping nor users which would do that.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
17 years agoAdd the 'autobcc' config option
Catalin Marinas [Fri, 27 Oct 2006 20:20:27 +0000 (21:20 +0100)]
Add the 'autobcc' config option

Useful to automatically bcc the e-mails to a given address.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd an optional prefix to the PATCH subject when mailing.
Robin Rosenberg [Fri, 27 Oct 2006 20:20:26 +0000 (21:20 +0100)]
Add an optional prefix to the PATCH subject when mailing.

This is for submitting patches to mailing lists with multiple
projects.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoRegression test for "stg assimilate"
Karl Hasselström [Wed, 25 Oct 2006 19:24:55 +0000 (20:24 +0100)]
Regression test for "stg assimilate"

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoNew stg command: assimilate
Karl Hasselström [Wed, 25 Oct 2006 19:24:55 +0000 (20:24 +0100)]
New stg command: assimilate

Introduce an "assimilate" command, with no options. It takes any GIT
commits committed on top of your StGIT patch stack and converts them
into StGIT patches.

Also change the error message when an StGIT command can't do its job
because there are GIT commits on top of the stack. Instead of
recommending "refresh -f", which is a destructive operation, recommend
"assimilate", which is not.

NOTE: "assimilate" currently refuses to work its magic if it
encounters a merge commit. This is reasonable, since merge commits
can't (yet) be represented as StGIT patches. However, it would be
possible (and well-defined) to replace the merge commit with a regular
commit on the branch with the same end result (tree object),
discarding all the parents that aren't on our branch. But this would
take a substantial amount of code, and is of dubious value, so for now
"assimilate" just cries bloody murder if it finds a merge.

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoDisregard extraneous arguments when providing help
Karl Hasselström [Wed, 25 Oct 2006 19:24:54 +0000 (20:24 +0100)]
Disregard extraneous arguments when providing help

"stg --help pop" prints the help text for pop, but "stg --help pop
foo" just prints the list of commands. That's silly, so fix it by
simply ignoring the extra arguments.

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoWhen no command was given, print usage message
Karl Hasselström [Wed, 25 Oct 2006 19:24:54 +0000 (20:24 +0100)]
When no command was given, print usage message

It's just silly to say "Unknown command" when the user didn't give a
command. Better to tell her to use a command.

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoLet "stg help" be like "stg --help"
Karl Hasselström [Wed, 25 Oct 2006 19:24:54 +0000 (20:24 +0100)]
Let "stg help" be like "stg --help"

"stg --help" prints the list of commands, but "stg help" just prints
the usage message for the help command. This may be useful in theory,
but the distinction is probably lost on 95% of all users (and the
remaining 5% probably don't need to see the usage message for the help
command anyway, since they know how it works). So just make both
commands output the helpful command list.

Signed-off-by: Karl Hasselström <kha@treskal.com>
17 years agoRelease 0.11 v0.11
Catalin Marinas [Sat, 21 Oct 2006 08:42:19 +0000 (09:42 +0100)]
Release 0.11

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd Debian package support to StGIT
Catalin Marinas [Fri, 20 Oct 2006 20:48:32 +0000 (21:48 +0100)]
Add Debian package support to StGIT

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoRearrange the patches with a given series file
Catalin Marinas [Fri, 20 Oct 2006 20:48:32 +0000 (21:48 +0100)]
Rearrange the patches with a given series file

This patch adds the --series option to the float command to reorder the
(top) patches as specified in a series file (or standard input).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd --auto option to 'mail'
Catalin Marinas [Fri, 20 Oct 2006 20:48:32 +0000 (21:48 +0100)]
Add --auto option to 'mail'

This option causes the mail command to automatically add the patch signers
to the Cc list. The patch also fixes the multiple To/Cc/Bcc lines
generation.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAllow the git-pull command to be configurable
Catalin Marinas [Fri, 20 Oct 2006 20:48:32 +0000 (21:48 +0100)]
Allow the git-pull command to be configurable

This way some people can use cg-pull instead. The patch also does some
clean-up in the example stgitrc file.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd the diffcol.sh file to the contrib directory
Catalin Marinas [Fri, 20 Oct 2006 20:48:30 +0000 (21:48 +0100)]
Add the diffcol.sh file to the contrib directory

This script is a pager for colourifying the diff output. Copied from Quilt.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoNew command 'float' to move a patch to the top
Robin Rosenberg [Tue, 17 Oct 2006 18:39:53 +0000 (19:39 +0100)]
New command 'float' to move a patch to the top

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoFix the --cover option.
Robin Rosenberg [Tue, 17 Oct 2006 18:37:26 +0000 (19:37 +0100)]
Fix the --cover option.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoFix the preserving of the local changes during pop
Catalin Marinas [Tue, 17 Oct 2006 18:37:26 +0000 (19:37 +0100)]
Fix the preserving of the local changes during pop

The operation now only preserves the local changes by reverse-applying the
diff of the popped patches.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd --sign and --ack options to refresh
Catalin Marinas [Mon, 16 Oct 2006 18:36:49 +0000 (19:36 +0100)]
Add --sign and --ack options to refresh

These options automatically sign or acknowledge a patch.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd the '--interactive' option to 'resolved'
Catalin Marinas [Mon, 16 Oct 2006 18:36:49 +0000 (19:36 +0100)]
Add the '--interactive' option to 'resolved'

This options causes the 'resolved' command to run an interactive merge tool
like xxdiff or emacs, defined by the 'imerger' variable in the .stgitrc
config file.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoTODO list update
Catalin Marinas [Fri, 15 Sep 2006 18:24:02 +0000 (19:24 +0100)]
TODO list update

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd the --noreply option to 'mail'
Catalin Marinas [Fri, 15 Sep 2006 18:24:02 +0000 (19:24 +0100)]
Add the --noreply option to 'mail'

There are mailing lists (ARM Linux Kernel is one of them) that filter out
e-mails having the In-Reply-To: header but a subject line not starting with
Re:. With this option, the mail command will not create the reply-specific
headers (the patch series will be unthreaded).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd patch history support
Catalin Marinas [Fri, 15 Sep 2006 18:24:02 +0000 (19:24 +0100)]
Add patch history support

The patch history tracking works by generating a chain of log commits for
the corresponding patch commits. A 'log' command is available to either
list the changelog or invoke gitk.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd the --graphical option to series
Catalin Marinas [Fri, 15 Sep 2006 18:24:01 +0000 (19:24 +0100)]
Add the --graphical option to series

This option invokes gitk on all the patches rather than printing the
series.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAllow empty commit messages
Catalin Marinas [Fri, 15 Sep 2006 18:24:01 +0000 (19:24 +0100)]
Allow empty commit messages

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoAdd --keep option to pop
Catalin Marinas [Sun, 10 Sep 2006 13:58:54 +0000 (14:58 +0100)]
Add --keep option to pop

This option allows popping patches without affecting the working directory.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
17 years agoUse get-ref-list to get the commit parents
Catalin Marinas [Sun, 10 Sep 2006 13:56:38 +0000 (14:56 +0100)]
Use get-ref-list to get the commit parents

Thanks to Yann Dirson for submitting the initial patch. The patch was
modified to only call git-rev-list when the commit parents are
required, otherwise operations like 'push' would be slowed down.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>