stgit
15 years agomail: add some commonly used tags to --auto
Dan Williams [Wed, 3 Dec 2008 21:48:17 +0000 (21:48 +0000)]
mail: add some commonly used tags to --auto

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

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

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

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

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

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

Copying most of Karl's comment from the list:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Adapt to new output from stg series.
David Kågedal [Thu, 6 Nov 2008 07:34:37 +0000 (08:34 +0100)]
stgit.el: Adapt to new output from stg series.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agostgit.el: Add numeric prefix argument to push and pop commands.
David Kågedal [Thu, 6 Nov 2008 07:34:37 +0000 (08:34 +0100)]
stgit.el: Add numeric prefix argument to push and pop commands.

By using a numerical prefix (or simply C-u) it is possible to push or
pop more than one patch.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd parse_patches boundary in the delete.py file
Catalin Marinas [Sat, 1 Nov 2008 10:52:27 +0000 (10:52 +0000)]
Add parse_patches boundary in the delete.py file

Specifying open intervals like .. for the delete command would remove
both applied and unapplied patches, which might not be the intended
behaviour. Boundary crossing should be explicit.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoChange e-mail user agent header to StGit
Catalin Marinas [Sat, 1 Nov 2008 10:52:27 +0000 (10:52 +0000)]
Change e-mail user agent header to StGit

For consistency with documentation as it was StGIT.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoTutorial: Importing patches
Karl Hasselström [Wed, 29 Oct 2008 19:06:16 +0000 (20:06 +0100)]
Tutorial: Importing patches

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoTeach "stg import" to import patch series from tar archives
Clark Williams [Fri, 24 Oct 2008 01:10:36 +0000 (03:10 +0200)]
Teach "stg import" to import patch series from tar archives

Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoIgnore compiled elisp files
Clark Williams [Fri, 24 Oct 2008 01:05:35 +0000 (03:05 +0200)]
Ignore compiled elisp files

Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoFix "show" to allow multiple branch:patch arguments
Catalin Marinas [Sun, 19 Oct 2008 08:16:06 +0000 (09:16 +0100)]
Fix "show" to allow multiple branch:patch arguments

Ranges aren't allow to contain the branch:patch format but individual
patches can be specified this way since they are treated as individual
commits.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoTutorial: Write about rebasing
Karl Hasselström [Sun, 12 Oct 2008 15:03:52 +0000 (17:03 +0200)]
Tutorial: Write about rebasing

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoTutorial: Cover "stg mail"
Karl Hasselström [Sun, 12 Oct 2008 15:03:52 +0000 (17:03 +0200)]
Tutorial: Cover "stg mail"

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoTutorial: Explain diffs a little bit better
Karl Hasselström [Sun, 12 Oct 2008 15:03:52 +0000 (17:03 +0200)]
Tutorial: Explain diffs a little bit better

Say that we use unified diffs, and point to the Wikipedia article
about them. We should probably explain this in more detail ourselves
when we get a proper user guide; but for the tutorial, this is
probably enough.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoTutorial: Talk about conflicts when introducing StGit
Karl Hasselström [Sun, 12 Oct 2008 15:03:51 +0000 (17:03 +0200)]
Tutorial: Talk about conflicts when introducing StGit

Conflicts and conflict resolving are essential features of StGit, so
we'd better tell the user about them.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRefresh and expand the tutorial (not finished)
Karl Hasselström [Sun, 5 Oct 2008 15:37:17 +0000 (17:37 +0200)]
Refresh and expand the tutorial (not finished)

This is a first pass at expanding the tutorial, fixing its formatting,
and updating it with the new things that have happened in StGit.

There are a number of things still left to do in the second half of
the document; they are tagged with "TODO".

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRefresh the main stg man page
Karl Hasselström [Sat, 4 Oct 2008 13:35:57 +0000 (15:35 +0200)]
Refresh the main stg man page

