stgit
18 years ago[PATCH] Show patch content in description edit buffer
Paolo 'Blaisorblade' Giarrusso [Fri, 2 Sep 2005 09:25:20 +0000 (11:25 +0200)]
[PATCH] Show patch content in description edit buffer

Add an option (-s/--showpatch) to show the patch content when editing the
patch description, by appending it to the edit buffer, for more accurate
patch comment editing and to check its correctness before committing it.

It's how one works with quilt, and it's very important when the patch is
non-trivial to re-read it.

It's done for import, new and refresh, I left fold out.

Additionally, set the buffer filetype to "diff" for correct highlighting in
Vi.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
18 years agoFix push --undo to remove the local changes
Catalin Marinas [Wed, 24 Aug 2005 13:52:43 +0000 (14:52 +0100)]
Fix push --undo to remove the local changes

Without this patch, the command would fail if there are local changes
because of git-read-tree -m -u.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix the import --edit function
Catalin Marinas [Tue, 23 Aug 2005 16:19:22 +0000 (17:19 +0100)]
Fix the import --edit function

If the patch doesn't have any description, the editor is invoked twice,
once by new_patch and the 2nd time by refresh_patch. This patch fixes
this issue.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoOptimise the merge operation
Catalin Marinas [Tue, 23 Aug 2005 15:44:14 +0000 (16:44 +0100)]
Optimise the merge operation

The merge operation performs unnecessary git-checkout-cache which was
already done by git-read-tree or gitmergeonefile.py. The refresh
resulted from a push operation should not check for the tree status
since the index is already up-to-date a successful merge. For an failed
merge, the commit is not performed anyway.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoOptimise the git.switch() function
Catalin Marinas [Tue, 23 Aug 2005 12:41:41 +0000 (13:41 +0100)]
Optimise the git.switch() function

By default it checks the tree status and checks out the given tree id.
This can be done with 'git-read-tree -m old new'.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix the push_patch function to not always call refresh_patch
Catalin Marinas [Tue, 23 Aug 2005 09:07:22 +0000 (10:07 +0100)]
Fix the push_patch function to not always call refresh_patch

The refresh_patch() function should only be called when there was a
merge operation, otherwise push_patch() should only checkout the new
head.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoRelease 0.6 v0.6
Catalin Marinas [Sun, 21 Aug 2005 07:55:25 +0000 (08:55 +0100)]
Release 0.6

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoVersion information changed to show 'Stacked GIT'
Catalin Marinas [Sun, 21 Aug 2005 07:54:08 +0000 (08:54 +0100)]
Version information changed to show 'Stacked GIT'

Previously, it was displaying 'stg'.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoMove the local search path at the beginning of sys.path
Catalin Marinas [Sun, 21 Aug 2005 07:48:13 +0000 (08:48 +0100)]
Move the local search path at the beginning of sys.path

This patch allows StGIT to search for the package files in the local
directories first, in order to avoid problems with multiple installations.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoREADME text moved to the wiki page
Catalin Marinas [Sun, 21 Aug 2005 07:00:34 +0000 (08:00 +0100)]
README text moved to the wiki page

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd the 'id' command
Catalin Marinas [Thu, 18 Aug 2005 13:35:19 +0000 (14:35 +0100)]
Add the 'id' command

This command prints the hash value of a GIT id (defaulting to HEAD). In
addition to the standard GIT id's like heads and tags, this command also
accepts 'base' and '[<patch>]/(bottom | top)'.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd the prefix information to INSTALL
Catalin Marinas [Thu, 18 Aug 2005 12:50:37 +0000 (13:50 +0100)]
Add the prefix information to INSTALL

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoOptimise the Commit objects creation
Catalin Marinas [Thu, 18 Aug 2005 12:46:20 +0000 (13:46 +0100)]
Optimise the Commit objects creation

The Commit objects are used for commands like 'series' to check whether
a patch is empty or not. Since the bottom of a patch is usually the same
as the top of the previous one, it makes sense to cache the Commit
objects and reduce their creation (and git-cat-file calls) to half. This
patch adds a Commit objects factory which caches the results.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoUpdate the README (mainly alignment)
Catalin Marinas [Thu, 18 Aug 2005 12:01:55 +0000 (13:01 +0100)]
Update the README (mainly alignment)

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoREADME file update
Catalin Marinas [Tue, 16 Aug 2005 16:06:55 +0000 (17:06 +0100)]
README file update

