stgit
15 years agoTransaction.push_patch(): Set self.head only when we have a merge conflict
Karl Hasselström [Fri, 22 May 2009 20:35:25 +0000 (22:35 +0200)]
Transaction.push_patch(): Set self.head only when we have a merge conflict

Setting self.head when we don't have a merge conflict is a harmless
no-op---as long as we set it to the commit that was going to be the
stack top anyway---so this patch should not change the behavior. But
it's not really nice to do it unconditionally, especially considering
that we want people to be able to understand what the code does ...

Also add a comment that explains why we set it, since the logic is
rather more hairy than I'd like.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd the log --clear option
Catalin Marinas [Fri, 22 May 2009 08:53:39 +0000 (09:53 +0100)]
Add the log --clear option

This option allows the clearing of the log history which sometimes may
get too large.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoReinstate the --annotate option for refresh
Catalin Marinas [Fri, 22 May 2009 08:53:38 +0000 (09:53 +0100)]
Reinstate the --annotate option for refresh

It is sometimes useful to add some notes to the log entry when a patch
was refreshed. This option was dropped when the command was updated to
the new infrastructure as there was no logging support at that time.

The note will be visible with 'stg log {-g,-f}'

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoConvert 'unhide' to the lib infrastructure
Catalin Marinas [Fri, 22 May 2009 08:53:38 +0000 (09:53 +0100)]
Convert 'unhide' to the lib infrastructure

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoConvert 'hide' to the lib infrastructure
Catalin Marinas [Fri, 22 May 2009 08:53:38 +0000 (09:53 +0100)]
Convert 'hide' to the lib infrastructure

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoConvert 'clone' to the use stgit.lib
Catalin Marinas [Fri, 22 May 2009 08:53:37 +0000 (09:53 +0100)]
Convert 'clone' to the use stgit.lib

The patch also adds the stgit.lib.git.clone() function.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoDo not sleep after the last patch sent by e-mail
Catalin Marinas [Fri, 22 May 2009 08:53:37 +0000 (09:53 +0100)]
Do not sleep after the last patch sent by e-mail

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoShow some progress information when checking for upstream merges.
Catalin Marinas [Fri, 22 May 2009 08:53:36 +0000 (09:53 +0100)]
Show some progress information when checking for upstream merges.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoShow "Pushing <patch>...done" when pushing a patch
Catalin Marinas [Fri, 22 May 2009 08:53:36 +0000 (09:53 +0100)]
Show "Pushing <patch>...done" when pushing a patch

My main reason is for the automatic invocation of the interactive merge
when I don't know what patch I have to deal with. The other reasons is
for people working over slow filesystems (NFS) where a three-way merging
may take a significant amount of time.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agostgit.el: Bind line movement keys in a sane way
Gustav Hållberg [Fri, 17 Apr 2009 01:15:19 +0000 (03:15 +0200)]
stgit.el: Bind line movement keys in a sane way

Use p/n for stgit-{previous,next}-patch and C-p/n and up/down for
stgit-{previous,next}-line, which makes stgit-mode behave more like
dired-mode and git-mode.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoNewer gits return 128 when git config --{rename,remove}-section fails
Karl Hasselström [Fri, 17 Apr 2009 01:02:11 +0000 (03:02 +0200)]
Newer gits return 128 when git config --{rename,remove}-section fails

As of commit d64ec16c ("git config: reorganize to use parseopt"), git
config --rename-section and --remove-section will now call die()
instead of exit(1) when the section to be renamed or removed doesn't
exist, and die() calls exit(128). So we have to catch exit code 128 as
well.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoConvert "push" to the lib infrastructure
Catalin Marinas [Thu, 9 Apr 2009 20:41:00 +0000 (23:41 +0300)]
Convert "push" to the lib infrastructure

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoConvert "pop" to the lib infrastructure
Catalin Marinas [Thu, 9 Apr 2009 20:40:59 +0000 (23:40 +0300)]
Convert "pop" to the lib infrastructure