Update the text to reflect what's happened in StGit in the last few
releases. Also, consistently capitalize the names "Git" and "StGit".

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd 1.0 TODO items from recent discussion by private mail
Karl Hasselström [Sat, 4 Oct 2008 09:20:03 +0000 (11:20 +0200)]
Add 1.0 TODO items from recent discussion by private mail

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoWe're half-way there with the separate indexes
Karl Hasselström [Sat, 4 Oct 2008 09:15:43 +0000 (11:15 +0200)]
We're half-way there with the separate indexes

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRemove TODO items that have already been addressed
Karl Hasselström [Sat, 4 Oct 2008 09:03:58 +0000 (11:03 +0200)]
Remove TODO items that have already been addressed

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRemove unused variable
Karl Hasselström [Sun, 5 Oct 2008 15:33:41 +0000 (17:33 +0200)]
Remove unused variable

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoUse --diff rather than --patch in log.py
Catalin Marinas [Thu, 2 Oct 2008 22:11:12 +0000 (23:11 +0100)]
Use --diff rather than --patch in log.py

In a few places in this file options.diff is used already.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoMerge branch 'stable'
Karl Hasselström [Sun, 28 Sep 2008 12:38:22 +0000 (14:38 +0200)]
Merge branch 'stable'

* stable:
  Fix typo

15 years agoFix typo
Karl Hasselström [Sun, 28 Sep 2008 12:32:12 +0000 (14:32 +0200)]
Fix typo

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoTest the new stg delete --spill flag
Karl Hasselström [Sun, 21 Sep 2008 18:34:07 +0000 (20:34 +0200)]
Test the new stg delete --spill flag

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd a new flag, --spill, to stg delete
Karl Hasselström [Sun, 21 Sep 2008 18:34:07 +0000 (20:34 +0200)]
Add a new flag, --spill, to stg delete

It deletes the patches as usual, but doesn't touch index+worktree.
Useful for splitting up a patch, or undoing an "stg refresh".

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRemove misleading "stg delete" documentation
Karl Hasselström [Sun, 21 Sep 2008 18:34:07 +0000 (20:34 +0200)]
Remove misleading "stg delete" documentation

With the recent arrival of the stack log, patch
deletion can now be undone.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd myself to the AUTHORS file
Karl Hasselström [Sun, 21 Sep 2008 18:34:07 +0000 (20:34 +0200)]
Add myself to the AUTHORS file

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoUntabify
Karl Hasselström [Sun, 21 Sep 2008 18:34:06 +0000 (20:34 +0200)]
Untabify

We don't use tabs anywhere else, so it seems inconsistent to use it
here.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAutomatic bash completion
Karl Hasselström [Sun, 21 Sep 2008 12:20:41 +0000 (14:20 +0200)]
Automatic bash completion

Teach the build process to create a bash tab completion script. This
has three benefits:

  1. The tab completion gets faster, since it no longer has to run stg
     to figure out the set of available flags for each command.

  2. The tab completion script used to encode the list of stg
     subcommands, and the kind of arguments each subcommand expected.
     This information now lives in just one place: the subcommand's
     module.

  3. The tab completion script now knows what kind of argument each
     flag wants, and can tab complete those as well. So "stg refresh
     <tab>" will complete dirty files, but "stg refresh -p <tab>" will
     complete patch names.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoImplement "stg refresh --edit" again
Karl Hasselström [Sun, 21 Sep 2008 12:17:43 +0000 (14:17 +0200)]
Implement "stg refresh --edit" again

The -e/--edit flag to "stg refresh" was dropped between v0.13 and
v0.14, causing severe user dissatisfaction. This patch restores it,
along with -m/--message, -f/--file, --sign, --ack, --author,
--authname, --authemail, and --authdate.

