stgit
14 years agostgit.el: Do not use suppress-keymap for prefix keymaps
Gustav Hållberg [Fri, 26 Feb 2010 15:54:09 +0000 (16:54 +0100)]
stgit.el: Do not use suppress-keymap for prefix keymaps

Signed-off-by: Gustav Hållberg <gustav@gmail.com>
14 years agoFix _command_list() function for empty command sets
Catalin Marinas [Wed, 10 Feb 2010 15:14:27 +0000 (15:14 +0000)]
Fix _command_list() function for empty command sets

The alias commands are not real StGit commands and the corresponding set
(kind) defined in stgit/commands/__init__.py is empty. This leads to a
KeyError in the _command_list() function. The patch ignores empty sets.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoReplace some git commands with stg aliases in test scripts
Catalin Marinas [Fri, 5 Feb 2010 13:45:02 +0000 (13:45 +0000)]
Replace some git commands with stg aliases in test scripts

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoAdd support for command aliases
Catalin Marinas [Fri, 5 Feb 2010 13:45:01 +0000 (13:45 +0000)]
Add support for command aliases

This patch introduces support StGit command aliases with a few defaults:

stg add -> git add
stg rm -> git rm
stg mv -> git mv
stg resolved -> git add

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoPopulate the cached config options with the defaults
Catalin Marinas [Fri, 5 Feb 2010 13:45:01 +0000 (13:45 +0000)]
Populate the cached config options with the defaults

The patch pre-populates the cached config options with the default
values. It also removes an unused option (stgit.extensions).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoPass the --in-reply-to and --no-thread options to git send-email
Catalin Marinas [Fri, 5 Feb 2010 13:45:00 +0000 (13:45 +0000)]
Pass the --in-reply-to and --no-thread options to git send-email

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoRename the mail --refid and --noreply options to match Git
Catalin Marinas [Fri, 5 Feb 2010 13:44:59 +0000 (13:44 +0000)]
Rename the mail --refid and --noreply options to match Git

The new option names are --in-reply-to and --no-thread.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoRecord a single transaction for conflicting push operations
Catalin Marinas [Fri, 5 Feb 2010 13:44:59 +0000 (13:44 +0000)]
Record a single transaction for conflicting push operations

StGit commands resulting in a conflicting patch pushing record two
transactions in the log (with one of them being inconsistent with HEAD
!= top). Undoing such operations requires two "stg undo" (possibly with
--hard) commands which is unintuitive. This patch changes such
operations to only record one log entry and "stg undo" reverts the stack
to the state prior to the operation.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Cc: Gustav Hållberg <gustav@virtutech.com>
Cc: Karl Wiberg <kha@treskal.com>
14 years agostg mail: don't parse To/Cc/Bcc in --git mode
Alex Chiang [Fri, 5 Feb 2010 13:44:58 +0000 (13:44 +0000)]
stg mail: don't parse To/Cc/Bcc in --git mode

When using stg mail in --git mode, do not parse command-line To/Cc/Bcc
addresses.

Instead, we pass them directly to git send-email.

This allows us to leverage git send-email's support for email aliases.

Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostg mail: add basic support for git send-email
Alex Chiang [Fri, 5 Feb 2010 13:44:57 +0000 (13:44 +0000)]
stg mail: add basic support for git send-email

This is the first step in turning stg mail into a wrapper for
git send-email. It requires passing the --git option to stg mail
for now.

Only a few basic options are supported for now, namely To/Cc/Bcc.

git send-email options used:
  --suppress-cc=self prevent further information prompts
  --quiet reduce git send-email output

Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostg mail: factor out __update_header
Alex Chiang [Fri, 5 Feb 2010 13:44:57 +0000 (13:44 +0000)]
stg mail: factor out __update_header

Factor __update_header out of __build_address_headers.

Headers like Reply-To, Mail-Reply-To, and Mail-Followup-To are now
handled in __build_extra_headers.

We make this change because in the future, we do not want to call
__build_address_headers if using git send-email but we will always
want to call __build_extra_headers.

Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostg mail: make __send_message do more
Alex Chiang [Fri, 5 Feb 2010 13:44:56 +0000 (13:44 +0000)]
stg mail: make __send_message do more