The test files have to be adapted because of a slightly different way of
recording a "push" operation with the new infrastructure. The original
code was recording two transactions for a "push <patch>" - one for
reordering the unapplied patches and another for pushing the patch. One
would need two "undo" operations to restore the state prior to a "push".
The new infrastructure only records one transaction for "push" and only
one "undo" is necessary.

Since a "pop <middle patch>" operation involves popping the patches and
pushing one, with the above changes in the "push" implementation it
means that the patch order the test scripts expect is slightly
different.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd the --merged option to goto
Catalin Marinas [Thu, 9 Apr 2009 20:40:59 +0000 (23:40 +0300)]
Add the --merged option to goto

This patch adds support for checking which patches were already merged
upstream. This checking is done by trying to reverse-apply the patches
in the index before pushing them onto the stack.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoUse a default "hidden" argument in StackTransaction.reorder_patches
Catalin Marinas [Thu, 9 Apr 2009 20:40:59 +0000 (23:40 +0300)]
Use a default "hidden" argument in StackTransaction.reorder_patches

This argument is rarely used so adding a default value simplifies the
calling code.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoConvert "float" to the lib infrastructure
Catalin Marinas [Thu, 9 Apr 2009 20:40:59 +0000 (23:40 +0300)]
Convert "float" to the lib infrastructure

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoConvert "sink" to the new infrastructure
Catalin Marinas [Thu, 9 Apr 2009 20:40:59 +0000 (23:40 +0300)]
Convert "sink" to the new infrastructure

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd automatic git-mergetool invocation to the new infrastructure
Catalin Marinas [Thu, 9 Apr 2009 20:40:59 +0000 (23:40 +0300)]
Add automatic git-mergetool invocation to the new infrastructure

This patch adds the IndexAndWorktree.mergetool() function responsible
for calling 'git mergetool' to interactively solve conflicts. The
function may also be called from IndexAndWorktree.merge() if the
standard 'git merge-recursive' fails and 'interactive == True'. The
'allow_interactive' parameter is passed to Transaction.push_patch() from
the functions allowing interactive merging.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd mergetool support to the classic StGit infrastructure
Catalin Marinas [Thu, 9 Apr 2009 20:40:58 +0000 (23:40 +0300)]
Add mergetool support to the classic StGit infrastructure

Since Git already has a tool for interactively solving conflicts which
is highly customisable, there is no need to duplicate this feature via
the i3merge and i2merge configuration options. The user-visible change
is that now mergetool is invoked rather than the previously customised
interactive merging tool.

The stgit.keeporig option is no longer available to be more consistent
with the Git behaviour.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoCheck for local changes with "goto"
Catalin Marinas [Thu, 9 Apr 2009 20:40:58 +0000 (23:40 +0300)]
Check for local changes with "goto"

This is done by default, unless the --keep option is passed, for
consistency with the "pop" command. The index is checked in the
Transaction.run() function so that other commands could benefit from
this feature (off by default).

This behaviour can be overridden by setting the stgit.autokeep option.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Handle errors in first phase of stgit squash
Gustav Hållberg [Fri, 13 Mar 2009 04:21:52 +0000 (05:21 +0100)]
stgit.el: Handle errors in first phase of stgit squash

Make sure to reload stgit buffer after first phase, and signal an
error if stg squash --save-template fails.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Sort patches correctly before merging them in stgit-squash
Gustav Hållberg [Fri, 13 Mar 2009 04:15:37 +0000 (05:15 +0100)]
stgit.el: Sort patches correctly before merging them in stgit-squash

