chiark / gitweb /
stgit
14 years agostgit.el: Document stgit-select properly
Gustav Hållberg [Fri, 31 Jul 2009 11:13:57 +0000 (13:13 +0200)]
stgit.el: Document stgit-select properly

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Garbage collect selected patches on reload
Gustav Hållberg [Fri, 31 Jul 2009 08:55:26 +0000 (10:55 +0200)]
stgit.el: Garbage collect selected patches on reload

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Default to expanding index and work tree
Gustav Hållberg [Thu, 30 Jul 2009 22:58:01 +0000 (00:58 +0200)]
stgit.el: Default to expanding index and work tree

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Make it configurable where to show index and work tree
Gustav Hållberg [Sat, 1 Aug 2009 20:46:24 +0000 (22:46 +0200)]
stgit.el: Make it configurable where to show index and work tree

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add customizable face for "Index" and "Work tree" titles
Gustav Hållberg [Thu, 30 Jul 2009 22:58:00 +0000 (00:58 +0200)]
stgit.el: Add customizable face for "Index" and "Work tree" titles

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Forbid stgit-{delete,edit,mark,rename} on index and work tree
Gustav Hållberg [Fri, 31 Jul 2009 08:54:14 +0000 (10:54 +0200)]
stgit.el: Forbid stgit-{delete,edit,mark,rename} on index and work tree

Signed-off-by: Gustav Hållberg <gustav+stgit@gmail.com>
14 years agostgit.el: Open the destination file on applied renames or copies
Gustav Hållberg [Thu, 30 Jul 2009 22:57:59 +0000 (00:57 +0200)]
stgit.el: Open the destination file on applied renames or copies

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Allow showing patch on Index and Work tree
Gustav Hållberg [Thu, 30 Jul 2009 22:57:58 +0000 (00:57 +0200)]
stgit.el: Allow showing patch on Index and Work tree

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Refactor: add stgit-find-copies-harder-diff-arg helper function
Gustav Hållberg [Thu, 30 Jul 2009 22:57:58 +0000 (00:57 +0200)]
stgit.el: Refactor: add stgit-find-copies-harder-diff-arg helper function

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Refresh from work tree when index is empty
Gustav Hållberg [Thu, 30 Jul 2009 22:57:57 +0000 (00:57 +0200)]
stgit.el: Refresh from work tree when index is empty

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add "R" for stgit-resolve-file
Gustav Hållberg [Thu, 30 Jul 2009 22:57:57 +0000 (00:57 +0200)]
stgit.el: Add "R" for stgit-resolve-file

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Change key binding for stgit-repair from "R" to "\C-u g"
Gustav Hållberg [Thu, 30 Jul 2009 22:57:57 +0000 (00:57 +0200)]
stgit.el: Change key binding for stgit-repair from "R" to "\C-u g"

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add "U" for stgit-revert-file
Gustav Hållberg [Thu, 30 Jul 2009 22:57:57 +0000 (00:57 +0200)]
stgit.el: Add "U" for stgit-revert-file

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Move stgit-{un,}commit to \C-c\C-{u,c}
Gustav Hållberg [Thu, 30 Jul 2009 22:57:56 +0000 (00:57 +0200)]
stgit.el: Move stgit-{un,}commit to \C-c\C-{u,c}

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add stgit-branch-name-face
Gustav Hållberg [Mon, 3 Aug 2009 12:43:58 +0000 (14:43 +0200)]
stgit.el: Add stgit-branch-name-face

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit new: Do not open editor if --save-template was specified
Gustav Hållberg [Fri, 31 Jul 2009 09:26:22 +0000 (11:26 +0200)]
stgit new: Do not open editor if --save-template was specified

Fixes side-effect of e58f264a "Add support for merge-friendly
branches".

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Make stgit-{index,worktree}-node buffer local
Gustav Hållberg [Sat, 1 Aug 2009 20:56:48 +0000 (22:56 +0200)]
stgit.el: Make stgit-{index,worktree}-node buffer local