I omitted the --committer options on purpose; I think they are a
mistake. Falsifying the committer info is not a common operation, and
if one wishes to do it for some reason, one can always set the
GIT_COMMITTER_* environment variables.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoInvoke the correct interactive editor
Karl Hasselström [Sun, 21 Sep 2008 12:17:43 +0000 (14:17 +0200)]
Invoke the correct interactive editor

The order is supposed to be GIT_EDITOR, stgit.editor, core.editor,
VISUAL, EDITOR, vi. This patch makes it so.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRefactor stgit.commands.edit
Karl Hasselström [Sun, 21 Sep 2008 12:17:43 +0000 (14:17 +0200)]
Refactor stgit.commands.edit

Reorganize a few existing functions, and break out stuff from the main
function into subroutines.

While we're at it, move one of the old and all of the new functions to
stgit.lib.edit, so that we can use them in a later patch to implement
"stg refresh --edit".

This fixes one of the known failures in t3300-edit.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRemove --undo flags from stg commands and docs
Karl Hasselström [Sun, 21 Sep 2008 12:17:42 +0000 (14:17 +0200)]
Remove --undo flags from stg commands and docs

Now that we have "stg undo" et.al., they aren't needed anymore.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoNew refresh tests
Karl Hasselström [Sun, 21 Sep 2008 12:17:42 +0000 (14:17 +0200)]
New refresh tests

Test stg refresh more extensively -- including some things it only
recently learned to do.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoConvert "stg refresh" to the new infrastructure
Karl Hasselström [Sun, 21 Sep 2008 12:17:42 +0000 (14:17 +0200)]
Convert "stg refresh" to the new infrastructure

And in the process, make it more powerful: it will now first create a
temp patch containing the updates, and then try to merge it into the
patch to be updated. If that patch is applied, this is done by
popping, pushing, and coalescing; if it is unapplied, it is done with
an in-index merge. This allows us to correctly handle a few corner
cases that didn't use to work, such as adding a new file to a
non-topmost patch (fixes the t2701 test failure).

The temp patch creation and merging is logged in two separate stages,
so that the user can undo them separately.

Also, whenever path limiting is used, we will now use a temporary
index in order to avoid including all staged updates (since they may
touch stuff outside the path limiters).

Support for the --force, --undo, and --annotate flags were dropped.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoMake "stg log" show stack log instead of patch log
Karl Hasselström [Sun, 21 Sep 2008 12:17:42 +0000 (14:17 +0200)]
Make "stg log" show stack log instead of patch log

Make "stg log" show the new stack log instead of the old patch logs,
which is now obsolete. Delete t1400-patch-history, which is specific
to the old "stg log".

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoCheck for top == head at the start of every transaction
Karl Hasselström [Sun, 21 Sep 2008 12:17:42 +0000 (14:17 +0200)]
Check for top == head at the start of every transaction

We used to check it in the run() method, but that's sometimes too
late: for example, it causes stg coalesce to ask for a commit message
_before_ the check, resulting in a lost commit message if the check
fails.

As before, the check can be disabled for the few commands that need
it.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoTest that stg coalesce handles head != top gracefully
Karl Hasselström [Sun, 21 Sep 2008 12:17:42 +0000 (14:17 +0200)]
Test that stg coalesce handles head != top gracefully

It currently doesn't quite: it will roll back the transaction just
fine, but not before asking the user for a commit message which is
lost in the rollback.

Bug discovered by Erik Sandberg <mandolaerik@gmail.com>:
https://gna.org/bugs/?12204

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoLog and undo external modifications
Karl Hasselström [Sun, 21 Sep 2008 12:17:41 +0000 (14:17 +0200)]
Log and undo external modifications

At the beginning of every StGit command, quickly check if the branch
head recorded in the log is the same as the actual branch head; if
it's not, conclude that some non-StGit tool has modified the stack,
and record a log entry that says so. (Additionally, if the log doesn't
exist yet, create it.)

This introduces the possibility that a log entry specifies a head and
a top that aren't equal. So teach undo, redo, and reset to deal with
that case.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoNew command: stg redo
Karl Hasselström [Sun, 21 Sep 2008 12:17:41 +0000 (14:17 +0200)]
New command: stg redo