Factor out the common code required to send either a cover mail
or patch, and implement it in __send_message.

WRY? DRY.

Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostg mail: reorder __build_[message|cover] parameters
Alex Chiang [Fri, 5 Feb 2010 13:44:55 +0000 (13:44 +0000)]
stg mail: reorder __build_[message|cover] parameters

Reorder the argument lists for both __build_cover and __build_message.

This change will aid readability of a subsequent refactoring patch.

Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostg mail: Refactor __send_message and friends
Alex Chiang [Fri, 5 Feb 2010 13:44:54 +0000 (13:44 +0000)]
stg mail: Refactor __send_message and friends

Instead of passing all the various smtp* args to __send_message
individually, let's just pass the options list instead.

The main motivation is for future patches. The end goal is to
thin out stg mail's implementation and make it a minimal wrapper
around git send-email. By passing the options list to __send_message
we prepare to pass options directly to git send-email.

As a bonus, this change results in a cleaner internal API.

Finally, it also pushes the smtp logic where it belongs, viz. into
__send_message_smtp, instead of cluttering up the main body of
mail.func().

Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostgit.el: Add the stgit-execute command and bind it to "!"
David Kågedal [Wed, 3 Feb 2010 09:09:58 +0000 (10:09 +0100)]
stgit.el: Add the stgit-execute command and bind it to "!"

Signed-off-by: David Kågedal <david@virtutech.com>
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agoimprove "usage" strings to include optional "--"
Gustav Hållberg [Fri, 29 Jan 2010 14:48:22 +0000 (15:48 +0100)]
improve "usage" strings to include optional "--"

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Handle patch and branch names starting with hyphen
Gustav Hållberg [Fri, 29 Jan 2010 11:55:44 +0000 (12:55 +0100)]
stgit.el: Handle patch and branch names starting with hyphen

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Made a few wide lines more narrow
Gustav Hållberg [Fri, 29 Jan 2010 10:55:50 +0000 (11:55 +0100)]
stgit.el: Made a few wide lines more narrow

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Run "git update-index --refresh" before redrawing work tree status
Gustav Hållberg [Mon, 25 Jan 2010 10:17:58 +0000 (11:17 +0100)]
stgit.el: Run "git update-index --refresh" before redrawing work tree status

This prevents unchanged files from showing up as "Modified" in the
work tree.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Advise non-stgit git functions to update stgit buffers
Gustav Hållberg [Fri, 22 Jan 2010 14:41:41 +0000 (15:41 +0100)]
stgit.el: Advise non-stgit git functions to update stgit buffers

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agoTutorial: Add stgit.el section
Gustav Hållberg [Thu, 14 Jan 2010 13:47:12 +0000 (14:47 +0100)]
Tutorial: Add stgit.el section

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agostgit.el: Prevent stgit-applied-patches from moving point
Gustav Hållberg [Thu, 14 Jan 2010 13:46:54 +0000 (14:46 +0100)]
stgit.el: Prevent stgit-applied-patches from moving point

This stops stgit-diff-range from moving point.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agostgit.el: Annotate stgit-capture-output macro for edebug
Gustav Hållberg [Thu, 14 Jan 2010 13:18:54 +0000 (14:18 +0100)]
stgit.el: Annotate stgit-capture-output macro for edebug

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agostgit.el: Add command for showing diff for a range of patches
Karl Wiberg [Wed, 13 Jan 2010 10:27:12 +0000 (11:27 +0100)]
stgit.el: Add command for showing diff for a range of patches

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agostgit.el: Optionally allow duplicates when sorting patches
Karl Wiberg [Wed, 13 Jan 2010 10:27:12 +0000 (11:27 +0100)]
stgit.el: Optionally allow duplicates when sorting patches

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agostgit.el: Break out diff whitespace arg handling to separate function
Karl Wiberg [Wed, 13 Jan 2010 10:27:12 +0000 (11:27 +0100)]
stgit.el: Break out diff whitespace arg handling to separate function

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoMerge gustav/proposed
Karl Wiberg [Fri, 22 Jan 2010 13:57:06 +0000 (14:57 +0100)]
Merge gustav/proposed

  stgit.el: Make "G" work before/after the tree
  stgit.el: Repair how patches with empty descriptions are shown