Fixes bugs when multiple stgit buffers have been opened.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Bugfix moving symlinks to/from index
Gustav Hållberg [Sat, 1 Aug 2009 21:07:43 +0000 (23:07 +0200)]
stgit.el: Bugfix moving symlinks to/from index

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Run "git rm" with "-q" to reduce spam
Gustav Hållberg [Sat, 1 Aug 2009 21:21:13 +0000 (23:21 +0200)]
stgit.el: Run "git rm" with "-q" to reduce spam

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Refactor: remove unused argument to two functions
Gustav Hållberg [Sat, 1 Aug 2009 21:16:13 +0000 (23:16 +0200)]
stgit.el: Refactor: remove unused argument to two functions

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Remove unused variable stgit-work-ewoc
Gustav Hållberg [Mon, 3 Aug 2009 12:55:41 +0000 (14:55 +0200)]
stgit.el: Remove unused variable stgit-work-ewoc

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Correct documentation for stgit-insert-patch-files
Gustav Hållberg [Sat, 1 Aug 2009 19:31:04 +0000 (21:31 +0200)]
stgit.el: Correct documentation for stgit-insert-patch-files

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Only refresh the relevant parts when the index or worktree changes
David Kågedal [Wed, 29 Jul 2009 10:05:22 +0000 (12:05 +0200)]
stgit.el: Only refresh the relevant parts when the index or worktree changes

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Add stgit-toggle-worktree to toggle visibility of index and working tree
David Kågedal [Mon, 27 Jul 2009 22:09:46 +0000 (00:09 +0200)]
stgit.el: Add stgit-toggle-worktree to toggle visibility of index and working tree

Based on a similar set of patches by Gustav Hållberg.

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Add the stgit-file-toggle-index command
David Kågedal [Thu, 30 Jul 2009 14:54:50 +0000 (16:54 +0200)]
stgit.el: Add the stgit-file-toggle-index command

Based on a patch from Gustav Hållberg.

Signed-off-by: David Kågedal <david@virtutech.com>
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add work tree and index as pseudo-patches
David Kågedal [Wed, 29 Jul 2009 14:53:41 +0000 (16:53 +0200)]
stgit.el: Add work tree and index as pseudo-patches

Based on a similar patch by Gustav Hållberg.

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Use ewoc to keep track of the file list.
David Kågedal [Thu, 30 Jul 2009 15:12:08 +0000 (17:12 +0200)]
stgit.el: Use ewoc to keep track of the file list.

Signed-off-by: David Kågedal <david@virtutech.com>
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Refactor file list formatting
David Kågedal [Mon, 27 Jul 2009 15:49:10 +0000 (17:49 +0200)]
stgit.el: Refactor file list formatting

Define a struct to contain the information about a file and break out
the file list formatting to a separate function.

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Get rid of the stgit-patchsym property
David Kågedal [Mon, 27 Jul 2009 15:26:47 +0000 (17:26 +0200)]
stgit.el: Get rid of the stgit-patchsym property

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Invalidate ewoc node when marking or unmarking instead of modifying buffer...
David Kågedal [Fri, 22 May 2009 23:09:32 +0000 (01:09 +0200)]
stgit.el: Invalidate ewoc node when marking or unmarking instead of modifying buffer directly

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Use ewoc to keep track of the patch list.
David Kågedal [Thu, 30 Jul 2009 13:51:09 +0000 (15:51 +0200)]
stgit.el: Use ewoc to keep track of the patch list.

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Use a defstruct to store patch data
David Kågedal [Fri, 22 May 2009 23:09:31 +0000 (01:09 +0200)]
stgit.el: Use a defstruct to store patch data

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Use an 'entry-type text property
David Kågedal [Thu, 30 Jul 2009 15:02:38 +0000 (17:02 +0200)]
stgit.el: Use an 'entry-type text property

It indicates whether there is a patch or a file on a line.

Signed-off-by: David Kågedal <david@virtutech.com>
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Rename stgit-toggle-patch-file-list to stgit-select-patch
David Kågedal [Fri, 22 May 2009 23:09:30 +0000 (01:09 +0200)]
stgit.el: Rename stgit-toggle-patch-file-list to stgit-select-patch

Signed-off-by: David Kågedal <david@virtutech.com>
14 years agostgit.el: Remove the unused allow-file parameter to stgit-patch-at-point
David Kågedal [Mon, 27 Jul 2009 14:27:47 +0000 (16:27 +0200)]
stgit.el: Remove the unused allow-file parameter to stgit-patch-at-point

14 years agot2800: Adapt to changes in git's conflict markers
Karl Wiberg [Wed, 15 Jul 2009 09:25:53 +0000 (11:25 +0200)]
t2800: Adapt to changes in git's conflict markers

The conflict markers used by git were changed slightly by commit
606475f3 ("Remove filename from conflict markers"); specifically, the
conflict markers contain the filename only when the filename has
changed.

This patch adapts t2800 to allow either the new or the old format.

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoMerge commit 'kha/safe'
Catalin Marinas [Mon, 13 Jul 2009 16:58:02 +0000 (17:58 +0100)]
Merge commit 'kha/safe'

14 years agoKarl got married
Karl Wiberg [Mon, 13 Jul 2009 13:06:25 +0000 (15:06 +0200)]
Karl got married

Signed-off-by: Karl Wiberg <kha@treskal.com>
14 years agoDo not replace '-' with '.' in the version string v0.15-rc1
Catalin Marinas [Sun, 12 Jul 2009 21:49:31 +0000 (22:49 +0100)]
Do not replace '-' with '.' in the version string