Command for undoing an undo.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoNew command: stg undo
Karl Hasselström [Sun, 21 Sep 2008 12:17:41 +0000 (14:17 +0200)]
New command: stg undo

Basically, this is just a user-friendly way to access a subset of the
functionality of "stg reset".

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoMove stack reset function to a shared location
Karl Hasselström [Sun, 21 Sep 2008 12:17:41 +0000 (14:17 +0200)]
Move stack reset function to a shared location

Move reset_stack() from commands/reset.py to lib/log.py, so that more
commands besides reset can use it. (No such commands exist currently,
but undo and redo will use it.)

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoDon't write a log entry if there were no changes
Karl Hasselström [Sun, 21 Sep 2008 12:17:41 +0000 (14:17 +0200)]
Don't write a log entry if there were no changes

Some commands end up calling log_entry() without verifying that they
did in fact change anything. (One example of this is a conflicting
push, which will log two entries, everything else and the conflicting
push, with the "everything else" part being empty if there was only
one patch to push.) So before appending to the log, make sure that the
entry we're appending isn't a no-op.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd a --hard flag to stg reset
Karl Hasselström [Sun, 21 Sep 2008 12:17:41 +0000 (14:17 +0200)]
Add a --hard flag to stg reset

With this flag, reset will overwrite any local changes. Useful e.g.
when undoing a push that has polluted the index+worktree with a heap
of conflicts.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoLog conflicts separately for all commands
Karl Hasselström [Sun, 21 Sep 2008 12:17:40 +0000 (14:17 +0200)]
Log conflicts separately for all commands

This takes care of the old-infrastructure commands as well. They'll
all be converted to the new infrastructure eventually, but until then
this patch is necessary to make all commands behave consistently.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoLog conflicts separately
Karl Hasselström [Sun, 21 Sep 2008 12:17:40 +0000 (14:17 +0200)]
Log conflicts separately

This patch makes commands that produce a conflict log that final
conflicting push separately from the rest of the command's effects.
This makes it possible for the user to roll back just the final
conflicting push if she desires. (Rolling back the whole operation is
of course still possible, by resetting to the state yet another step
back in the log.)

This change only applies to the new-infrastructure commands.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoNew command: stg reset
Karl Hasselström [Sun, 21 Sep 2008 12:17:40 +0000 (14:17 +0200)]
New command: stg reset

Given a commit object from the log, resets the stack (or just the
named patches) to the state given by that log entry.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoWrite to a stack log when stack is modified
Karl Hasselström [Sun, 21 Sep 2008 12:17:40 +0000 (14:17 +0200)]
Write to a stack log when stack is modified

Create a log branch (called <branchname>.stgit) for each StGit branch,
and write to it whenever the stack is modified.

Commands using the new infrastructure write to the log when they
commit a transaction. Commands using the old infrastructure get a log
entry write written for them when they exit, unless they explicitly
ask for this not to happen.

The only thing you can do with this log at the moment is look at it.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoFixes for auto-generation of man pages
Daniel White [Sun, 21 Sep 2008 12:17:39 +0000 (14:17 +0200)]
Fixes for auto-generation of man pages

stg.txt is the only man page not generated by stg-build --commands.
Provide this page explicitly instead of including all other
commands twice.

stg-cmd-list.txt is only a template for inclusion in other man
pages, so rename to stop it being built along with other stg-*
files.

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoGenerate command lists automatically
Karl Hasselström [Sun, 21 Sep 2008 12:19:07 +0000 (14:19 +0200)]
Generate command lists automatically

Instead of hard-coding the list of stg subcommands everywhere,
generate them automatically. That way, they never get outdated (like
the list in stg.txt).