14 years agoMerge branch 'stable'
Catalin Marinas [Thu, 17 Dec 2009 23:31:50 +0000 (23:31 +0000)]
Merge branch 'stable'

14 years agoFix "stg applied" usage in contrib/stg-dispatch
Catalin Marinas [Thu, 17 Dec 2009 23:31:23 +0000 (23:31 +0000)]
Fix "stg applied" usage in contrib/stg-dispatch

This command was replaced by "stg series --applied" but the above shell
script hasn't been changed. This is a fix for bug #557475.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostgit.el: Make "G" work before/after the tree
Gustav Hållberg [Wed, 16 Dec 2009 15:57:56 +0000 (16:57 +0100)]
stgit.el: Make "G" work before/after the tree

14 years agostgit.el: Repair how patches with empty descriptions are shown
Gustav Hållberg [Sun, 6 Dec 2009 19:30:43 +0000 (20:30 +0100)]
stgit.el: Repair how patches with empty descriptions are shown

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Do not emit trailing whitespace
Gustav Hållberg [Fri, 4 Dec 2009 07:55:03 +0000 (08:55 +0100)]
stgit.el: Do not emit trailing whitespace

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Get default rebase branch from git-config in stg-rebase
Gustav Hållberg [Fri, 4 Dec 2009 07:55:03 +0000 (08:55 +0100)]
stgit.el: Get default rebase branch from git-config in stg-rebase

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Allow "B" to create new branches
Gustav Hållberg [Fri, 4 Dec 2009 07:55:02 +0000 (08:55 +0100)]
stgit.el: Allow "B" to create new branches

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Make stg undo/redo --hard ask for confirmation with dirty index/worktree
Gustav Hållberg [Fri, 4 Dec 2009 07:55:02 +0000 (08:55 +0100)]
stgit.el: Make stg undo/redo --hard ask for confirmation with dirty index/worktree

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Do not recurse into unknown directories after "t u"
Gustav Hållberg [Fri, 4 Dec 2009 07:55:02 +0000 (08:55 +0100)]
stgit.el: Do not recurse into unknown directories after "t u"

Let RET on unexpanded directories expand the directory.
This is similar to how git-status does it.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Use "->" for defstruct field accessors
Gustav Hållberg [Fri, 4 Dec 2009 07:55:02 +0000 (08:55 +0100)]
stgit.el: Use "->" for defstruct field accessors

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Disable undo information in stgit output capture buffers
Gustav Hållberg [Fri, 4 Dec 2009 07:55:02 +0000 (08:55 +0100)]
stgit.el: Disable undo information in stgit output capture buffers

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agonew: Allow empty messages with --message and --file
Gustav Hållberg [Fri, 4 Dec 2009 07:55:02 +0000 (08:55 +0100)]
new: Allow empty messages with --message and --file

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Make the patch name optional
David Kågedal [Fri, 4 Dec 2009 07:55:01 +0000 (08:55 +0100)]
stgit.el: Make the patch name optional

Introduce an "alternate" patch line format and make "t n" toggle
between the two.

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Use format-spec when formatting file information
David Kågedal [Fri, 4 Dec 2009 07:55:01 +0000 (08:55 +0100)]
stgit.el: Use format-spec when formatting file information

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Use format-spec when formatting patch lines
David Kågedal [Fri, 4 Dec 2009 07:55:01 +0000 (08:55 +0100)]
stgit.el: Use format-spec when formatting patch lines

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Move defcustom definitions to the top
David Kågedal [Fri, 4 Dec 2009 07:55:01 +0000 (08:55 +0100)]
stgit.el: Move defcustom definitions to the top

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agoMerge commit 'kha/safe'
Catalin Marinas [Thu, 3 Dec 2009 22:37:04 +0000 (22:37 +0000)]
Merge commit 'kha/safe'

14 years agoMerge branch 'stable'
Catalin Marinas [Thu, 3 Dec 2009 22:35:28 +0000 (22:35 +0000)]
Merge branch 'stable'