Also document stgit-squash more accurately.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Break out stgit-sort-patches to a separate function for future reuse
Gustav Hållberg [Fri, 13 Mar 2009 04:09:16 +0000 (05:09 +0100)]
stgit.el: Break out stgit-sort-patches to a separate function for future reuse

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Run 'git show' with -M to detect renames when showing entire patch
Gustav Hållberg [Fri, 13 Mar 2009 04:02:59 +0000 (05:02 +0100)]
stgit.el: Run 'git show' with -M to detect renames when showing entire patch

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add "M" for stgit-move-patches
Gustav Hållberg [Fri, 13 Mar 2009 03:56:43 +0000 (04:56 +0100)]
stgit.el: Add "M" for stgit-move-patches

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Clarify documentation of stgit-capture-output
Gustav Hållberg [Fri, 13 Mar 2009 03:50:27 +0000 (04:50 +0100)]
stgit.el: Clarify documentation of stgit-capture-output

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Manually draw/erase the mark in stgit-{add,remove}-mark
Gustav Hållberg [Fri, 13 Mar 2009 03:44:13 +0000 (04:44 +0100)]
stgit.el: Manually draw/erase the mark in stgit-{add,remove}-mark

This significantly reduces the time stgit-mark and similar takes.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoDocumentation: Rename link macros
Karl Hasselström [Fri, 13 Mar 2009 03:14:42 +0000 (04:14 +0100)]
Documentation: Rename link macros

