OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: r...@openpkg.org Module: openpkg-src Date: 10-Apr-2009 11:13:51 Branch: HEAD Handle: 2009041010135000 Modified files: openpkg-src/monotone monotone.patch.rse monotone.spec Log: improve mtn base command Summary: Revision Changes Path 1.13 +14 -5 openpkg-src/monotone/monotone.patch.rse 1.43 +1 -1 openpkg-src/monotone/monotone.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/monotone/monotone.patch.rse ============================================================================ $ cvs diff -u -r1.12 -r1.13 monotone.patch.rse --- openpkg-src/monotone/monotone.patch.rse 23 Mar 2009 09:36:23 -0000 1.12 +++ openpkg-src/monotone/monotone.patch.rse 10 Apr 2009 09:13:50 -0000 1.13 @@ -650,7 +650,7 @@ =================================================================== Index: std_hooks.lua --- std_hooks.lua d8c06cff3368b388f6b6268227e1432a94a3ed6f -+++ std_hooks.lua 5cc93e6944e6d8704d579efc32d9183a60a8e9e5 ++++ std_hooks.lua f7b4cd79ab47c716505b1a79b586940964a78329 @@ -304,6 +304,15 @@ function edit_comment(basetext, user_log if user_log_message == "" or string.sub(user_log_message, -1) ~= "\n" then tmp:write("\n") @@ -667,7 +667,7 @@ tmp:write(basetext) io.close(tmp) -@@ -1373,3 +1382,201 @@ end +@@ -1373,3 +1382,210 @@ end return push_hook_functions(notifier) end end @@ -759,7 +759,7 @@ + +-- extra command: "mtn base {upgrade|diff}" +register_command( -+ "base", "upgrade|diff", ++ "base", "upgrade|diff [FILENAME]", + "Upgrades or compares current branch against base branch", + "Upgrade current branch from base branch or compares current " .. + "branch against base branch. The base branch has to be stored " .. @@ -767,7 +767,7 @@ + "or in a \".mtn-base\" file in the root directory.", + "command_base" +) -+function command_base(op) ++function command_base(op, filename) + -- sanity check command line + if op == nil then + io.stderr:write("mtn: base: ERROR: no operation specified\n") @@ -777,6 +777,10 @@ + io.stderr:write("mtn: base: ERROR: either \"upgrade\" or \"diff\" operation has to be specified\n") + return + end ++ if op == "upgrade" and filename ~= nil then ++ io.stderr:write("mtn: base: ERROR: filename constraint valid for \"diff\" operation only\n") ++ return ++ end + + -- determine current branch of workspace + local branch_this = nil @@ -821,7 +825,12 @@ + end + elseif op == "diff" then + -- upgrade current branch by merging in revisions of base branch -+ local rc = execute("mtn", "diff", "-r", "h:" .. branch_base, "-r", "h:" .. branch_this) ++ local rc ++ if filename ~= nil then ++ rc = execute("mtn", "diff", "-r", "h:" .. branch_base, "-r", "h:" .. branch_this, filename) ++ else ++ rc = execute("mtn", "diff", "-r", "h:" .. branch_base, "-r", "h:" .. branch_this) ++ end + if rc ~= 0 then + io.stderr:write("mtn: base: ERROR: failed to execute \"mtn diff\"\n") + return @@ . patch -p0 <<'@@ .' Index: openpkg-src/monotone/monotone.spec ============================================================================ $ cvs diff -u -r1.42 -r1.43 monotone.spec --- openpkg-src/monotone/monotone.spec 23 Mar 2009 09:36:23 -0000 1.42 +++ openpkg-src/monotone/monotone.spec 10 Apr 2009 09:13:50 -0000 1.43 @@ -32,7 +32,7 @@ Group: SCM License: GPL Version: 0.43 -Release: 20090323 +Release: 20090410 # package options %option with_rse yes @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org