This prevents version strings like 0.15-rc1.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agostgit.el: Use declare to hint the debugger and indentation
David Kågedal [Sun, 12 Jul 2009 17:05:33 +0000 (19:05 +0200)]
stgit.el: Use declare to hint the debugger and indentation

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
14 years agoAdd --stat option to show
Catalin Marinas [Sun, 12 Jul 2009 08:15:30 +0000 (09:15 +0100)]
Add --stat option to show

This option allows showing of diffstat instead of patch diffs. Proposal
and initial implementation by Alex Chiang.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Alex Chiang <achiang@hp.com>
14 years agofix stg mail %(shortlog)s order
Alex Chiang [Fri, 10 Jul 2009 09:32:06 +0000 (10:32 +0100)]
fix stg mail %(shortlog)s order

When using the %(shortlog)s variable, the patches are listed in
the cover letter in the reverse order of the actual patch series.

We should list them in the actual order of the patch series instead.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoAdd --reject option to import
Catalin Marinas [Fri, 10 Jul 2009 09:28:53 +0000 (10:28 +0100)]
Add --reject option to import

This allows a failed import to leave .rej files in the working
directory.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoRename out.start() to out.inf() in the publish command
Catalin Marinas [Wed, 24 Jun 2009 16:10:57 +0000 (17:10 +0100)]
Rename out.start() to out.inf() in the publish command

There was no corresponding out.done() call.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoOnly allow publishing to refs/heads/*
Catalin Marinas [Fri, 12 Jun 2009 11:47:06 +0000 (12:47 +0100)]
Only allow publishing to refs/heads/*

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoImprove the "publish" merge message to give slightly more information
Catalin Marinas [Thu, 11 Jun 2009 11:07:54 +0000 (12:07 +0100)]
Improve the "publish" merge message to give slightly more information

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoRemove the resolved command
Catalin Marinas [Sat, 30 May 2009 12:13:26 +0000 (13:13 +0100)]
Remove the resolved command

This command simply duplicates the "git add" or "git mergetool" commands
for handling conflicts.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Karl Hasselström <kha@treskal.com>
14 years agoUse the default git colouring scheme rather than specific scripts
Catalin Marinas [Sat, 30 May 2009 12:13:26 +0000 (13:13 +0100)]
Use the default git colouring scheme rather than specific scripts

This patch adds the mechanism to check if the output is tty for the
diff and show commands and passes the --color option to git if the
color.diff config option is set auto or true. The patch also changes the
default pager to 'less -FRSX' from the diffcol.sh script.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoAdd "stg id" support for "{public}" ref
Catalin Marinas [Sat, 30 May 2009 12:13:25 +0000 (13:13 +0100)]
Add "stg id" support for "{public}" ref

The {public} ref refers to the public version of the branch as described
in the "publish" command.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoAdd support for merge-friendly branches
Catalin Marinas [Sat, 30 May 2009 12:13:25 +0000 (13:13 +0100)]
Add support for merge-friendly branches

The main issue with publishing StGit branches is that the Git history
represented by patches is volatile, making it difficult for people
wanting to merge such branch. One solution is for all the downstream
developers to always rebase but that's not always desirable. Another
solution is provided by tools like TopGit but the visible Git history
becomes complicated, especially with repeated reordering.

The patch proposes a new StGit command called "publish". This command
allows one to develop patches normally on a StGit branch but publish the
stack changes to a separate, merge-friendly branch whose history is not
re-writable.

More about its behaviour can be found in the command description in this
patch.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
14 years agoPass "git config" flags in the right order
Karl Hasselström [Fri, 29 May 2009 21:33:50 +0000 (22:33 +0100)]
Pass "git config" flags in the right order

New enough gits accept the --null and --list flags in any order, but
older gits want --null before --list. So do it the way that's fine
with everyone.

I think (but haven't verified) that git started to accept the flags in
any order after commit d64ec16c2af4ddcf3985d11d5dc28a15db181de5 ("git
config: reorganize to use parseopt") by Felipe Contreras on
2009-02-21, first released in git v1.6.3.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd a --set-tree flag to stg push
David Kågedal [Fri, 22 May 2009 20:38:12 +0000 (22:38 +0200)]
Add a --set-tree flag to stg push

This flag makes the push simply restore the tree that the patch used
before, rather than doing any kind of merge.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoLoad the whole config at once and cache it for future use
Samuel Tardieu [Fri, 22 May 2009 20:38:11 +0000 (22:38 +0200)]
Load the whole config at once and cache it for future use

Instead of loading the config values one at at time when we need then,
read and parse the configuration files all at once using

  git config --list --null

and cache the result. This should be a performance win.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Karl Hasselström <kha@treskal.com>
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