14 years agoUpdate the tutorial for the conflict situations
Catalin Marinas [Thu, 3 Dec 2009 22:35:10 +0000 (22:35 +0000)]
Update the tutorial for the conflict situations

This is a fix for bug #14672.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoundo: Add test that "stg undo --hard" leaves the stgit tree in a consistent state
Gustav Hållberg [Mon, 23 Nov 2009 09:19:42 +0000 (10:19 +0100)]
undo: Add test that "stg undo --hard" leaves the stgit tree in a consistent state

The test currently fails.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoMerge branch 'stable'
Catalin Marinas [Wed, 28 Oct 2009 22:05:34 +0000 (22:05 +0000)]
Merge branch 'stable'

14 years agoFix setup.py to generate the needed files
Catalin Marinas [Wed, 28 Oct 2009 21:06:54 +0000 (21:06 +0000)]
Fix setup.py to generate the needed files

StGit was relying on Makefile to generate some files but this breaks
using setup.py directly for targets like rpm.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostgit.el: Position point at beginning of buffer before editing messages
Gustav Hållberg [Wed, 28 Oct 2009 11:22:51 +0000 (12:22 +0100)]
stgit.el: Position point at beginning of buffer before editing messages

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agofold/import: Remove requirement on git 1.6.2
Gustav Hållberg [Wed, 28 Oct 2009 11:21:28 +0000 (12:21 +0100)]
fold/import: Remove requirement on git 1.6.2

Send "-p<N>" flag to "git apply" rather than "-p <N>".

This removes dependency on git 1.6.2, commit:
  f26c494 parse-opt: migrate builtin-apply.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agopush/pop: Allow "-n0" to do nothing
Gustav Hållberg [Wed, 28 Oct 2009 11:21:20 +0000 (12:21 +0100)]
push/pop: Allow "-n0" to do nothing

Also document what "-n<negative>" does.
Added some push tests to t1203-pop.sh and renamed it t1208-push-and-pop.sh.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agostgit.el: Improve help text on stgit-goto
Gustav Hållberg [Wed, 28 Oct 2009 11:21:07 +0000 (12:21 +0100)]
stgit.el: Improve help text on stgit-goto

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoSlightly modify the "publish" command description v0.15
Catalin Marinas [Sat, 24 Oct 2009 21:45:35 +0000 (22:45 +0100)]
Slightly modify the "publish" command description

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoPick --revert option (formerly --reverse)
Catalin Marinas [Tue, 20 Oct 2009 10:00:43 +0000 (11:00 +0100)]
Pick --revert option (formerly --reverse)

This patch renames --reverse to --revert and sets the picked patch
message similar to the "git revert" command.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoThe '--file' option for 'new' should show 'FILE' rather than 'MESSAGE'
Catalin Marinas [Mon, 19 Oct 2009 16:14:50 +0000 (17:14 +0100)]
The '--file' option for 'new' should show 'FILE' rather than 'MESSAGE'

The patch sets a metavar for this option's definition.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoUpdate the RELEASENOTES file with latest changes v0.15-rc4
Catalin Marinas [Sun, 18 Oct 2009 22:29:09 +0000 (23:29 +0100)]
Update the RELEASENOTES file with latest changes

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoDo not use stdout instead of stderr
Catalin Marinas [Sun, 18 Oct 2009 22:04:50 +0000 (23:04 +0100)]
Do not use stdout instead of stderr

The MessagePrinter constructor redirects stderr to stdout if the output
is not a file. This makes it difficult for tools needing to filter the
error output (like Documentation/Makefile building the COMMANDS
variable).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoIgnore the git-config exit code
Catalin Marinas [Sat, 17 Oct 2009 21:52:33 +0000 (22:52 +0100)]
Ignore the git-config exit code

The stgit.config code dumps a stack trace if git-config returns an error
(when, for example, there is no ~/.gitconfig file).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoDo not delete the builtin_version.py file after setup
Catalin Marinas [Sat, 17 Oct 2009 21:34:10 +0000 (22:34 +0100)]
Do not delete the builtin_version.py file after setup

