* [StGit PATCH] Remove the resolved command
@ 2009-05-29 21:30 Catalin Marinas
2009-05-31 8:21 ` Karl Hasselström
0 siblings, 1 reply; 2+ messages in thread
From: Catalin Marinas @ 2009-05-29 21:30 UTC (permalink / raw)
To: git, Karl Hasselström
From: Catalin Marinas <catalin.marinas@arm.com>
This command simply duplicates the "git add" or "git mergetool" commands
for handling conflicts.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
Documentation/tutorial.txt | 2 +
examples/gitconfig | 4 --
stgit/commands/common.py | 2 +
stgit/commands/push.py | 4 +-
stgit/commands/rebase.py | 2 +
stgit/commands/resolved.py | 82 --------------------------------------------
stgit/config.py | 1 -
t/t0002-status.sh | 2 +
t/t2000-sync.sh | 4 +-
9 files changed, 8 insertions(+), 95 deletions(-)
delete mode 100644 stgit/commands/resolved.py
diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt
index 8e0adbf..4aa7629 100644
--- a/Documentation/tutorial.txt
+++ b/Documentation/tutorial.txt
@@ -313,7 +313,7 @@ markers.
Now that we've resolved the conflict, we just need to tell StGit about
it:
- $ stg resolved TODO
+ $ git add TODO
$ stg status
M TODO
diff --git a/examples/gitconfig b/examples/gitconfig
index e235e14..4f56918 100644
--- a/examples/gitconfig
+++ b/examples/gitconfig
@@ -17,10 +17,6 @@
# Automatically sign newly created patches
#autosign = Signed-off-by
- # Set to 'yes' if you don't want to use the 'resolved' command.
- # 'refresh' will automatically mark the conflicts as resolved
- #autoresolved = no
-
# SMTP server for sending patches
#smtpserver = /usr/sbin/sendmail -t -i
#smtpserver = localhost:25
diff --git a/stgit/commands/common.py b/stgit/commands/common.py
index 1bc162f..bc8266e 100644
--- a/stgit/commands/common.py
+++ b/stgit/commands/common.py
@@ -120,7 +120,7 @@ def check_head_top_equal(crt_series):
def check_conflicts():
if git.get_conflicts():
raise CmdException('Unsolved conflicts. Please fix the conflicts'
- ' then use "resolve <files>" or revert the'
+ ' then use "git add --update <files>" or revert the'
' changes with "status --reset".')
def print_crt_patch(crt_series, branch = None):
diff --git a/stgit/commands/push.py b/stgit/commands/push.py
index 84a93bd..d5e02e0 100644
--- a/stgit/commands/push.py
+++ b/stgit/commands/push.py
@@ -30,8 +30,8 @@ the stack. The 'push' operation allows patch reordering by commuting
them with the three-way merge algorithm. If there are conflicts while
pushing a patch, those conflicts are written to the work tree, and the
command halts. Conflicts raised during the push operation have to be
-fixed and the 'resolved' command run (alternatively, you may undo the
-conflicting push with 'stg undo').
+fixed and the 'git add --update' command run (alternatively, you may
+undo the conflicting push with 'stg undo').
The command also notifies when the patch becomes empty (fully merged
upstream) or is modified (three-way merged) by the 'push' operation."""
diff --git a/stgit/commands/rebase.py b/stgit/commands/rebase.py
index a4bc6e7..b949a5c 100644
--- a/stgit/commands/rebase.py
+++ b/stgit/commands/rebase.py
@@ -31,7 +31,7 @@ Pop all patches from current stack, move the stack base to the given
If you experience merge conflicts, resolve the problem and continue
the rebase by executing the following sequence:
- $ stg resolved -a [-i]
+ $ git add --update
$ stg refresh
$ stg goto top-patch
diff --git a/stgit/commands/resolved.py b/stgit/commands/resolved.py
deleted file mode 100644
index eba778d..0000000
--- a/stgit/commands/resolved.py
+++ /dev/null
@@ -1,82 +0,0 @@
-
-__copyright__ = """
-Copyright (C) 2005, Catalin Marinas <catalin.marinas@gmail.com>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-"""
-
-import sys, os
-from stgit.argparse import opt
-from stgit.commands.common import *
-from stgit.utils import *
-from stgit import argparse, stack, git, basedir
-from stgit.config import config, file_extensions
-
-help = 'Mark a file conflict as solved'
-kind = 'wc'
-usage = ['[options] [<files...>]']
-description = """
-Mark a merge conflict as resolved. The conflicts can be seen with the
-'status' command, the corresponding files being prefixed with a
-'C'."""
-
-args = [argparse.conflicting_files]
-options = [
- opt('-a', '--all', action = 'store_true',
- short = 'Mark all conflicts as solved'),
- opt('-r', '--reset', metavar = '(ancestor|current|patched)',
- args = [argparse.strings('ancestor', 'current', 'patched')],
- short = 'Reset the file(s) to the given state'),
- opt('-i', '--interactive', action = 'store_true',
- short = 'Run the interactive merging tool')]
-
-directory = DirectoryHasRepository(needs_current_series = False, log = False)
-
-def func(parser, options, args):
- """Mark the conflict as resolved
- """
- args = git.ls_files(args)
- directory.cd_to_topdir()
-
- if options.reset \
- and options.reset not in file_extensions():
- raise CmdException, 'Unknown reset state: %s' % options.reset
-
- if options.all and not options.interactive:
- resolved_all(options.reset)
- return
-
- conflicts = git.get_conflicts()
-
- if len(args) != 0:
- files = args
- elif options.all:
- files = conflicts
- else:
- parser.error('incorrect number of arguments')
-
- if not conflicts:
- raise CmdException, 'No more conflicts'
-
- # check for arguments validity
- if not options.all:
- for filename in files:
- if not filename in conflicts:
- raise CmdException, 'No conflicts for "%s"' % filename
-
- # resolved
- if options.interactive:
- git.mergetool(files)
- else:
- git.resolved(files, options.reset)
diff --git a/stgit/config.py b/stgit/config.py
index a98c303..a3dbfa5 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -28,7 +28,6 @@ class GitConfigException(StgException):
class GitConfig:
__defaults={
- 'stgit.autoresolved': 'no',
'stgit.smtpserver': 'localhost:25',
'stgit.smtpdelay': '5',
'stgit.pullcmd': 'git pull',
diff --git a/t/t0002-status.sh b/t/t0002-status.sh
index ffcad77..2512c53 100755
--- a/t/t0002-status.sh
+++ b/t/t0002-status.sh
@@ -145,7 +145,7 @@ A fie
M foo/bar
EOF
test_expect_success 'Status after resolving the push' '
- stg resolved -a &&
+ git add --update &&
stg status > output.txt &&
test_cmp expected.txt output.txt
'
diff --git a/t/t2000-sync.sh b/t/t2000-sync.sh
index 00ea7bd..d550538 100755
--- a/t/t2000-sync.sh
+++ b/t/t2000-sync.sh
@@ -117,7 +117,7 @@ test_expect_success \
'
[ "$(echo $(stg series --applied --noprefix))" = "p1" ] &&
[ "$(echo $(stg series --unapplied --noprefix))" = "p2 p3" ] &&
- stg resolved -a &&
+ git add --update &&
stg refresh &&
stg goto p3
[ "$(echo $(stg series --applied --noprefix))" = "p1 p2 p3" ] &&
@@ -135,7 +135,7 @@ test_expect_success \
'
[ "$(echo $(stg series --applied --noprefix))" = "p1 p2 p3" ] &&
[ "$(echo $(stg series --unapplied --noprefix))" = "" ] &&
- stg resolved -a &&
+ git add --update &&
stg refresh &&
[ "$(echo $(stg series --applied --noprefix))" = "p1 p2 p3" ] &&
[ "$(echo $(stg series --unapplied --noprefix))" = "" ]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [StGit PATCH] Remove the resolved command
2009-05-29 21:30 [StGit PATCH] Remove the resolved command Catalin Marinas
@ 2009-05-31 8:21 ` Karl Hasselström
0 siblings, 0 replies; 2+ messages in thread
From: Karl Hasselström @ 2009-05-31 8:21 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
On 2009-05-29 22:30:13 +0100, Catalin Marinas wrote:
> This command simply duplicates the "git add" or "git mergetool"
> commands for handling conflicts.
>
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Karl Hasselström <kha@treskal.com>
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-31 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-29 21:30 [StGit PATCH] Remove the resolved command Catalin Marinas
2009-05-31 8:21 ` Karl Hasselström
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).