This file is quite out of date and needs to be updated.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix a typo in the fold command help
Catalin Marinas [Tue, 16 Aug 2005 13:47:50 +0000 (14:47 +0100)]
Fix a typo in the fold command help

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix gitmergeonefile.py to deal with local installation
Catalin Marinas [Tue, 16 Aug 2005 13:47:33 +0000 (14:47 +0100)]
Fix gitmergeonefile.py to deal with local installation

After a previous change, this file didn't know where to find the stgit
package if it wasn't installed with the default prefix.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd --edit option to import
Catalin Marinas [Mon, 15 Aug 2005 16:42:12 +0000 (17:42 +0100)]
Add --edit option to import

This option allows a patch description to be editted before being
checked in.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoMake 'stg pull' use 'git pull' directly
Catalin Marinas [Mon, 15 Aug 2005 16:16:23 +0000 (17:16 +0100)]
Make 'stg pull' use 'git pull' directly

In the initial version, 'git fetch' was used but its interface might
change in the future.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAllow StGIT to be installed in a local directory
Catalin Marinas [Mon, 15 Aug 2005 16:16:17 +0000 (17:16 +0100)]
Allow StGIT to be installed in a local directory

StGIT should no longer rely on being installed under /usr. This has
implications in the default python search path, the /etc/stgitrc file
and the /usr/share/stgit/templates directory.

By default, the 'python setup.py install' command will now install StGIT
in the home directory of the current user.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix the 'import --name' option overriding
Catalin Marinas [Mon, 8 Aug 2005 17:08:01 +0000 (18:08 +0100)]
Fix the 'import --name' option overriding

When the patch was read from a file, the --name option to import didn't
override the default name. This patch fixes it.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoImplement the fold command
Catalin Marinas [Mon, 8 Aug 2005 16:36:23 +0000 (17:36 +0100)]
Implement the fold command

At the moment, it only applies a patch read from a file or the standard
input on top of the current patch or on its bottom and three-way merged
with it (useful for upgrading external patches).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoCreate the .git/refs/bases/<head> file in 'init'
Catalin Marinas [Wed, 3 Aug 2005 15:38:11 +0000 (16:38 +0100)]
Create the .git/refs/bases/<head> file in 'init'

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd the 'number' variable to the e-mail template
Catalin Marinas [Wed, 3 Aug 2005 12:40:48 +0000 (13:40 +0100)]
Add the 'number' variable to the e-mail template

This variable expands to an empty string if there is only one patch
to be sent or to ' patchnr/totalnr' otherwise.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoImplement the 'clone' command
Catalin Marinas [Wed, 3 Aug 2005 12:16:17 +0000 (13:16 +0100)]
Implement the 'clone' command

This command is based on the existing git-clone-script.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years ago'pull' should use the origin branch
Catalin Marinas [Wed, 3 Aug 2005 11:20:43 +0000 (12:20 +0100)]
'pull' should use the origin branch

By default it uses the branch with the same name as the head pointed to
by the HEAD link. The command also accepts a different location.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix description/diff delimiting in import
Catalin Marinas [Wed, 3 Aug 2005 11:20:42 +0000 (12:20 +0100)]
Fix description/diff delimiting in import

Only '---' should be a valid form of delimiting (or 'diff -') but not
more than three '-'.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoSave .git/ORIG_HEAD when pulling changes
Catalin Marinas [Wed, 3 Aug 2005 11:20:42 +0000 (12:20 +0100)]
Save .git/ORIG_HEAD when pulling changes

ORIG_HEAD is the base of the stack before merging the latest remote
changes.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoRelease 0.5 v0.5
Catalin Marinas [Sat, 30 Jul 2005 21:02:31 +0000 (22:02 +0100)]
Release 0.5

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoTODO update
Catalin Marinas [Sat, 30 Jul 2005 21:00:47 +0000 (22:00 +0100)]
TODO update

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd '%(maintainer)s' variable to the e-mail template
Catalin Marinas [Fri, 29 Jul 2005 15:30:24 +0000 (16:30 +0100)]
Add '%(maintainer)s' variable to the e-mail template