In order to not make StGit slower, we cache the list of commands; run
"make build" to update that cache (other make targets, such as "all"
and "test", imply "build"). If the cache doesn't exist, the code falls
back to importing all the command modules, which adds quite a bit of
overhead to each stg command (about 100 ms on my laptop).

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoasciidoc.conf: Steal updates from git
Karl Hasselström [Sun, 21 Sep 2008 12:17:39 +0000 (14:17 +0200)]
asciidoc.conf: Steal updates from git

Steal updates to asciidoc.conf from git. Also, make sure that we use
the link:[] abd stglink:[] macros correctly everywhere.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAuto-generate man pages for all StGit commands
Karl Hasselström [Sun, 21 Sep 2008 12:17:39 +0000 (14:17 +0200)]
Auto-generate man pages for all StGit commands

Auto-generate man pages based on the docs that are in each
stgit/commands/<cmd>.py file. That doc format is extended in order to
support both brief command help output and manpage text.

The existing interactive help is made briefer (just the usage, the
one-line explanation, and the option listing).

The text in the man pages needs some love, both content-wise and
asciidoc-markup-wise. This is left for future patches to resolve. (It
should be rather simple to improve the man pages one by one now that
the infrastructure is in place.)

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd support for initializing a branch for stgit from Emacs.
David Kågedal [Sun, 21 Sep 2008 12:17:38 +0000 (14:17 +0200)]
Add support for initializing a branch for stgit from Emacs.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoMerge branch 'stable'
Catalin Marinas [Fri, 19 Sep 2008 21:52:26 +0000 (22:52 +0100)]
Merge branch 'stable'

Conflicts:

t/t1501-sink.sh

15 years agoFix the sink command for various test cases
Catalin Marinas [Thu, 18 Sep 2008 21:31:31 +0000 (22:31 +0100)]
Fix the sink command for various test cases

The t1501-sink.sh test was also improved.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoAutosign newly created patches
Catalin Marinas [Fri, 12 Sep 2008 21:22:47 +0000 (22:22 +0100)]
Autosign newly created patches

This patch adds the autosign configuration variable which is checked by
the "new" command to automatically sign the patch message.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoDo not crash if a patch log ref is missing
Catalin Marinas [Fri, 12 Sep 2008 21:22:18 +0000 (22:22 +0100)]
Do not crash if a patch log ref is missing

Since we'll get rid of the individual patch logs, StGit should ignore if
such a ref is missing when deleting the compatibility patch files.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoMerge branch 'stable'
Catalin Marinas [Tue, 9 Sep 2008 22:12:19 +0000 (23:12 +0100)]
Merge branch 'stable'

15 years agoFix import to work properly in subdirectories
Catalin Marinas [Tue, 9 Sep 2008 22:11:16 +0000 (23:11 +0100)]
Fix import to work properly in subdirectories

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoFix the importing of config in series.py
Catalin Marinas [Tue, 9 Sep 2008 21:34:30 +0000 (22:34 +0100)]
Fix the importing of config in series.py

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agostgit-completion.bash: Remove add/applied/cp/rm/unapplied
Shinya Kuribayashi [Sat, 6 Sep 2008 08:16:22 +0000 (10:16 +0200)]
stgit-completion.bash: Remove add/applied/cp/rm/unapplied

These commands are no longer available.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agodiffcol.sh: Use /bin/bash explicitly
Shinya Kuribayashi [Sat, 6 Sep 2008 08:16:22 +0000 (10:16 +0200)]
diffcol.sh: Use /bin/bash explicitly

Recent Ubuntu uses dash (Debian Almquist Shell; a lightweight POSIX-
compliant shell derived from ash) as /bin/sh by default.  In this case
pager=diffcol.sh doesn't work like this:

> skuribay@ubuntu:~/kernel/linux.git$ stg show
> /home/skuribay/share/stgit/contrib/diffcol.sh: 22: Bad substitution

this is caused by non-bash-compliant /bin/sh.

