chiark / gitweb /
stgit
14 years agostgit.el: Fix problem where standard-output isn't bound correctly
Gustav Hållberg [Wed, 12 Aug 2009 09:27:11 +0000 (11:27 +0200)]
stgit.el: Fix problem where standard-output isn't bound correctly

This fixes errors on M-x eval-buffer in stgit.el.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Bugfix of stgit-move-patches to top of stack
Gustav Hållberg [Wed, 12 Aug 2009 12:00:00 +0000 (14:00 +0200)]
stgit.el: Bugfix of stgit-move-patches to top of stack

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Improve use of def{group,custom,face}
Gustav Hållberg [Sat, 8 Aug 2009 22:24:45 +0000 (00:24 +0200)]
stgit.el: Improve use of def{group,custom,face}

 * Reorder calls to defcustom and defface to be more user-friendly
 * Use the :link tag where applicable
 * Add a :set handler to reload all stgit buffers when custom values
   are set

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add C-c C-b for stgit-rebase
Gustav Hållberg [Sat, 8 Aug 2009 18:59:49 +0000 (20:59 +0200)]
stgit.el: Add C-c C-b for stgit-rebase

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add better help text for stgit-mode
Gustav Hållberg [Sat, 8 Aug 2009 19:49:26 +0000 (21:49 +0200)]
stgit.el: Add better help text for stgit-mode

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Bugfix mode change display
Gustav Hållberg [Fri, 7 Aug 2009 09:46:19 +0000 (11:46 +0200)]
stgit.el: Bugfix mode change display

Fixes 0de6881a "stgit.el: Refactor file list formatting".

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Minor documentation corrections
Gustav Hållberg [Wed, 5 Aug 2009 21:02:03 +0000 (23:02 +0200)]
stgit.el: Minor documentation corrections

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Allow moving ignored files to index
Gustav Hållberg [Wed, 5 Aug 2009 20:53:18 +0000 (22:53 +0200)]
stgit.el: Allow moving ignored files to index

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Move point in sane way after stgit-file-toggle-index on renames
Gustav Hållberg [Wed, 5 Aug 2009 21:07:46 +0000 (23:07 +0200)]
stgit.el: Move point in sane way after stgit-file-toggle-index on renames

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Move point correctly after stgit-revert-file
Gustav Hållberg [Wed, 5 Aug 2009 13:18:43 +0000 (15:18 +0200)]
stgit.el: Move point correctly after stgit-revert-file

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Abbreviate renames/copies with common prefix/suffix
Gustav Hållberg [Wed, 5 Aug 2009 12:46:24 +0000 (14:46 +0200)]
stgit.el: Abbreviate renames/copies with common prefix/suffix

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Bugfix listing copied/renamed files
Gustav Hållberg [Wed, 5 Aug 2009 13:21:27 +0000 (15:21 +0200)]
stgit.el: Bugfix listing copied/renamed files

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Default to showing index and work tree
Gustav Hållberg [Tue, 4 Aug 2009 16:15:39 +0000 (18:15 +0200)]
stgit.el: Default to showing index and work tree

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Verify that we're running on Emacs 22 or later
Gustav Hållberg [Tue, 4 Aug 2009 15:39:13 +0000 (17:39 +0200)]
stgit.el: Verify that we're running on Emacs 22 or later

ewoc-create needs to have the NOSEP argument.
line-number-at-pos doesn't exist in older versions.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add stgit-redo as C-c C-_ and C-c C-/
Gustav Hållberg [Tue, 4 Aug 2009 13:57:05 +0000 (15:57 +0200)]
stgit.el: Add stgit-redo as C-c C-_ and C-c C-/

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Set patch names to be word syntax throughout
Gustav Hållberg [Tue, 4 Aug 2009 12:39:47 +0000 (14:39 +0200)]
stgit.el: Set patch names to be word syntax throughout

This allows easy selection of the patch name; e.g., by double-clicking.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Ignore space in diff with prefix argument
Gustav Hållberg [Mon, 3 Aug 2009 15:30:13 +0000 (17:30 +0200)]
stgit.el: Ignore space in diff with prefix argument

With one C-u, ignore spaces; with two, ignore all spaces.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add "d" for a few diff commands, similar to git.el
Gustav Hållberg [Mon, 3 Aug 2009 13:35:42 +0000 (15:35 +0200)]
stgit.el: Add "d" for a few diff commands, similar to git.el

"b" shows diff against base
"c" shows combined diff
"o" shows diff against our version
"t" shows diff against their version

"m" runs smerge-ediff

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Handle unmerged files better
Gustav Hållberg [Sat, 1 Aug 2009 20:04:35 +0000 (22:04 +0200)]
stgit.el: Handle unmerged files better

Show unmerged patches with --ours, which works with diff-mode.

Do not show duplicate entries in the work tree for unmerged files.

Open unmerged files with smerge-mode minor mode.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Rename stgit-expand-find-copies-harder to stgit-find-copies-harder
Gustav Hållberg [Sat, 1 Aug 2009 17:59:31 +0000 (19:59 +0200)]
stgit.el: Rename stgit-expand-find-copies-harder to stgit-find-copies-harder

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Handle negative argument to stgit-{un,}commit
Gustav Hållberg [Sat, 1 Aug 2009 17:32:12 +0000 (19:32 +0200)]
stgit.el: Handle negative argument to stgit-{un,}commit

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Move point properly after stgit-{file-toggle-index,reload}
Gustav Hållberg [Sat, 1 Aug 2009 14:04:34 +0000 (16:04 +0200)]
stgit.el: Move point properly after stgit-{file-toggle-index,reload}

After stgit-file-toggle-index, move mark to the old file, leaving
point where it is.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Add "t i/u" for showing files ignored by or unknown to git
Gustav Hållberg [Sat, 1 Aug 2009 13:14:36 +0000 (15:14 +0200)]
stgit.el: Add "t i/u" for showing files ignored by or unknown to git

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Refactor: simplify stgit-patch-pp a bit
Gustav Hållberg [Fri, 31 Jul 2009 15:15:39 +0000 (17:15 +0200)]
stgit.el: Refactor: simplify stgit-patch-pp a bit

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Fix face "spilling" in some places
Gustav Hållberg [Fri, 31 Jul 2009 13:59:55 +0000 (15:59 +0200)]
stgit.el: Fix face "spilling" in some places

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Refactor: simplify temporary marker handling
Gustav Hållberg [Fri, 31 Jul 2009 13:56:13 +0000 (15:56 +0200)]
stgit.el: Refactor: simplify temporary marker handling

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
14 years agostgit.el: Allow operating on the end of each line
Gustav Hållberg [Fri, 31 Jul 2009 11:52:56 +0000 (13:52 +0200)]
stgit.el: Allow operating on the end of each line

Extend patch/file properties to the newline at the end of each line,
allowing stgit-select and similar to take effect with point at the end
of line.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
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>
15 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>
15 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>
15 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>
15 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>
15 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>