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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Jari Aalto (1):
        Clarify SubmittingPatches Checklist

  Jim Meyering (1):
        SubmittingPatches: fix a typo

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

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

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

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

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

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

  Pavel Roskin (1):
        Assorted typo fixes

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

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

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

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

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

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

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

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

Print file modification status in human-readable format.

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

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

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

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

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

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

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

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

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

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

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

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

Also taking into account the recent format change.

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

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

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

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

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

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

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

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

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

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

This allows us to reuse "r" for refresh.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Copying most of Karl's comment from the list:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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