diffcol.sh is based on Quilt, and Quilt is dependent on bash; Actually
all Quilt scripts use /bin/bash without exceptions.  Then it's good for
diffcol.sh to use /bin/bash.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRefactoring: move shared options to their own module
Karl Hasselström [Sat, 6 Sep 2008 08:16:22 +0000 (10:16 +0200)]
Refactoring: move shared options to their own module

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRemove unneeded import
Karl Hasselström [Sat, 6 Sep 2008 08:16:22 +0000 (10:16 +0200)]
Remove unneeded import

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRemove dashed form of git command still in comment
Daniel White [Wed, 27 Aug 2008 06:38:11 +0000 (16:38 +1000)]
Remove dashed form of git command still in comment

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoMerge branch 'stable'
Karl Hasselström [Tue, 26 Aug 2008 22:00:15 +0000 (00:00 +0200)]
Merge branch 'stable'

Conflicts:
stgit/commands/diff.py
stgit/commands/edit.py
stgit/commands/export.py
stgit/commands/files.py
stgit/commands/mail.py
stgit/gitmergeonefile.py
t/t1200-push-modified.sh
t/t1201-pull-trailing.sh
t/test-lib.sh

15 years agoDon't use the dashed for of git commands
Karl Hasselström [Tue, 26 Aug 2008 21:43:49 +0000 (23:43 +0200)]
Don't use the dashed for of git commands

With the release of git 1.6.0, the dashed forms of the git commands
are no longer installed in $PATH by default, so trying to use them is
likely to fail. This patch replaces all remaining dashed git calls by
their dashless equivalents -- even in comments and docs, for
consistency and to aid grepping.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agodebian/rules: take advantage of new build targets
Daniel White [Fri, 22 Aug 2008 21:49:05 +0000 (22:49 +0100)]
debian/rules: take advantage of new build targets

As a result, both man and html documentation are included
in the resulting package.

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
15 years agoRemove the duplicate utils.strip_leading function
Catalin Marinas [Thu, 21 Aug 2008 22:12:16 +0000 (23:12 +0100)]
Remove the duplicate utils.strip_leading function

This function is a duplicate of utils.strip_prefix.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoFix some remaining old-style stg id calls
Karl Hasselström [Thu, 21 Aug 2008 22:12:16 +0000 (23:12 +0100)]
Fix some remaining old-style stg id calls

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoRemove the applied/unapplied commands
Catalin Marinas [Thu, 21 Aug 2008 22:12:16 +0000 (23:12 +0100)]
Remove the applied/unapplied commands

This patch moves the applied/unapplied functionality to the 'series'
command via the corresponding options.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoConvert git_id() to the new id format
Catalin Marinas [Thu, 21 Aug 2008 22:12:15 +0000 (23:12 +0100)]
Convert git_id() to the new id format

The patch rewrites git_id() to use the new id format and coverts the
commands using this function. The git_id() will be removed once all the
commands are converted to the new infrastructure where git_commit() will
be used instead.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoImplement a new patch identification scheme and id command
Catalin Marinas [Thu, 21 Aug 2008 22:12:15 +0000 (23:12 +0100)]
Implement a new patch identification scheme and id command

The new scheme allows '[<branch>:]<patch>' and '[<branch>:]{base}'
(the latter showing the base of a stack). You may append Git suffixes
like ^ and ^{...}.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoAllow e-mails to be sent with the Unix sendmail tool
Catalin Marinas [Thu, 21 Aug 2008 09:45:05 +0000 (10:45 +0100)]
Allow e-mails to be sent with the Unix sendmail tool

If the stgit.smtpserver configuration option has an absolute file path
format, it is assumed to be an external tool. For example, to use
sendmail just set this variable to "/usr/sbin/sendmail -t -i" (see the
examples/gitconfig file).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
15 years agoDo not mess-up with commit message formatting when sending email
Samuel Tardieu [Mon, 4 Aug 2008 15:36:32 +0000 (17:36 +0200)]
Do not mess-up with commit message formatting when sending email