Following some discussions on the git list, it looks like the
committer's e-mail address doesn't have to be a valid one. The
above variable is generated from the author details defined in
the stgitrc file and is placed on the From: line in the default
e-mail template.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAllow ':' in the subject of imported messages
Catalin Marinas [Thu, 28 Jul 2005 16:30:10 +0000 (17:30 +0100)]
Allow ':' in the subject of imported messages

Initially, the 'import' command used to remove the 'word:' expression
from the subject line of an e-mail. This might actually be useful
for a big system with sub-systems.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years ago'mail' to use the global template file
Catalin Marinas [Thu, 28 Jul 2005 16:30:08 +0000 (17:30 +0100)]
'mail' to use the global template file

If there is no .git/patchmail.tmpl file, use the default one in
/usr/share/stgit/templates

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years ago'export' to use the global template file
Catalin Marinas [Thu, 28 Jul 2005 15:57:09 +0000 (16:57 +0100)]
'export' to use the global template file

If there is no .git/patchexport.tmpl file, use the default one in
/usr/share/stgit/templates

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoInstall the template files as well
Catalin Marinas [Thu, 28 Jul 2005 15:13:56 +0000 (16:13 +0100)]
Install the template files as well

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoHandle 'A' flag for new files
Peter Osterlund [Thu, 28 Jul 2005 11:55:46 +0000 (13:55 +0200)]
Handle 'A' flag for new files

Patches that add new files don't work correctly if git reports them
with the 'A' flag. StGIT claims there are unresolved conflicts. This
patch fixes it.

Signed-off-by: Peter Osterlund <petero2@telia.com>
18 years agoImplement an 'import' command
Catalin Marinas [Wed, 27 Jul 2005 21:17:25 +0000 (22:17 +0100)]
Implement an 'import' command

This patch implements the 'import' command.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAllow the GIT ids to be more flexible
Catalin Marinas [Wed, 27 Jul 2005 10:04:32 +0000 (11:04 +0100)]
Allow the GIT ids to be more flexible

The current implementation does not allow hash values or other *HEAD
names to be passed to the 'diff' command.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix the patch name checking in push.py
Catalin Marinas [Tue, 26 Jul 2005 12:54:56 +0000 (13:54 +0100)]
Fix the patch name checking in push.py

For an unknown patch name, the assert in stack.py fails. Fix the calling
function to check the pre-conditions.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd a patch renaming command
Catalin Marinas [Tue, 26 Jul 2005 12:54:56 +0000 (13:54 +0100)]
Add a patch renaming command

This command changes the name of a patch

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years ago[AN] status for newly added files
Catalin Marinas [Tue, 26 Jul 2005 12:54:56 +0000 (13:54 +0100)]
[AN] status for newly added files

This patch enables displaying of the newly added files prefixed with
either A or N.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoImprove the help message for commands
Catalin Marinas [Sun, 24 Jul 2005 10:44:10 +0000 (11:44 +0100)]
Improve the help message for commands

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd authentication capability to the mail command
Bryan larsen [Thu, 21 Jul 2005 21:12:10 +0000 (22:12 +0100)]
Add authentication capability to the mail command

Add authentication capability to the mail command.  Added 'smtppassword'
and 'smtpuser' to config file and --smtp-user, --smtp-password to command
line.

Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
18 years agoUpdate the TODO file
Catalin Marinas [Wed, 20 Jul 2005 12:18:28 +0000 (13:18 +0100)]
Update the TODO file

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoMake the 'mail' command a bit safer
Catalin Marinas [Wed, 20 Jul 2005 11:59:10 +0000 (12:59 +0100)]
Make the 'mail' command a bit safer

A simple 'mail' command automatically sends all the applied patches.
This patch changes so that the user needs to explicitely add the
'--all' or '--range' options.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd a 'pull' command
Catalin Marinas [Wed, 20 Jul 2005 10:46:43 +0000 (11:46 +0100)]
Add a 'pull' command

The current implementation just uses git-fetch-script

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoImplement the 'mail' command
Catalin Marinas [Tue, 19 Jul 2005 16:30:45 +0000 (17:30 +0100)]
Implement the 'mail' command

This command is used to send a series of patches via SMTP. The
.git/patchmail.tmpl file is used as the default template. A first message
template can be used with the --first option. Example templates are in
the examples/ directory.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix the exception class name in export.py
Catalin Marinas [Tue, 19 Jul 2005 12:08:24 +0000 (13:08 +0100)]
Fix the exception class name in export.py