They can no longer end with "link", as explained in commit 5162e697 by
Dan McGee <dpmcgee@gmail.com> in the git repository:

    Documentation: rename gitlink macro to linkgit

    Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock
    Asciidoc configuration:

    @@ -149,7 +153,10 @@
     # Inline macros.
     # Backslash prefix required for escape processing.
     # (?s) re flag for line spanning.
    -(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
    +
    +# Explicit so they can be nested.
    +(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
    +
     # Anchor: [[[id]]]. Bibliographic anchor.
     (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
     # Anchor: [[id,xreflabel]]

    This default regex now matches explicit values, and unfortunately in this
    case gitlink was being matched by just 'link', causing the wrong inline
    macro template to be applied. By renaming the macro, we can avoid being
    matched by the wrong regex.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoDocumentation: Ignore generated .xml files
Karl Hasselström [Fri, 13 Mar 2009 03:10:59 +0000 (04:10 +0100)]
Documentation: Ignore generated .xml files

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostg squash: Improve documentation
Karl Hasselström [Fri, 13 Mar 2009 02:57:20 +0000 (03:57 +0100)]
stg squash: Improve documentation

In particular, mention how the order of the given patches matter, and
exactly what happens in case of conflict.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRename "stg coalesce" to "stg squash"
Karl Hasselström [Thu, 26 Feb 2009 20:13:37 +0000 (21:13 +0100)]
Rename "stg coalesce" to "stg squash"

"squash" is the word git uses for this operation, so we should use it
too to lessen the confusion. Also, it's easier to spell.

We can do the rename without any effort at backwards compatibility
because "stg coalesce" has never been part of any released version.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add "B" for stgit-branch
Gustav Hållberg [Thu, 26 Feb 2009 19:59:07 +0000 (20:59 +0100)]
stgit.el: Add "B" for stgit-branch

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Expand or collapse only the patch at point, instead of rerunning stg-reload.
David Kågedal [Thu, 26 Feb 2009 19:59:07 +0000 (20:59 +0100)]
stgit.el: Expand or collapse only the patch at point, instead of rerunning stg-reload.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: make stgit-delete with prefix argument spill patch contents to index
Gustav Hållberg [Thu, 26 Feb 2009 19:59:07 +0000 (20:59 +0100)]
stgit.el: make stgit-delete with prefix argument spill patch contents to index

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd --file option to pick
Catalin Marinas [Wed, 28 Jan 2009 23:08:13 +0000 (23:08 +0000)]
Add --file option to pick

This allows folding of specific files only.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoMerge branch 'stable'
Catalin Marinas [Wed, 28 Jan 2009 23:07:37 +0000 (23:07 +0000)]
Merge branch 'stable'

Conflicts:
stgit/commands/files.py
stgit/commands/mail.py
stgit/git.py

15 years agoPass the diff flags when statistics are required
Catalin Marinas [Wed, 28 Jan 2009 23:01:24 +0000 (23:01 +0000)]
Pass the diff flags when statistics are required

The --diff-opts were not passed to git.diff() calls when the statistics
were required for the mail and files commands.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoMake bash completion fail to bashdefault before default completion.
Ted Pavlic [Tue, 20 Jan 2009 00:46:13 +0000 (19:46 -0500)]
Make bash completion fail to bashdefault before default completion.

If "-o bashdefault" isn't possible, use old "-o default" only.

(this patch inspired by similar mechanism in Mercurial bash completion
script)

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoModify bash completion to support help, version, and copyright.
Ted Pavlic [Tue, 20 Jan 2009 00:46:12 +0000 (19:46 -0500)]
Modify bash completion to support help, version, and copyright.

"stg <tab>" lists all commands, including "help", "version", and
"copyright".

"stg he<tab>" completes "stg help "
"stg ver<tab>" completes "stg version "
"stg copy<tab>" completes "stg copyright "

"stg help <tab>" lists all commands /other than/ help, version, and
copyright.

"stg version <tab>" goes directly to shell completion.
"stg copyright <tab>" goes directly to shell completion.

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add optional count argument to stgit-commit
Gustav Hållberg [Mon, 12 Jan 2009 20:20:14 +0000 (21:20 +0100)]
stgit.el: Add optional count argument to stgit-commit

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Minor beautification
Gustav Hållberg [Mon, 12 Jan 2009 20:20:14 +0000 (21:20 +0100)]
stgit.el: Minor beautification

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Indicate empty patches
Gustav Hållberg [Mon, 12 Jan 2009 20:20:13 +0000 (21:20 +0100)]
stgit.el: Indicate empty patches

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add message when there are no patches in the series
Gustav Hållberg [Mon, 12 Jan 2009 20:20:13 +0000 (21:20 +0100)]
stgit.el: Add message when there are no patches in the series

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Include stat summary in patch diff
Gustav Hållberg [Mon, 12 Jan 2009 20:20:13 +0000 (21:20 +0100)]
stgit.el: Include stat summary in patch diff

Run 'stg show' with '-O --patch-with-stat' flags.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Make single file diff buffer read-only
Gustav Hållberg [Mon, 12 Jan 2009 20:20:13 +0000 (21:20 +0100)]
stgit.el: Make single file diff buffer read-only

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Consistently use symbols rather than strings for patch names
Gustav Hållberg [Mon, 12 Jan 2009 20:20:13 +0000 (21:20 +0100)]
stgit.el: Consistently use symbols rather than strings for patch names

Also make the stgit-run... functions automatically convert their
arguments to strings.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoMerge branch 'stable'
Karl Hasselström [Thu, 22 Jan 2009 22:57:01 +0000 (23:57 +0100)]
Merge branch 'stable'

* stable:
  stgit.namelength is an integer
  Return None instead of crashing on undefined integer config items

15 years agoFix the patch argument parsing for the "show" command
Catalin Marinas [Wed, 14 Jan 2009 22:25:48 +0000 (22:25 +0000)]
Fix the patch argument parsing for the "show" command

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agostgit.namelength is an integer
Pete Wyckoff [Mon, 12 Jan 2009 20:04:24 +0000 (21:04 +0100)]
stgit.namelength is an integer

Interpret stgit namelength as an integer, else the use of
name_len will fail with

  File "/usr/lib/python2.5/site-packages/stgit/utils.py", line 206, in patch_name_from_msg
    return re.sub('[\W]+', '-', subject_line).strip('-')[:name_len]
TypeError: slice indices must be integers or None or have an __index__ method

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoReturn None instead of crashing on undefined integer config items
Karl Hasselström [Mon, 12 Jan 2009 20:04:10 +0000 (21:04 +0100)]
Return None instead of crashing on undefined integer config items

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoPatch to clarify the "unsolved conflicts" message in Stacked Git
Jason Green [Thu, 18 Dec 2008 14:29:11 +0000 (09:29 -0500)]
Patch to clarify the "unsolved conflicts" message in Stacked Git

I recently started using Stacked Git to manage my patchsets, and it's
been a great tool.  However, I was a bit confused for a while on how
to resolve conflicts when a merge fails.  Here's a patch to hopefully
clarify that message a little.

Signed-off-by: Jason Green <jason@transgaming.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoMerge branch 'proposed'
Catalin Marinas [Thu, 1 Jan 2009 21:51:22 +0000 (21:51 +0000)]
Merge branch 'proposed'

15 years agostgit.el: Canonicalize some error messages
Gustav Hållberg [Mon, 29 Dec 2008 14:32:58 +0000 (15:32 +0100)]
stgit.el: Canonicalize some error messages

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add some missing help texts
Gustav Hållberg [Mon, 29 Dec 2008 14:32:58 +0000 (15:32 +0100)]
stgit.el: Add some missing help texts

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Fix some too wide lines
Gustav Hållberg [Mon, 29 Dec 2008 14:32:58 +0000 (15:32 +0100)]
stgit.el: Fix some too wide lines

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Bugfix stgit-unmark-down on the last patch
Gustav Hållberg [Mon, 29 Dec 2008 14:32:58 +0000 (15:32 +0100)]
stgit.el: Bugfix stgit-unmark-down on the last patch

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Make prefix argument to stgit-new add a Signed-off-by: line
Gustav Hållberg [Mon, 29 Dec 2008 14:32:58 +0000 (15:32 +0100)]
stgit.el: Make prefix argument to stgit-new add a Signed-off-by: line

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoman pages: Bugfixed man pages for --sign and --ack flags; e.g., for stg-new
Gustav Hållberg [Mon, 29 Dec 2008 14:32:58 +0000 (15:32 +0100)]
man pages: Bugfixed man pages for --sign and --ack flags; e.g., for stg-new

An optparse argument type 'callback' with a 'dest' setting showed as
"--sign SIGN". Use optparse's Option.takes_value() instead.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoSubmittingPatches: adapt to StGit
Karl Hasselström [Sun, 21 Dec 2008 11:48:27 +0000 (12:48 +0100)]
SubmittingPatches: adapt to StGit

Remove a bunch of Git-specific stuff, and insert the corresponding
StGit stuff where appropriate.

I don't claim the resulting document is perfect, but it should be a
good starting point.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoSteal Documentation/SubmittingPatches from Git
Karl Hasselström [Sun, 21 Dec 2008 11:48:27 +0000 (12:48 +0100)]
Steal Documentation/SubmittingPatches from Git

'git shortlog -- Documentation/SubmittingPatches' shows that the
following people deserve credit for it:

  A Large Angry SCM (2):
        Add footnote about Thunderbird about trimming trailing WS.
        Update Thunderbird specific hints.

  Andrew Ruder (1):
        Add policy on user-interface changes

  Bill Lear (1):
        Document --check option to git diff.

  David Symonds (1):
        Change from using email.com to example.com as example domain, as per RFC 2606.

  Jari Aalto (1):
        Clarify SubmittingPatches Checklist

  Jim Meyering (1):
        SubmittingPatches: fix a typo

  Johannes Schindelin (5):
        Begin SubmittingPatches with a check list
        SubmittingPatches: mention older C compiler compatibility
        Update to SubmittingPatches
        Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"
        Rename .git/rebase to .git/rebase-apply

  Junio C Hamano (19):
        Add SubmittingPatches
        Update SubmittingPatches to add MUA specific notes.
        Update SubmittingPatches.
        Add Pine 4.63 help from Daniel.
        SubmittingPatches: note on whitespaces
        Documentation: note about contrib/.
        Documentation/SubmittingPatches: 3+1 != 6
        Documentation/SubmittingPatches: Gnus tips
        Merge branch 'maint'
        Merge branch 'maint-1.5.1' into maint
        Remove git-applypatch
        War on whitespace
        Update my contact address as the maintainer.
        Documentation/SubmittingPatches: Instruct how to use [PATCH] Subject header
        Documentation/SubmittingPatches: discuss first then submit
        Documentation/SubmittingPatches: What's Acked-by and Tested-by?
        Documentation/SubmittingPatches - a suggested patch flow
        Merge branch 'maint'
        Merge branch 'maint' to sync with GIT 1.6.0.6

  Lukas Sandström (2):
        SubmittingPatches: The download location of External Editor has moved
        Add a helper script to send patches with Mozilla Thunderbird

  Michele Ballabio (1):
        Documentation: add KMail in SubmittingPatches

  Miklos Vajna (1):
        SubmittingPatches: mention the usage of real name in Signed-off-by: lines

  Paolo Ciarrocchi (1):
        Teach SubmittingPatches about git-commit -s

  Pavel Roskin (1):
        Assorted typo fixes

  Sergei Organov (1):
        SubmittingPatches: improve the 'Patch:' section of the checklist

  Tom Preston-Werner (1):
        add instructions on how to send patches to the mailing list with Gmail

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostg files: Don't write just an empty line
Karl Hasselström [Sun, 21 Dec 2008 10:55:53 +0000 (11:55 +0100)]
stg files: Don't write just an empty line

If we don't produce any output, we shouldn't print a newline.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Also show mode and type changes of files in patches
Gustav Hållberg [Sun, 21 Dec 2008 10:55:52 +0000 (11:55 +0100)]
stgit.el: Also show mode and type changes of files in patches

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostg mail: Improve error message for unknown sender identity
Gustav Hållberg [Sun, 21 Dec 2008 10:55:52 +0000 (11:55 +0100)]
stg mail: Improve error message for unknown sender identity

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd '--help' to tab completion for all commands
Gustav Hållberg [Sun, 21 Dec 2008 10:55:52 +0000 (11:55 +0100)]
Add '--help' to tab completion for all commands

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Use 'git diff-stat' to show files in a patch
Gustav Hållberg [Sun, 21 Dec 2008 10:55:52 +0000 (11:55 +0100)]
stgit.el: Use 'git diff-stat' to show files in a patch

Print file modification status in human-readable format.

Add stgit-expand-find-copies-harder flag to select whether to use
the --find-copies-harder flag or not.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add an stgit customization group
Gustav Hållberg [Sun, 21 Dec 2008 10:55:51 +0000 (11:55 +0100)]
stgit.el: Add an stgit customization group

This makes it easier to customize faces and (future) variables.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add support for showing which files are affected by a patch
Gustav Hållberg [Sun, 21 Dec 2008 10:55:51 +0000 (11:55 +0100)]
stgit.el: Add support for showing which files are affected by a patch

One can "expand" a patch by pressing RET, which shows the files that
patch modifies. On a line with a modified file, one can:
  RET  find file
  o    find file in other window
  =    show diff in that file

\C-n and \C-p can be used to move between patches when they have been
expanded.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Automatically update git-status buffer when necessary
Gustav Hållberg [Sun, 21 Dec 2008 10:55:51 +0000 (11:55 +0100)]
stgit.el: Automatically update git-status buffer when necessary

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add flag to signal errors in stgit-patch-at-point
Gustav Hållberg [Sun, 21 Dec 2008 10:55:51 +0000 (11:55 +0100)]
stgit.el: Add flag to signal errors in stgit-patch-at-point

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Unify help text formatting
Gustav Hållberg [Sun, 21 Dec 2008 10:55:50 +0000 (11:55 +0100)]
stgit.el: Unify help text formatting

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Fix working directory bug in stgit-new
Gustav Hållberg [Wed, 10 Dec 2008 20:03:52 +0000 (21:03 +0100)]
stgit.el: Fix working directory bug in stgit-new

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Acked-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add stgit-git-status
Gustav Hållberg [Wed, 10 Dec 2008 20:03:50 +0000 (21:03 +0100)]
stgit.el: Add stgit-git-status

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Acked-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostg series: Explain the list format better
Karl Hasselström [Mon, 8 Dec 2008 20:24:48 +0000 (21:24 +0100)]
stg series: Explain the list format better

Also taking into account the recent format change.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoUse separate column for zero in output of stg series -e
David Kågedal [Mon, 8 Dec 2008 20:24:44 +0000 (21:24 +0100)]
Use separate column for zero in output of stg series -e

This will make the output more regular and easier to parse. It no longer
overwrites the +/-/! status flag with a zero for empty patches, and
instead puts the zero before it.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Fix some indentation
Gustav Hållberg [Mon, 8 Dec 2008 20:24:37 +0000 (21:24 +0100)]
stgit.el: Fix some indentation

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add stgit-unmark-down
Gustav Hållberg [Mon, 8 Dec 2008 20:24:37 +0000 (21:24 +0100)]
stgit.el: Add stgit-unmark-down

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add 'm' as alias for stgit-mark
Gustav Hållberg [Mon, 8 Dec 2008 20:24:37 +0000 (21:24 +0100)]
stgit.el: Add 'm' as alias for stgit-mark

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add 'q' for stgit-quit
Gustav Hållberg [Mon, 8 Dec 2008 20:24:37 +0000 (21:24 +0100)]
stgit.el: Add 'q' for stgit-quit

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Compact code for populating stgit-mode-map
Gustav Hållberg [Mon, 8 Dec 2008 20:24:37 +0000 (21:24 +0100)]
stgit.el: Compact code for populating stgit-mode-map

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Show running commands
David Kågedal [Sun, 7 Dec 2008 12:32:10 +0000 (13:32 +0100)]
stgit.el: Show running commands

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add the stgit-refresh command
David Kågedal [Sun, 7 Dec 2008 12:32:07 +0000 (13:32 +0100)]
stgit.el: Add the stgit-refresh command

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Move stgit-rename to C-c C-r
David Kågedal [Sun, 7 Dec 2008 12:32:04 +0000 (13:32 +0100)]
stgit.el: Move stgit-rename to C-c C-r

This allows us to reuse "r" for refresh.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Rename stgit-refresh to stgit-reload
David Kågedal [Sun, 7 Dec 2008 12:32:00 +0000 (13:32 +0100)]
stgit.el: Rename stgit-refresh to stgit-reload

This allows us to reuse the stgit-refresh for the more obvious
"stg refesh".

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Try to make the point stay on the coalesced patch
David Kågedal [Sun, 7 Dec 2008 12:31:57 +0000 (13:31 +0100)]
stgit.el: Try to make the point stay on the coalesced patch

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoPrint conflict details with the new infrastructure (bug #11181)
Catalin Marinas [Wed, 3 Dec 2008 21:49:23 +0000 (21:49 +0000)]
Print conflict details with the new infrastructure (bug #11181)

The patch modifies the IndexAndWorkTree.merge() function to display
pass the conflict information (files) when raising an exception. The
logic is similar to the one in the old infrastructure.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agofix export -s
Dan Williams [Wed, 3 Dec 2008 21:48:17 +0000 (21:48 +0000)]
fix export -s

Resolves:
stg export -s `stg top`
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/stgit/main.py", line 152, in _main
    ret = command.func(parser, options, args)
  File "/usr/local/lib/python2.5/site-packages/stgit/commands/export.py", line 169, in func
    f = sys.stdout
NameError: global name 'sys' is not defined

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agomail: add some commonly used tags to --auto
Dan Williams [Wed, 3 Dec 2008 21:48:17 +0000 (21:48 +0000)]
mail: add some commonly used tags to --auto

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoDo not append a new line to the backwards compat files (bug #12656)
Catalin Marinas [Tue, 2 Dec 2008 11:05:27 +0000 (11:05 +0000)]
Do not append a new line to the backwards compat files (bug #12656)

Since the multiline argument wasn't passed to the utils.write_string()
function when writing the compatibility description file from the new
infrastructure, any older command like push would have committed these
new lines.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd "tags" target to Makefile
Catalin Marinas [Tue, 2 Dec 2008 11:05:27 +0000 (11:05 +0000)]
Add "tags" target to Makefile

We could only generate TAGS before. Also added these targets to .PHONY.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agos/GIT/Git/ in the README
Catalin Marinas [Tue, 2 Dec 2008 09:41:09 +0000 (09:41 +0000)]
s/GIT/Git/ in the README

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoFix the HEAD updating during a conflicting push (bug #12609)
Catalin Marinas [Sun, 23 Nov 2008 21:16:19 +0000 (21:16 +0000)]
Fix the HEAD updating during a conflicting push (bug #12609)

Copying most of Karl's comment from the list:

 1. In push_patch(), we delay the final stack update (the update()
    function) since we want to record the state just before the
    conflict in the stack log.

 2. In run(), we update the branch head before running the delayed
    stack update (self.__conflicting_push()).

The patch works around this problem by explicitly specifying what the
branch head should be; this mechanism is used by undo etc. to be able
to set the branch head to something that isn't the stack top.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoDisplay (empty) when appropriate for the goto command
Catalin Marinas [Fri, 21 Nov 2008 22:33:20 +0000 (22:33 +0000)]
Display (empty) when appropriate for the goto command

This is a fix for bug #11810. The original implementation of goto used
to display (empty patch) when a patch became empty during a push + merge
operation. This patch adds this feature again.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
15 years agoMerge branch 'proposed'
Catalin Marinas [Sat, 8 Nov 2008 22:00:42 +0000 (22:00 +0000)]
Merge branch 'proposed'

15 years agoAdd 'pick' test script
Catalin Marinas [Sat, 8 Nov 2008 21:49:09 +0000 (21:49 +0000)]
Add 'pick' test script

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoGenerate a different patch name if it already exists
Catalin Marinas [Sat, 8 Nov 2008 21:18:09 +0000 (21:18 +0000)]
Generate a different patch name if it already exists

This is a fix for bug #12518. If the patch name already exists, the pick
command generates another by appending a numbered suffix.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoAllow pick --fold to work without applied patches
Catalin Marinas [Sat, 8 Nov 2008 21:18:08 +0000 (21:18 +0000)]
Allow pick --fold to work without applied patches

This patch fixes bug #12517. While there may be other variants for
achieving the same, it makes sense not to restrict the --fold option.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoRefresh of remove-e-mail-address-duplicat
Catalin Marinas [Sat, 8 Nov 2008 21:34:52 +0000 (21:34 +0000)]
Refresh of remove-e-mail-address-duplicat

15 years agoRemove e-mail address duplicates
Catalin Marinas [Sat, 8 Nov 2008 21:18:08 +0000 (21:18 +0000)]
Remove e-mail address duplicates

This is a fix for bug #10902. The 'mail' command now filters the
duplicate e-mail addresses before generating the message to be sent.
This was a problem especially with the --auto option.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoRemove the --committer options
Catalin Marinas [Sat, 8 Nov 2008 21:18:08 +0000 (21:18 +0000)]
Remove the --committer options

As per bug #11977, these options should not be used directly. People
wanting a different committer should set the corresponding Git
environment variables.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agostgit.el: Add undo command
David Kågedal [Thu, 6 Nov 2008 07:34:37 +0000 (08:34 +0100)]
stgit.el: Add undo command

Bound it to the two standard bindings C-/ and C-_.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>