{"thread":{"id":"19598","subject":"[StGit PATCH] Remove the resolved command","startedAt":"2009-05-29T21:30:13Z","lastAt":"2009-05-31T08:21:41Z","messageCount":2,"participants":["Catalin Marinas","Karl Hasselström"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"115051","messageId":"20090529213013.8908.45041.stgit@localhost.localdomain","threadId":"19598","inReplyTo":null,"subject":"[StGit PATCH] Remove the resolved command","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2009-05-29T21:30:13Z","receivedAt":"2009-05-29T21:30:13Z","isPatch":true,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"From: Catalin Marinas <catalin.marinas@arm.com>\n\nThis command simply duplicates the \"git add\" or \"git mergetool\" commands\nfor handling conflicts.\n\nSigned-off-by: Catalin Marinas <catalin.marinas@arm.com>\n---\n Documentation/tutorial.txt |    2 +\n examples/gitconfig         |    4 --\n stgit/commands/common.py   |    2 +\n stgit/commands/push.py     |    4 +-\n stgit/commands/rebase.py   |    2 +\n stgit/commands/resolved.py |   82 --------------------------------------------\n stgit/config.py            |    1 -\n t/t0002-status.sh          |    2 +\n t/t2000-sync.sh            |    4 +-\n 9 files changed, 8 insertions(+), 95 deletions(-)\n delete mode 100644 stgit/commands/resolved.py\n\ndiff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt\nindex 8e0adbf..4aa7629 100644\n--- a/Documentation/tutorial.txt\n+++ b/Documentation/tutorial.txt\n@@ -313,7 +313,7 @@ markers.\n Now that we've resolved the conflict, we just need to tell StGit about\n it:\n \n-  $ stg resolved TODO\n+  $ git add TODO\n   $ stg status\n   M TODO\n \ndiff --git a/examples/gitconfig b/examples/gitconfig\nindex e235e14..4f56918 100644\n--- a/examples/gitconfig\n+++ b/examples/gitconfig\n@@ -17,10 +17,6 @@\n \t# Automatically sign newly created patches\n \t#autosign = Signed-off-by\n \n-\t# Set to 'yes' if you don't want to use the 'resolved' command.\n-\t# 'refresh' will automatically mark the conflicts as resolved\n-\t#autoresolved = no\n-\n \t# SMTP server for sending patches\n \t#smtpserver = /usr/sbin/sendmail -t -i\n \t#smtpserver = localhost:25\ndiff --git a/stgit/commands/common.py b/stgit/commands/common.py\nindex 1bc162f..bc8266e 100644\n--- a/stgit/commands/common.py\n+++ b/stgit/commands/common.py\n@@ -120,7 +120,7 @@ def check_head_top_equal(crt_series):\n def check_conflicts():\n     if git.get_conflicts():\n         raise CmdException('Unsolved conflicts. Please fix the conflicts'\n-                           ' then use \"resolve <files>\" or revert the'\n+                           ' then use \"git add --update <files>\" or revert the'\n                            ' changes with \"status --reset\".')\n \n def print_crt_patch(crt_series, branch = None):\ndiff --git a/stgit/commands/push.py b/stgit/commands/push.py\nindex 84a93bd..d5e02e0 100644\n--- a/stgit/commands/push.py\n+++ b/stgit/commands/push.py\n@@ -30,8 +30,8 @@ the stack. The 'push' operation allows patch reordering by commuting\n them with the three-way merge algorithm. If there are conflicts while\n pushing a patch, those conflicts are written to the work tree, and the\n command halts. Conflicts raised during the push operation have to be\n-fixed and the 'resolved' command run (alternatively, you may undo the\n-conflicting push with 'stg undo').\n+fixed and the 'git add --update' command run (alternatively, you may\n+undo the conflicting push with 'stg undo').\n \n The command also notifies when the patch becomes empty (fully merged\n upstream) or is modified (three-way merged) by the 'push' operation.\"\"\"\ndiff --git a/stgit/commands/rebase.py b/stgit/commands/rebase.py\nindex a4bc6e7..b949a5c 100644\n--- a/stgit/commands/rebase.py\n+++ b/stgit/commands/rebase.py\n@@ -31,7 +31,7 @@ Pop all patches from current stack, move the stack base to the given\n If you experience merge conflicts, resolve the problem and continue\n the rebase by executing the following sequence:\n \n-        $ stg resolved -a [-i]\n+        $ git add --update\n         $ stg refresh\n         $ stg goto top-patch\n \ndiff --git a/stgit/commands/resolved.py b/stgit/commands/resolved.py\ndeleted file mode 100644\nindex eba778d..0000000\n--- a/stgit/commands/resolved.py\n+++ /dev/null\n@@ -1,82 +0,0 @@\n-\n-__copyright__ = \"\"\"\n-Copyright (C) 2005, Catalin Marinas <catalin.marinas@gmail.com>\n-\n-This program is free software; you can redistribute it and/or modify\n-it under the terms of the GNU General Public License version 2 as\n-published by the Free Software Foundation.\n-\n-This program is distributed in the hope that it will be useful,\n-but WITHOUT ANY WARRANTY; without even the implied warranty of\n-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n-GNU General Public License for more details.\n-\n-You should have received a copy of the GNU General Public License\n-along with this program; if not, write to the Free Software\n-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n-\"\"\"\n-\n-import sys, os\n-from stgit.argparse import opt\n-from stgit.commands.common import *\n-from stgit.utils import *\n-from stgit import argparse, stack, git, basedir\n-from stgit.config import config, file_extensions\n-\n-help = 'Mark a file conflict as solved'\n-kind = 'wc'\n-usage = ['[options] [<files...>]']\n-description = \"\"\"\n-Mark a merge conflict as resolved. The conflicts can be seen with the\n-'status' command, the corresponding files being prefixed with a\n-'C'.\"\"\"\n-\n-args = [argparse.conflicting_files]\n-options = [\n-    opt('-a', '--all', action = 'store_true',\n-        short = 'Mark all conflicts as solved'),\n-    opt('-r', '--reset', metavar = '(ancestor|current|patched)',\n-        args = [argparse.strings('ancestor', 'current', 'patched')],\n-        short = 'Reset the file(s) to the given state'),\n-    opt('-i', '--interactive', action = 'store_true',\n-        short = 'Run the interactive merging tool')]\n-\n-directory = DirectoryHasRepository(needs_current_series = False, log = False)\n-\n-def func(parser, options, args):\n-    \"\"\"Mark the conflict as resolved\n-    \"\"\"\n-    args = git.ls_files(args)\n-    directory.cd_to_topdir()\n-\n-    if options.reset \\\n-           and options.reset not in file_extensions():\n-        raise CmdException, 'Unknown reset state: %s' % options.reset\n-\n-    if options.all and not options.interactive:\n-        resolved_all(options.reset)\n-        return\n-\n-    conflicts = git.get_conflicts()\n-\n-    if len(args) != 0:\n-        files = args\n-    elif options.all:\n-        files = conflicts\n-    else:\n-        parser.error('incorrect number of arguments')\n-\n-    if not conflicts:\n-        raise CmdException, 'No more conflicts'\n-\n-    # check for arguments validity\n-    if not options.all:\n-        for filename in files:\n-            if not filename in conflicts:\n-                raise CmdException, 'No conflicts for \"%s\"' % filename\n-\n-    # resolved\n-    if options.interactive:\n-        git.mergetool(files)\n-    else:\n-        git.resolved(files, options.reset)\ndiff --git a/stgit/config.py b/stgit/config.py\nindex a98c303..a3dbfa5 100644\n--- a/stgit/config.py\n+++ b/stgit/config.py\n@@ -28,7 +28,6 @@ class GitConfigException(StgException):\n \n class GitConfig:\n     __defaults={\n-        'stgit.autoresolved':\t'no',\n         'stgit.smtpserver':\t'localhost:25',\n         'stgit.smtpdelay':\t'5',\n         'stgit.pullcmd':\t'git pull',\ndiff --git a/t/t0002-status.sh b/t/t0002-status.sh\nindex ffcad77..2512c53 100755\n--- a/t/t0002-status.sh\n+++ b/t/t0002-status.sh\n@@ -145,7 +145,7 @@ A fie\n M foo/bar\n EOF\n test_expect_success 'Status after resolving the push' '\n-    stg resolved -a &&\n+    git add --update &&\n     stg status > output.txt &&\n     test_cmp expected.txt output.txt\n '\ndiff --git a/t/t2000-sync.sh b/t/t2000-sync.sh\nindex 00ea7bd..d550538 100755\n--- a/t/t2000-sync.sh\n+++ b/t/t2000-sync.sh\n@@ -117,7 +117,7 @@ test_expect_success \\\n     '\n     [ \"$(echo $(stg series --applied --noprefix))\" = \"p1\" ] &&\n     [ \"$(echo $(stg series --unapplied --noprefix))\" = \"p2 p3\" ] &&\n-    stg resolved -a &&\n+    git add --update &&\n     stg refresh &&\n     stg goto p3\n     [ \"$(echo $(stg series --applied --noprefix))\" = \"p1 p2 p3\" ] &&\n@@ -135,7 +135,7 @@ test_expect_success \\\n     '\n     [ \"$(echo $(stg series --applied --noprefix))\" = \"p1 p2 p3\" ] &&\n     [ \"$(echo $(stg series --unapplied --noprefix))\" = \"\" ] &&\n-    stg resolved -a &&\n+    git add --update &&\n     stg refresh &&\n     [ \"$(echo $(stg series --applied --noprefix))\" = \"p1 p2 p3\" ] &&\n     [ \"$(echo $(stg series --unapplied --noprefix))\" = \"\" ]\n"},{"id":"115120","messageId":"20090531082141.GB17719@diana.vm.bytemark.co.uk","threadId":"19598","inReplyTo":"20090529213013.8908.45041.stgit@localhost.localdomain","subject":"Re: [StGit PATCH] Remove the resolved command","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2009-05-31T08:21:41Z","receivedAt":"2009-05-31T08:21:41Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2009-05-29 22:30:13 +0100, Catalin Marinas wrote:\n\n> This command simply duplicates the \"git add\" or \"git mergetool\"\n> commands for handling conflicts.\n>\n> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>\n\nAcked-by: Karl Hasselström <kha@treskal.com>\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}