MainException replaced with CmdException

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd --force option to new
Catalin Marinas [Fri, 15 Jul 2005 14:31:17 +0000 (15:31 +0100)]
Add --force option to new

This option creates a new patch even if there are local changes in the
tree. It is useful if one starts modifying the tree but forgot to create
a patch for it.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoImplement 'clean' cmd
Catalin Marinas [Fri, 15 Jul 2005 12:10:10 +0000 (13:10 +0100)]
Implement 'clean' cmd

This command deletes all the empty patches from the series.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agocrt_series initialisation changed
Catalin Marinas [Thu, 14 Jul 2005 16:21:44 +0000 (17:21 +0100)]
crt_series initialisation changed

The current model does not allow running any command outside a GIT tree.
Even 'help' fails. The simple hack is to use setattr to initialise
crt_series in a module. The other option would be to initialise it in
every command file but I'm too lazy to do it.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoallow spaces in filenames (second try)
Bryan Larsen [Thu, 14 Jul 2005 10:09:37 +0000 (11:09 +0100)]
allow spaces in filenames (second try)

The current version of stgit does not allow whitespace in filenames.
This patch fixes that.  It also speeds up operations on large filesets
considerably.

Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
18 years agoThe top patch is never exported.
Bryan Larsen [Thu, 14 Jul 2005 09:48:51 +0000 (10:48 +0100)]
The top patch is never exported.

Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
18 years agoAdd "name <email>" parsing for simpler commands
Catalin Marinas [Thu, 14 Jul 2005 09:48:36 +0000 (10:48 +0100)]
Add "name <email>" parsing for simpler commands

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoUsing the --message option with the new command fails. Fix it.
Bryan Larsen [Wed, 13 Jul 2005 21:36:26 +0000 (22:36 +0100)]
Using the --message option with the new command fails.  Fix it.

Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
18 years agoTrack git/stack exceptions when initialising crt_series
Catalin Marinas [Wed, 13 Jul 2005 16:10:17 +0000 (17:10 +0100)]
Track git/stack exceptions when initialising crt_series

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoInstall the stgit.commands package
Catalin Marinas [Tue, 12 Jul 2005 22:05:20 +0000 (23:05 +0100)]
Install the stgit.commands package

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoSeparate the commands in stgit/commands/* files
Catalin Marinas [Tue, 12 Jul 2005 22:02:06 +0000 (23:02 +0100)]
Separate the commands in stgit/commands/* files

The main.py file is getting bigger and bigger and it will soon become
unmaintenable. This patch creates separate files for each command.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoChangeLog removed
Catalin Marinas [Tue, 12 Jul 2005 21:23:41 +0000 (22:23 +0100)]
ChangeLog removed

It will be automatically generated for every snapshot. Otherwise, the
history is in GIT.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd --range option to export
Catalin Marinas [Tue, 12 Jul 2005 17:36:06 +0000 (18:36 +0100)]
Add --range option to export

Useful when you only need to export a range of the applied patches.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoUpdate the git cache for the resolved file
Catalin Marinas [Mon, 11 Jul 2005 17:47:48 +0000 (18:47 +0100)]
Update the git cache for the resolved file

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoFix __checkout_files() in gitmergeonefile.py
Catalin Marinas [Mon, 11 Jul 2005 17:47:01 +0000 (18:47 +0100)]
Fix __checkout_files() in gitmergeonefile.py

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAllow local changes if the patch deleted is not current
Catalin Marinas [Mon, 11 Jul 2005 17:45:40 +0000 (18:45 +0100)]
Allow local changes if the patch deleted is not current

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd --template option to export
Catalin Marinas [Mon, 11 Jul 2005 17:44:40 +0000 (18:44 +0100)]
Add --template option to export

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
18 years agoAdd stgit. before utils in import
Catalin Marinas [Sun, 10 Jul 2005 10:32:34 +0000 (11:32 +0100)]
Add stgit. before utils in import

18 years agoInitial commit (Release 0.4) v0.4
Catalin Marinas [Sun, 10 Jul 2005 07:29:31 +0000 (08:29 +0100)]
Initial commit (Release 0.4)