chiark / gitweb /
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Yann Dirson [Mon, 14 Aug 2006 16:55:42 +0000 (18:55 +0200)]
Add a --parent flag to "stgit pick".
This is useful to pick changes from a non-stgit branch, that were
recorded as a merge commit, while giving control on the parent to
use as "bottom" for the patch (for some reason stgit selects the
first parent by default).
Incidentally, it can be used to pick changes between arbitrary
trees in the revision graph. Since that can be useful as well,
I did not implement the is_parent check I originally meant to add.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Fri, 11 Aug 2006 16:32:33 +0000 (17:32 +0100)]
Use the ".." syntax for patch ranges
This patch also adapt the push/mail/diff/export commands to the new
syntax.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 11 Aug 2006 16:32:31 +0000 (17:32 +0100)]
Set the .txt extension to the StGIT commit message file
The original extension was .msg which editors like emacs couldn't guess.
The patch changes it to .txt.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 14 Jul 2006 16:25:36 +0000 (17:25 +0100)]
Automatically generate patch names for uncommit
This is the same as in the pick or import commands, the patch name, if not
specified, is automatically generated from the first line of the patch
description.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Mon, 10 Jul 2006 21:21:22 +0000 (22:21 +0100)]
Add a common function for reading template files
Useful to search through various directories without duplicating the code.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 5 Jul 2006 18:27:02 +0000 (19:27 +0100)]
Add '--' to git-diff-index calls
Without this, git-diff-index was confused about the command line arguments
and commands like 'push --undo' and 'status --reset' failed to work
properly.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 5 Jul 2006 18:27:02 +0000 (19:27 +0100)]
Get the patch name from the description
The import and pick commands can get the patch name from the patch
description if it wasn't passed on the command line or the patch is read
from the standard input (for import).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 5 Jul 2006 18:27:02 +0000 (19:27 +0100)]
Do not use the pager when the output is empty
This is for the diff and show commands to not run the output through the
pager if there is nothing to display.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 11 Jun 2006 12:21:04 +0000 (13:21 +0100)]
Release 0.10
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 11 Jun 2006 12:21:02 +0000 (13:21 +0100)]
Update the TODO file
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 11 Jun 2006 12:16:26 +0000 (13:16 +0100)]
Fix the t0001-subdir-branches.sh test
It was using 'stg add <file>' without any patches applied. This now fails.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 11 Jun 2006 12:12:39 +0000 (13:12 +0100)]
Fix the add and rm commands to fail if no patch is applied
They were just adding the file without complaining.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 11 Jun 2006 12:12:30 +0000 (13:12 +0100)]
Generate an empty commit for the newly created patches
This way, 'stg show' will no longer display the previous patch.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 11 Jun 2006 12:05:56 +0000 (13:05 +0100)]
Show the stderr for failed GIT commands
This allows easier diagnosis of the faults.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 11 Jun 2006 12:05:02 +0000 (13:05 +0100)]
Fix the t1201-pull-trailing.sh test
The test was expecting a failure but StGIT actually does a three-way merge
that succeeds.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Sun, 28 May 2006 21:25:19 +0000 (23:25 +0200)]
Classify commands in stg --help output.
Commands will be much easier to find out that way.
Inspiration mostly comes from pg-help.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Tue, 6 Jun 2006 18:15:13 +0000 (19:15 +0100)]
Add the --replace option to import
By default, import fails if an existing patch is found with the same name.
With this option, import replaces the existing patch if it is unapplied.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Yann Dirson [Sun, 28 May 2006 07:46:11 +0000 (08:46 +0100)]
Allow to specify multiple patch names on push command-line
Signed-off-by: Yann Dirson <ydirson@altern.org>
Catalin Marinas [Thu, 25 May 2006 20:38:10 +0000 (21:38 +0100)]
Implement the 'goto' command
Push/pop patches to/from the stack until the one given on the command
line becomes current. This is a shortcut for the 'push --to' or 'pop
--to' commands. There is no '--undo' option for 'goto'. Use the 'push'
command for this.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 24 May 2006 21:03:40 +0000 (22:03 +0100)]
Add the --update option to pick
This option updates the current patch with changes from the picked commit
or patch. This option is useful when work is done on a temporary patch but
the changes need to be folded back into existing patches. Note that
three-way merging is not supported with this option (I'm not sure it is
even needed).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Karl Hasselström [Wed, 24 May 2006 06:07:21 +0000 (08:07 +0200)]
Explicitly specify utf-8 coding in file
uncommit.py has a non-ascii character in it (in my name in the
copyright line). Without this coding: comment, I get an error like the
following when I run stgit:
/home/kha/git/stgit/stgit/main.py:61: DeprecationWarning: Non-ASCII
character '\xc3' in file
/home/kha/git/stgit/stgit/commands/uncommit.py on line 3, but no
encoding declared; see http://www.python.org/peps/pep-0263.html for
details
Karl Hasselström [Wed, 24 May 2006 06:06:58 +0000 (08:06 +0200)]
Fix indexing error during "diff -r/"
The string indexing when decoding the -r argument for diff made an
implicit assumption that the revision string was at least two
characters long, which broke on the simple invocation "diff -r/".
Karl Hasselström [Wed, 24 May 2006 06:06:43 +0000 (08:06 +0200)]
Fix infinite recursion on absolute paths
Calling create_dirs with an absolute path caused infinite recursion,
since os.path.dirname('/') == '/'. Fix this by exiting early if the
given path already is a directory.
Karl Hasselström [Thu, 18 May 2006 20:36:41 +0000 (21:36 +0100)]
Tests for branch names with slashes
Test a number of operations on a repository that has branch names
containing slashes (that is, branches living in a subdirectory of
.git/refs/heads).
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Thu, 18 May 2006 20:36:41 +0000 (21:36 +0100)]
Handle branch names with slashes
Teach stgit to handle branch names with slashes in them; that is,
branches living in a subdirectory of .git/refs/heads.
I had to change the patch@branch/top command-line syntax to
patch@branch//top, in order to get sane parsing. The /top variant is
still available for repositories that have no slashy branches; it is
disabled as soon as there exists at least one subdirectory of
refs/heads. Preferably, this compatibility hack can be killed some
time in the future.
Signed-off-by: Karl Hasselström <kha@treskal.com>