[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone: 638fcfaa13e634672cfca872b84
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone: 638fcfaa13e634672cfca872b84448bb1d785ba2 |
Date: |
Sun, 13 May 2012 02:53:19 +0200 (CEST) |
revision: 638fcfaa13e634672cfca872b84448bb1d785ba2
date: 2012-05-13T00:49:17
author: address@hidden
branch: net.venge.monotone
changelog:
resolve issue 202
* src/cmd_conflicts.cc (CMD resolve_first): check arg count
* src/unix/fs.cc: add missing header
* test/func/resolve_conflicts_errors/__driver__.lua: test 'resolve_first' wrong
arg count error message
manifest:
format_version "1"
new_manifest [620be011a8d5ad59e5faf9ad8e83b0498797013d]
old_revision [e32ffd851f457a4a7bc651877a6cc9d18066b08b]
patch "src/cmd_conflicts.cc"
from [ad9dc74c27d4d8c50a74e5825ec9e0a12cdc1b09]
to [4e9e8ec8d121a0cab4789071e9a208c9f1f3f05c]
patch "src/unix/fs.cc"
from [cd0a6fb223a4351035c3d2c32a5d4dafc609ba91]
to [f51cae4dbc5589b0add4f7b9b649fde3c83d1220]
patch "test/func/resolve_conflicts_errors/__driver__.lua"
from [4911dc65645a5af929cd990eef09c97146e60d17]
to [9a130c83d4a7e3545f18d089542603c8d0bb72fa]
============================================================
--- src/cmd_conflicts.cc ad9dc74c27d4d8c50a74e5825ec9e0a12cdc1b09
+++ src/cmd_conflicts.cc 4e9e8ec8d121a0cab4789071e9a208c9f1f3f05c
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 - 2010 Stephen Leake <address@hidden>
+// Copyright (C) 2008 - 2010, 2012 Stephen Leake <address@hidden>
//
// This program is made available under the GNU GPL version 2.0 or
// greater. See the accompanying file COPYING for details.
@@ -480,6 +480,7 @@ CMD(resolve_first, "resolve_first", "",
database db(app);
conflicts_t conflicts (db, app.opts.conflicts_file);
+ E(args.size() == 1, origin::user, F("wrong number of arguments"));
set_first_conflict(db, app.lua, conflicts, args, neither);
conflicts.write (db, app.lua, app.opts.conflicts_file);
============================================================
--- src/unix/fs.cc cd0a6fb223a4351035c3d2c32a5d4dafc609ba91
+++ src/unix/fs.cc f51cae4dbc5589b0add4f7b9b649fde3c83d1220
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <dirent.h>
+#include <cstdlib>
#include "../sanity.hh"
#include "../platform.hh"
============================================================
--- test/func/resolve_conflicts_errors/__driver__.lua 4911dc65645a5af929cd990eef09c97146e60d17
+++ test/func/resolve_conflicts_errors/__driver__.lua 9a130c83d4a7e3545f18d089542603c8d0bb72fa
@@ -51,10 +51,11 @@ check(samefilestd("conflicts-attr-store-
----------
-- use old conflicts file for new merge
--- get rid of attr conflict, add file content conflict
+-- get rid of attr conflict, add half of file content conflict
check(mtn("attr", "set", "simple_file", "foo", "1"), 0, nil, nil)
writefile("simple_file", "simple\ntwo\nthree\nfour\n")
commit("testbranch", "right 2")
+right_2 = base_revision()
-- attempt merge with old conflict file
check(mtn("merge", "--resolve-conflicts"), 1, nil, true)
@@ -62,19 +63,33 @@ check(samefilestd("merge-old-conflicts-f
canonicalize("stdout")
check(samefilestd("merge-old-conflicts-file", "stdout"))
+----------
+-- 'resolve_first' without resolution (issue 202)
+-- other half of file content conflict
+revert_to(left_1)
+writefile("simple_file", "simple\none\nthree\nfour\n")
+commit("testbranch", "left 2")
+left_2 = base_revision()
+
+check(mtn("conflicts", "store", left_2, right_2), 0, nil, true)
+
+check(mtn("conflicts", "resolve_first"), 1, nil, true)
+check(qgrep("wrong number of arguments", "stderr"))
+
----------
-- specify inconsistent left and right resolutions for duplicate_name
+addfile("checkout.sh", "checkout.sh left 1")
+commit("testbranch", "left 3")
+
+revert_to(right_2)
+
addfile("checkout.sh", "checkout.sh right 1")
commit("testbranch", "right 3")
-revert_to(left_1)
-addfile("checkout.sh", "checkout.sh left 1")
-commit("testbranch", "left 2")
-
check(mtn("conflicts", "store"), 0, nil, true)
-check(samelines("stderr", {"mtn: 1 conflict with supported resolutions.",
+check(samelines("stderr", {"mtn: 2 conflicts with supported resolutions.",
"mtn: stored in '_MTN/conflicts'"}))
-- invalid number of params
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone: 638fcfaa13e634672cfca872b84448bb1d785ba2,
code <=