If setup is run in a directory without .git, setup.py deletes the
stgit/builtin_version.py file and subsequent commands no longer have a
version. See bug #14480.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoNever skip rebase
Jakob Stoklund Olesen [Sat, 2 May 2009 07:42:31 +0000 (09:42 +0200)]
Never skip rebase

This is important if we have a custom rebase command (like "git svn
rebase").

Signed-off-by: Jakob Stoklund Olesen <stoklund@2pi.dk>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoFast-forward the published head when possible
Catalin Marinas [Wed, 30 Sep 2009 20:52:35 +0000 (21:52 +0100)]
Fast-forward the published head when possible

This is to avoid a merge commit when fast-forwarding is possible.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoDelete the hidden patches as well when deleting a branch
Catalin Marinas [Wed, 30 Sep 2009 20:51:19 +0000 (21:51 +0100)]
Delete the hidden patches as well when deleting a branch

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoAllow 'stg diff ..<commit>'
Catalin Marinas [Wed, 30 Sep 2009 20:50:14 +0000 (21:50 +0100)]
Allow 'stg diff ..<commit>'

If the first part of the range is missing, stgit was not assuming HEAD.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoAllow importing of 'application/octet-stream' attachments
Catalin Marinas [Wed, 30 Sep 2009 20:47:31 +0000 (21:47 +0100)]
Allow importing of 'application/octet-stream' attachments

Some mail clients use this MIME type rather than text/plain.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoAutosign imported patches
Catalin Marinas [Wed, 16 Sep 2009 13:20:21 +0000 (14:20 +0100)]
Autosign imported patches

If stgit.autosign configuration is set, allow the automatic signing of
the imported patches, similar to the 'new' command.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoAdd the -p option to fold
Catalin Marinas [Wed, 16 Sep 2009 13:13:13 +0000 (14:13 +0100)]
Add the -p option to fold

This option was added to import, so it makes sense for fold to have it
as well.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoDo not create an empty patch if import failed without --reject
Catalin Marinas [Wed, 16 Sep 2009 13:04:26 +0000 (14:04 +0100)]
Do not create an empty patch if import failed without --reject

If the import failed, do not leave an empty patch on the stack. If this
is required, the --reject option should be passed. The patch also fixes
a lowercase typo in the --reject option description.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoAdd the --reject option to fold
Catalin Marinas [Wed, 16 Sep 2009 13:00:34 +0000 (14:00 +0100)]
Add the --reject option to fold

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoRemove the 'fail_dump' argument to git.apply_patch()
Catalin Marinas [Wed, 16 Sep 2009 12:59:47 +0000 (13:59 +0100)]
Remove the 'fail_dump' argument to git.apply_patch()

Since we have a 'reject' argument, there is no need for the failed diff
to be dumped.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoGenerate binary diffs by default v0.15-rc3
Catalin Marinas [Sun, 13 Sep 2009 15:17:53 +0000 (16:17 +0100)]
Generate binary diffs by default

This patch modifies the Repository.diff_tree() function to generate
binary diffs by default. This way commands like 'export' would generate
patches containing the full information.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoPreserve the given author date during import
Catalin Marinas [Fri, 11 Sep 2009 23:04:07 +0000 (00:04 +0100)]
Preserve the given author date during import

The import has two stages - one for creating the initial empty commit
with the patch description followed by a refresh once the diff was
successfully applied. The second refresh resets the author date to the
current one. This patch passes the given author date to the
refresh_patch function.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoAdd import -p option
Catalin Marinas [Tue, 8 Sep 2009 21:07:35 +0000 (22:07 +0100)]
Add import -p option

This patch renames some of the existing import options and adds the -p
(--strip) option which allows stripping the leading slashes of the diff
paths.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoMerge commit 'kha/safe'
Catalin Marinas [Tue, 8 Sep 2009 20:41:19 +0000 (21:41 +0100)]
Merge commit 'kha/safe'

14 years agoEscape patch name when creating regexp
David Kågedal [Thu, 3 Sep 2009 16:24:21 +0000 (18:24 +0200)]
Escape patch name when creating regexp

Signed-off-by: David Kågedal <david@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoImport git show output easily
Catalin Marinas [Wed, 2 Sep 2009 17:01:26 +0000 (18:01 +0100)]
Import git show output easily

This patch modifies the import command to check for standard 'git show'
output and parse it accordingly.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoMerge commit 'kha/safe'
Catalin Marinas [Wed, 2 Sep 2009 08:48:38 +0000 (09:48 +0100)]
Merge commit 'kha/safe'

14 years agoAdd stg-build, stg-dbg and RELEASENOTES to the MANIFEST.in file
Catalin Marinas [Wed, 2 Sep 2009 08:47:40 +0000 (09:47 +0100)]
Add stg-build, stg-dbg and RELEASENOTES to the MANIFEST.in file

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agosquash: Make commit message editing more convenient
Karl Wiberg [Mon, 24 Aug 2009 08:28:33 +0000 (10:28 +0200)]
squash: Make commit message editing more convenient

Very often, the commit message you want when squashing is the message
of the first patch. So instead of simply concatenating the messages of
all the patches, put a comment delimiter after the first one, and
ignore everything after the delimiter when reading the message back
in. If the user wants to use any part of the commented-out messages,
she can move text around however she wants, including deleting the
comment delimiter.

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoWhen reading a config value, pick the last value, not the first
Karl Wiberg [Mon, 24 Aug 2009 08:28:33 +0000 (10:28 +0200)]
When reading a config value, pick the last value, not the first

When reading the config values, we save all values for a given key in
a list, in the order we see them. Then, when asked for one value, we
used to return the _first_ value in the list. But the correct thing to
do in order to allow local configs (like the repository's .git/config)
to override global configs (like ~/.gitconfig) is to return the _last_
value.

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoAdd the next/prev commands to the RELEASENOTES file v0.15-rc2
Catalin Marinas [Fri, 21 Aug 2009 21:48:53 +0000 (22:48 +0100)]
Add the next/prev commands to the RELEASENOTES file

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoTutorial: Use the new StGit repo URL in clone example
Karl Wiberg [Wed, 19 Aug 2009 20:04:58 +0000 (22:04 +0200)]
Tutorial: Use the new StGit repo URL in clone example

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoDocumentation: Rename remaining link macros
Karl Wiberg [Wed, 19 Aug 2009 20:02:50 +0000 (22:02 +0200)]
Documentation: Rename remaining link macros

The link macro rename in 760a7cfc ("Documentation: Rename link
macros") missed the htmllink and manlink macros, resulting in broken
links in the docs if built with AsciiDoc 8.2.3 or later. This patch
renames manlink to linkman, and replaces htmllink with just link
(which is built-in).

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agostgit.el: Improve stgit-mode help text slightly
Gustav Hållberg [Wed, 19 Aug 2009 08:12:06 +0000 (10:12 +0200)]
stgit.el: Improve stgit-mode help text slightly

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Allow "P" to operate on all marked files
Gustav Hållberg [Tue, 18 Aug 2009 12:04:26 +0000 (14:04 +0200)]
stgit.el: Allow "P" to operate on all marked files

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Make sure "M" retains the order of the patches
Gustav Hållberg [Tue, 18 Aug 2009 08:13:47 +0000 (10:13 +0200)]
stgit.el: Make sure "M" retains the order of the patches

Fixes bugs in 7cc45294.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Consistently use "marked" about marked patches
Gustav Hållberg [Tue, 18 Aug 2009 12:05:32 +0000 (14:05 +0200)]
stgit.el: Consistently use "marked" about marked patches

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add flags to stgit-patches-marked-or-at-point
Gustav Hållberg [Tue, 18 Aug 2009 12:23:35 +0000 (14:23 +0200)]
stgit.el: Add flags to stgit-patches-marked-or-at-point

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agoRelease notes: Reformat for better legibility, and update
Karl Wiberg [Mon, 17 Aug 2009 23:34:36 +0000 (01:34 +0200)]
Release notes: Reformat for better legibility, and update

Note to maintainer: Make sure to verify the URLs and replace the text
in square backets before sending out!

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoRelease notes: Turn the 0.15-rc1 release notes into 0.15 release notes
Karl Wiberg [Mon, 17 Aug 2009 22:38:11 +0000 (00:38 +0200)]
Release notes: Turn the 0.15-rc1 release notes into 0.15 release notes

Don't talk about the -rc1 release, because that's already happened. We
want this to be the 0.15 sharp release notes.

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoAdd release notes file
Catalin Marinas [Mon, 17 Aug 2009 22:29:22 +0000 (00:29 +0200)]
Add release notes file

The idea is that the release announcement for the upcoming version of
StGit is prepared here. That way, the work of putting it together and
polishing it can be shared.

The text added by this patch was taken verbatim from the v0.15-rc1
announcement that Catalin posted to the git mailing list on July 12,
2009. The patch adding it to StGit (including this commit message) is
by Karl Wiberg <kha@treskal.com>.

14 years agoMerge branch 'proposed' of git://github.com/gustavh/stgit
Karl Wiberg [Mon, 17 Aug 2009 08:50:42 +0000 (10:50 +0200)]
Merge branch 'proposed' of git://github.com/gustavh/stgit

* 'proposed' of git://github.com/gustavh/stgit: (71 commits)
  stgit.el: Add menu bar menu
  stgit.el: Add stgit-toggle-mark
  stgit.el: Verify we're in stgit-mode before running commands
  stgit.el: Allow toggle-index on index and work tree
  stgit.el: Allow revert on index and work tree
  stgit.el: Add +/- to expand/collapse selected patches
  stgit.el: Fix some incorrect indentation
  stgit.el: Add stgit-new-and-refresh command
  stgit.el: Bugfix "P" when point is not on a patch line
  stgit.el: Fix problem where standard-output isn't bound correctly
  stgit.el: Bugfix of stgit-move-patches to top of stack
  stgit.el: Improve use of def{group,custom,face}
  stgit.el: Add C-c C-b for stgit-rebase
  stgit.el: Add better help text for stgit-mode
  stgit.el: Bugfix mode change display
  stgit.el: Minor documentation corrections
  stgit.el: Allow moving ignored files to index
  stgit.el: Move point in sane way after stgit-file-toggle-index on renames
  stgit.el: Move point correctly after stgit-revert-file
  stgit.el: Abbreviate renames/copies with common prefix/suffix
  ...

14 years agostgit.el: Add menu bar menu
Gustav Hållberg [Fri, 14 Aug 2009 08:54:05 +0000 (10:54 +0200)]
stgit.el: Add menu bar menu

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add stgit-toggle-mark
Gustav Hållberg [Fri, 14 Aug 2009 08:54:05 +0000 (10:54 +0200)]
stgit.el: Add stgit-toggle-mark

Preparation for upcoming menu bar patch

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Verify we're in stgit-mode before running commands
Gustav Hållberg [Fri, 14 Aug 2009 08:54:04 +0000 (10:54 +0200)]
stgit.el: Verify we're in stgit-mode before running commands

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Allow toggle-index on index and work tree
Gustav Hållberg [Fri, 14 Aug 2009 08:54:04 +0000 (10:54 +0200)]
stgit.el: Allow toggle-index on index and work tree

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Allow revert on index and work tree
Gustav Hållberg [Fri, 14 Aug 2009 08:54:03 +0000 (10:54 +0200)]
stgit.el: Allow revert on index and work tree

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add +/- to expand/collapse selected patches
Gustav Hållberg [Fri, 14 Aug 2009 08:54:03 +0000 (10:54 +0200)]
stgit.el: Add +/- to expand/collapse selected patches

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Fix some incorrect indentation
Gustav Hållberg [Sat, 15 Aug 2009 23:51:12 +0000 (01:51 +0200)]
stgit.el: Fix some incorrect indentation

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add stgit-new-and-refresh command
David Kågedal [Fri, 31 Jul 2009 06:33:00 +0000 (08:33 +0200)]
stgit.el: Add stgit-new-and-refresh command

This creates a new patch and fills it with the current changes,
i.e. it is the same as the "N" command followed by "r".

Signed-off-by: David Kågedal <david@virtutech.com>
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>