Karl Hasselström [Thu, 24 Jan 2008 06:08:57 +0000 (07:08 +0100)]
Remove unused default values
This function was called from only one place, and the default values
weren't used there, so they're useless.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Thu, 24 Jan 2008 06:30:32 +0000 (07:30 +0100)]
Homogenize buffer names
It was driving me crazy that I couldn't tab-complete "*stg" to
"*stgit*" because there was always a "*stgit edit*" buffer lying
around.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Thu, 24 Jan 2008 06:17:58 +0000 (07:17 +0100)]
Don't keep old committer when rewriting a commit
Signed-off-by: Karl Hasselström <kha@treskal.com>
Peter Oberndorfer [Wed, 16 Jan 2008 20:58:26 +0000 (21:58 +0100)]
replace "git repo-config" usage by "git config"
This is necessary since "git repo-config" will be removed soon.
Signed-off-by: Peter Oberndorfer <kumbayo84@arcor.de>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Pavel Roskin [Sat, 12 Jan 2008 04:58:03 +0000 (23:58 -0500)]
Fix "stg edit --sign"
It worked in 0.14, but was broken some time after the release.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Peter Oberndorfer [Tue, 8 Jan 2008 20:43:53 +0000 (21:43 +0100)]
Don't mention removed "stg refresh" options
Change usage string of refresh to not refer to removed options for
changing the patch author, commiter and description.
Signed-off-by: Peter Oberndorfer <kumbayo84@arcor.de>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 21:12:20 +0000 (22:12 +0100)]
Make "stg goto" subdirectory safe
This is not specific to "stg goto" -- it affects all commands that use
the new infrastructure. (But of those, only goto and coalesce were
subdirectory unsafe.)
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 20:51:21 +0000 (21:51 +0100)]
Test that "stg goto" can be called from a subdirectory
It currently can't; therefore, the tests are marked as known failures.
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Fri, 14 Dec 2007 08:59:49 +0000 (09:59 +0100)]
Emacs mode: coalesce command
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Fri, 14 Dec 2007 08:59:32 +0000 (09:59 +0100)]
Emacs mode: Add mark command
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 12 Dec 2007 22:48:56 +0000 (23:48 +0100)]
Make "stg commit" fancier
Allow the user to commit any patch. Changed behavior: with no
parameters, commit one applied patch, not all applied patches -- this
is what uncommit does.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 12 Dec 2007 21:59:13 +0000 (22:59 +0100)]
Convert "stg commit" to new infrastructure
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 12 Dec 2007 20:56:42 +0000 (21:56 +0100)]
Set exit code to 3 on merge conflict
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 12 Dec 2007 20:08:46 +0000 (21:08 +0100)]
stg coalesce: Support --file and --save-template
--save-template was a bit tricky, because we want that
* if we reached the stage where the message is needed without
conflicts, the message should be written and no other side effects
should occur; but
* if we run into conflicts before reaching that point, behave just
as if --save-template was not given.
This makes this script
stg coalesce --save-template <patches>
if template was saved:
let user edit template
if user didn't abort:
stg coalesce --file <patches>
equivalent to
stg coalesce <patches>
with the added benefit that the user can abort the whole thing without
visible side effects.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Thu, 13 Dec 2007 17:10:45 +0000 (18:10 +0100)]
Expose transaction abort function
Users of stack transactions may call abort() instead of run(), if they
wish to roll back the transaction instead of committing it.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Thu, 29 Nov 2007 19:35:27 +0000 (20:35 +0100)]
New infrastructure: Make sure that the branch is initialized
The old infrastructure has been checking this for ages, but the new
forgot to do so until now.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Sun, 25 Nov 2007 04:29:16 +0000 (05:29 +0100)]
Convert "stg uncommit" to the new infrastructure
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Sun, 9 Dec 2007 12:34:12 +0000 (13:34 +0100)]
Let "stg goto" use the new infrastructure
In the process, it loses the --keep option, since the new
infrastructure always keeps local changes (and aborts cleanly if they
are in the way).
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Sat, 24 Nov 2007 16:34:03 +0000 (17:34 +0100)]
Let "stg clean" use the new transaction primitives
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Sun, 9 Dec 2007 07:56:12 +0000 (08:56 +0100)]
Teach the new infrastructure about the index and worktree
And use the new powers to make "stg coalesce" able to handle arbitrary
patches, not just consecutive applied patches.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Catalin Marinas [Wed, 19 Dec 2007 18:00:16 +0000 (18:00 +0000)]
Remove a newline from the e-mail template
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 19 Dec 2007 18:00:15 +0000 (18:00 +0000)]
Remove unused git functions like add, rm, copy
They are no longer needed.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 19 Dec 2007 18:00:15 +0000 (18:00 +0000)]
Remove multiple stages returned by git.ls_files
This patch uses a set to return unique file names from git.ls_files in
case there are multiple stages in the index.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 19 Dec 2007 18:00:15 +0000 (18:00 +0000)]
Don't assume there is always a stage 2 in git.get_conflicts
For example, the t1202-push-undo.sh test generates a conflict where a
file was added in both current and patch but different content and
missing in ancestor, therefore no stage 2.
There could also be a case where stage 3 is missing if a file is
removed by the patch being pushed.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 19 Dec 2007 18:00:15 +0000 (18:00 +0000)]
Re-add the interactive merge
This feature was dropped by previous changes to
git.merge_recursive(). This patch modifies gitmergeonefile.merge() to
only deal with interactive merges or simply check out the conflict
stages. The stgit.commands.common.resolved() function was moved to
git.resolved(). The patch also drops the git.merge() function since it
can no longer use gitmergeonefile.merge() (different API) and modifies
the 'sync' command to always use git.merge_recursive().
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:15 +0000 (18:00 +0000)]
Let "stg applied" and "stg unapplied" use the new infrastructure
This is a trivial change since these commands are so simple, but
because these are the commands used by t4000-upgrade, we now test that
the new infrastructure can upgrade old stacks.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:14 +0000 (18:00 +0000)]
Add "stg coalesce"
It coalesces two or more consecutive applied patches, with no need to
touch index/worktree, and no possibiliy of conflicts.
Future improvements could relax the "consecutive" and "applied"
restrictions, by building a new chain of commits just like "stg push"
will do once it's been converted to the new infrastructure.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:14 +0000 (18:00 +0000)]
Let "stg clean" use the new infrastructure
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:14 +0000 (18:00 +0000)]
Upgrade older stacks to newest version
This is of course needed by the new infrastructure as well. So break
it out into its own file, where it can be used by both new and old
infrastructure. This has the added benefit of making it easy to see
that the upgrade code doesn't depend on anything it shouldn't.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:14 +0000 (18:00 +0000)]
Write metadata files used by the old infrastructure
The new infrastructure doesn't use them, but they're needed to support
the old infrastructure during the transition when both of them are in
use.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:14 +0000 (18:00 +0000)]
New StGit core infrastructure: repository operations
This is the first part of the New and Improved StGit core
infrastructure. It has functions for manipulating the git repository
(commits, refs, and so on), but doesn't yet touch the index or
worktree.
Currently not used by anything.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:13 +0000 (18:00 +0000)]
Remove "stg cp"
Plain old "cp" and git-add can do the job just as well.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:13 +0000 (18:00 +0000)]
Remove "stg rm"
git-rm can do the same job just as well. Besides, since StGit notices
when a file disappears, just "rm" can also do the job.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:13 +0000 (18:00 +0000)]
Remove "stg add"
git-add does the exact same job, so there's no need to have it in
StGit.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:13 +0000 (18:00 +0000)]
We keep the different stages of a conflict in the index now
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:13 +0000 (18:00 +0000)]
Refactoring: pass more than one file to resolved()
This lets us cut down on the number of calls to git.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:13 +0000 (18:00 +0000)]
Fix "stg resolved" to work with new conflict representation
The actual resolving is done by calling the same subroutine as "git
add".
Instead of using existing *.{ancestor,current,patches} files, the
interactive merge has to create them from the index contents, and
delete them afterwards.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:12 +0000 (18:00 +0000)]
Better error message if merge fails
This message is no longer printed in case of conflicts, just in case
the merge really failed; so don't talk about conflicts in the error
message.
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:12 +0000 (18:00 +0000)]
Ask git about unmerged files
Don't look in the "conflicts" file for that, since it isn't updated. Also
added a test that the check_conflicts() function works.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:12 +0000 (18:00 +0000)]
Nicer conflict markers
Instead of tagging the conflict markers with sha1 hashes, use
"ancestor", "current", and "patched".
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:12 +0000 (18:00 +0000)]
Use the output from merge-recursive to list conflicts
merge-recursive already has useful information about what the conflicts
were, so we reuse that when pushing.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:12 +0000 (18:00 +0000)]
Simplify merge_recursive
Listing the unmerged files is unnecessary, since the information
isn't really used anyway. Just note if the merge failed or succeeded.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:11 +0000 (18:00 +0000)]
Added a test case to check what happens when push finds a conflict
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:11 +0000 (18:00 +0000)]
Leave working dir and index alone after failed (conflicting) push
This leaves the index and working tree in the state that merge-recursive
left it, with unmerged files in different stages, and the non-conflicting
changes in the index.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:11 +0000 (18:00 +0000)]
Split git.merge into two functions
This only prepares for later simplifications.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:11 +0000 (18:00 +0000)]
Write removed fields for backwards compatibility
Start writing the "top", "bottom", and "bottom.old" fields again. The
last two patches mean we don't need them anymore, but old versions of
StGit still do.
At some later time, we'll want to change the stack on-disk format so
that these can be removed. But we'll probably want to do that as part
of a larger change.
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:11 +0000 (18:00 +0000)]
Remove the 'top' field
The top is instead implicitly defined by the patch ref.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:10 +0000 (18:00 +0000)]
Remove the 'bottom' field
The bottom is instead always calculated from the top by getting its
parent commit.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:10 +0000 (18:00 +0000)]
Check bottom and invariants
This code adds some checks that the bottom is actually always the
parent of top.
It also checks that the top is the same as what the patch ref points
to.
This is only to ensure that the next patches are correct.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:09 +0000 (18:00 +0000)]
Emacs mode: Added stgit-new
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:09 +0000 (18:00 +0000)]
Emacs mode: added fontification
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:09 +0000 (18:00 +0000)]
Emacs mode: Add stgit-edit command
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:09 +0000 (18:00 +0000)]
Emacs mode: added stgit-commit and stgit-uncommit
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:09 +0000 (18:00 +0000)]
Emacs mode: add stgit-repair
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:09 +0000 (18:00 +0000)]
Emacs mode: Bind n and p
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Wed, 19 Dec 2007 18:00:08 +0000 (18:00 +0000)]
Emacs mode: Improve the output buffer state
Make the output buffer have the correct default-directory, and make it
read-only and unmodified.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 19 Dec 2007 18:00:08 +0000 (18:00 +0000)]
Emacs mode: show patches' short description
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Karl Hasselström [Wed, 19 Dec 2007 18:00:08 +0000 (18:00 +0000)]
Emacs mode: Bind "G" to "stg goto"
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Karl Hasselström [Wed, 19 Dec 2007 18:00:08 +0000 (18:00 +0000)]
Emacs mode: Let "P" push or pop patch at point
When the user presses "P", push or pop the patch at point depending on
whether it's applied or unapplied.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Karl Hasselström [Wed, 19 Dec 2007 18:00:08 +0000 (18:00 +0000)]
Emacs mode: push/pop next patch, not patch at point
The three operations we should have are:
* Pop the topmost applied patch, no matter where point is.
* Push the first unapplied patch, no matter where point is.
* Push/pop the patch at point, depending on whether it's currently
applied.
This patch makes "<" and ">" do the first two operations. The third is
coming in a later patch.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Karl Hasselström [Wed, 19 Dec 2007 18:00:07 +0000 (18:00 +0000)]
Emacs mode: Makefile for building stgit.el
Shamelessly stolen from git's contrib/emacs/Makefile.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Karl Hasselström [Wed, 19 Dec 2007 18:00:07 +0000 (18:00 +0000)]
Emacs mode: Add an explanatory header
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Karl Hasselström [Wed, 19 Dec 2007 18:00:07 +0000 (18:00 +0000)]
Emacs mode: Show keybindings when user presses "h" or "?"
These are the same keys the git emacs mode uses.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
David Kågedal [Wed, 19 Dec 2007 18:00:07 +0000 (18:00 +0000)]
Add an StGit mode for emacs
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 12 Dec 2007 22:44:12 +0000 (23:44 +0100)]
Name the exit codes to improve legibility
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 12 Dec 2007 23:13:55 +0000 (00:13 +0100)]
Make generic --message/--file/--save-template flags
And let "stg edit" use them.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Wed, 12 Dec 2007 21:33:32 +0000 (22:33 +0100)]
Let parse_patch take a string instead of a file parameter
This makes it more generally useful, since all future callers may not
have the input in a file.
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Mon, 10 Dec 2007 21:43:55 +0000 (22:43 +0100)]
Treat filename '-' as stdin/stdout in edit
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
David Kågedal [Tue, 11 Dec 2007 11:00:16 +0000 (12:00 +0100)]
Added --save-template flag to edit command
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Catalin Marinas [Tue, 11 Dec 2007 23:51:54 +0000 (23:51 +0000)]
Release 0.14.1
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Karl Hasselström [Tue, 11 Dec 2007 14:23:47 +0000 (15:23 +0100)]
Fix typo: we require Python 2.4, not 2.5
Signed-off-by: Karl Hasselström <kha@treskal.com>
Catalin Marinas [Sun, 9 Dec 2007 23:45:08 +0000 (23:45 +0000)]
Release 0.14
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sun, 9 Dec 2007 23:32:58 +0000 (23:32 +0000)]
Better handling of binary files (bug #8495)
The patch adds the '--binary' option to the git-diff-tree and git-diff-index
commands. The git-apply no longer needs this flag as it is set by default.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sat, 8 Dec 2007 23:16:30 +0000 (23:16 +0000)]
Allow only certain gitk exit codes as valid
This patch fixes the log and series commands to not report an error when
gitk is killed by the user.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Karl Hasselström [Sat, 8 Dec 2007 11:00:10 +0000 (12:00 +0100)]
Don't use test_expect_failure for tests that are supposed to work
test_expect_failure is only for marking known bugs.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Sat, 8 Dec 2007 08:27:22 +0000 (09:27 +0100)]
Discard exitcode of subprocess in a better way
Discard the exit code in a way that meshes better with the existing
handling of exit codes.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Sat, 8 Dec 2007 09:30:40 +0000 (10:30 +0100)]
Fix bashism
Signed-off-by: Karl Hasselström <kha@treskal.com>
Catalin Marinas [Fri, 7 Dec 2007 21:19:25 +0000 (21:19 +0000)]
Make sure the refid given to 'mail' has the angle brackets
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 7 Dec 2007 21:19:25 +0000 (21:19 +0000)]
Some clean-up of the branch manipulation commands
A GIT branch couldn't be deleted if it wasn't a StGIT stack. Added
tests for the creation of branches when the current branch isn't a
stack.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 7 Dec 2007 21:19:25 +0000 (21:19 +0000)]
Ignore the gitk exit code in 'stg log -g' (bug #10010)
The patch adds the 'exitcode' boolean argument to Run.run() and
modifies the 'log' command.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 7 Dec 2007 21:19:25 +0000 (21:19 +0000)]
Add the 'log --number' option to limit the output
The patch also changes the construction of the string when --patch is
supplied to avoid resource consumption (using a list and joining at
the end rather than creating a bigger and bigger string).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 7 Dec 2007 21:19:24 +0000 (21:19 +0000)]
Change the file timestamp in 'resolved --reset' (bug #10017)
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 7 Dec 2007 21:19:24 +0000 (21:19 +0000)]
Allow 'show' and 'id' to work on non-StGIT branches (bug #10011)
Some clean-up to only access the current series object if needed.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 7 Dec 2007 21:16:36 +0000 (21:16 +0000)]
git.pretty_commit() re-implemented with "git show" (bug #10018)
This way, it honours the diff.renames etc. options.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 7 Dec 2007 21:16:36 +0000 (21:16 +0000)]
Check the minimum required versions of GIT and Python (bug #10218)
The patch modifies the setup.py script to check the minimum versions
of GIT and Python required for building and installing StGIT. They are
currently set to git-1.5.2 and Python-2.4.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Fri, 7 Dec 2007 21:16:36 +0000 (21:16 +0000)]
Add a test for the 'mail --attach' command
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Thu, 6 Dec 2007 23:28:42 +0000 (23:28 +0000)]
Allow multipart templates for patch e-mails (bug #10237)
If the template is a multipart MIME message, it sets the charset only to
the payloads. The patch also adds the '--attach' option to 'mail' which uses
the templates/mailattch.tmpl template file.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 4 Dec 2007 21:46:14 +0000 (21:46 +0000)]
Clean-up if the branch creation fails (bug #10015)
If the tree switching fails during the branch creation, the new head
will be reverted and the new branch deleted.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Mon, 3 Dec 2007 10:30:20 +0000 (10:30 +0000)]
Correctly identify the parent branch (bug #10014)
Any valid git ref was identified as a possible parent branch. This patch
adds a check for the refs listed by git-show-ref.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sat, 1 Dec 2007 23:00:00 +0000 (23:00 +0000)]
Check for disappeared newborn files in git.tree_status (bug #8516)
If a file is added to the index (stg add) but is removed from the shell,
git.tree_status doesn't detect it but other commands like push fail. The
patch adds a call to 'git diff-files' in git.tree_status.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Sat, 1 Dec 2007 22:59:59 +0000 (22:59 +0000)]
Make Series.refresh_patch automatically save the undo information
The patch pushing with was losing the undo information because the arguments
passed to refresh_patch. The backup argument now defaults to True since
this is needed in most of the cases.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Karl Hasselström [Fri, 30 Nov 2007 01:20:03 +0000 (02:20 +0100)]
Make "stg repair" help text more helpful
Specifically, point out that if messing up the branch with git
commands was a mistake, the user should run "git reset", not "stg
repair".
Signed-off-by: Karl Hasselström <kha@treskal.com>
Catalin Marinas [Tue, 27 Nov 2007 22:30:21 +0000 (22:30 +0000)]
Improve the t1205 test for push
Bug #9311 reported in the past for a push conflict with an unrecorded
file. It is no longer reproducible but test added for future
regression.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Tue, 27 Nov 2007 10:32:12 +0000 (10:32 +0000)]
Keep the patch log when import --replace deletes patches
This is a fix for bug #10123.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Karl Hasselström [Sun, 25 Nov 2007 11:42:35 +0000 (12:42 +0100)]
Add missing switch to "stg uncommit" usage line
Signed-off-by: Karl Hasselström <kha@treskal.com>
Karl Hasselström [Sun, 25 Nov 2007 08:52:04 +0000 (09:52 +0100)]
Push and pop don't have --to flags anymore
Signed-off-by: Karl Hasselström <kha@treskal.com>
Yann Dirson [Thu, 22 Nov 2007 21:23:34 +0000 (22:23 +0100)]
stg-gitk: allow passing args to gitk; add --help.
Quite handy to further limit the commits to be shown.
David Kågedal [Wed, 21 Nov 2007 10:35:59 +0000 (11:35 +0100)]
Added test case for stg refresh
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
Catalin Marinas [Wed, 14 Nov 2007 21:14:55 +0000 (21:14 +0000)]
Execute the 'git ...' rather than 'git-...'
Since many commands are now built into the git binary, it doesn't make
sense to run the git-... scripts. The patch modifies the GRun class to
pass the 'git' file name together with the command arguments. It also
modifies all the other calls to git-...
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Catalin Marinas [Wed, 14 Nov 2007 21:14:55 +0000 (21:14 +0000)]
'stg pop --keep' doesn't update the index
While git.apply_diff works correctly, the git.switch implementation
doesn't update the index (only the HEAD) and a subsequent 'stg refresh'
would merge all the popped patches into the current one ('stg refresh
--patch' fails in the same way). This patch fixes git.switch to read the
new index (git-read-tree) if keep == True.
Before commit
a77bfa77 (to fix bug #8972), git-apply had the --index
option to automatically update the index but it was failing in many
cases.
The drawback is that a subsequent git-update-index takes longer than
usual, but at least we have a correct behaviour.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>