The short description, which will be used as the email subject,
gets its leading and trailing blanks removed.

The long description gets its trailing blanks removed as well
as any leading empty lines. Leading blanks are left untouched
to preserve the formatting.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoDo not insert an empty line before the diffstat info
Samuel Tardieu [Mon, 4 Aug 2008 13:59:12 +0000 (15:59 +0200)]
Do not insert an empty line before the diffstat info

To make the format of stg output closer to the plain git one, do
not insert an empty line between the "---" separator and the
diffstat information.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoAdd some tests of refreshing removed files
Karl Hasselström [Mon, 4 Aug 2008 13:21:16 +0000 (15:21 +0200)]
Add some tests of refreshing removed files

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoUpdated INSTALL with documentation of Makefile
Daniel White [Fri, 25 Jul 2008 16:23:53 +0000 (02:23 +1000)]
Updated INSTALL with documentation of Makefile

Also includes information about requirements for
building and installing documentation like git's
INSTALL documentation.

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
15 years agoRemove installation of documentation from setup.py
Daniel White [Fri, 25 Jul 2008 16:22:34 +0000 (02:22 +1000)]
Remove installation of documentation from setup.py

This is attempts to install documentation from a now
non-existent directory.

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
15 years agoAdd install-html target to makefile
Daniel White [Fri, 25 Jul 2008 18:00:43 +0000 (04:00 +1000)]
Add install-html target to makefile

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
15 years agoAdd install-doc target to makefile
Daniel White [Fri, 25 Jul 2008 16:35:39 +0000 (02:35 +1000)]
Add install-doc target to makefile

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
15 years agoFix default install location for manpages
Daniel White [Fri, 25 Jul 2008 17:42:29 +0000 (03:42 +1000)]
Fix default install location for manpages

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
15 years agoRemove variables regarding section 7 man pages
Daniel White [Fri, 25 Jul 2008 16:11:41 +0000 (02:11 +1000)]
Remove variables regarding section 7 man pages

Documentation/Makefile originally had stg.txt in section 7,
but this was changed in 36043cd62481bce58d032d06e5e79cae0ec84749.
Now section 7 is no longer used and the lack of files breaks
the install target.

It seems simpler to remove this section until it is actually
required.

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
15 years agoFix Makefile to correctly pass prefix option
Daniel White [Fri, 25 Jul 2008 16:37:04 +0000 (02:37 +1000)]
Fix Makefile to correctly pass prefix option

Was using PREFIX in top level Makefile whereas
Documentation/Makefile was using prefix.  Git's
use prefix, so seems the most reasonable choice.

Signed-off-by: Daniel White <daniel@whitehouse.id.au>
15 years agoGlobal performance logging
Karl Hasselström [Wed, 23 Jul 2008 21:29:10 +0000 (23:29 +0200)]
Global performance logging

Measure the time for the whole program, and how much of that was
subprocess calls.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoLog subprocess calls during performance testing
Karl Hasselström [Wed, 23 Jul 2008 21:29:10 +0000 (23:29 +0200)]
Log subprocess calls during performance testing

Log each command's subprocess calls to a separate file.

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoShow full command in subprocess profiling
Karl Hasselström [Wed, 23 Jul 2008 21:29:10 +0000 (23:29 +0200)]
Show full command in subprocess profiling

Showing just the executable name isn't so useful now that it's always
"git".

Signed-off-by: Karl Hasselström <kha@treskal.com>
15 years agoLog subprocess activity to a file
Karl Hasselström [Wed, 23 Jul 2008 21:29:10 +0000 (23:29 +0200)]
Log subprocess activity to a file

If the user sets $STGIT_SUBPROCESS_LOG to a log mode followed by a
colon and a file name, append the log to that file instead of writing
it to stdout.

Signed-off-by: Karl Hasselström <kha@treskal.com>