[prev in list] [next in list] [prev in thread] [next in thread]
List: openpkg-cvs
Subject: [CVS] OpenPKG: openpkg-src/monotone/ monotone.patch.rse
From: "Ralf S. Engelschall" <rse () openpkg ! org>
Date: 2007-10-30 8:13:24
Message-ID: 20071030081324.5911E1B5047 () master ! openpkg ! org
[Download RAW message or body]
OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: rse@openpkg.org
Module: openpkg-src Date: 30-Oct-2007 09:13:23
Branch: HEAD Handle: 2007103008132300
Modified files:
openpkg-src/monotone monotone.patch.rse
Log:
allow one to store the base branch information in either an attribute
or a file
Summary:
Revision Changes Path
1.4 +23 -12 openpkg-src/monotone/monotone.patch.rse
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/monotone/monotone.patch.rse
============================================================================
$ cvs diff -u -r1.3 -r1.4 monotone.patch.rse
--- openpkg-src/monotone/monotone.patch.rse 29 Oct 2007 17:20:54 -0000 1.3
+++ openpkg-src/monotone/monotone.patch.rse 30 Oct 2007 08:13:23 -0000 1.4
@@ -51,8 +51,8 @@
patch(1) to clearly identify the file to patch.
o extra-commands:
- This adds "mtn fuse", "mtn conflicts" and "mtn revision" commands.
- They are all simple but convenient Lua wrappers.
+ This adds "mtn fuse", "mtn conflicts", "mtn revision" and "mtn base"
+ commands. They are all simple but convenient Lua wrappers.
o dot-mtn-message:
Support a ".mtn-message" file in the root-directory as a template
@@ -531,7 +531,7 @@
===================================================================
Index: std_hooks.lua
--- std_hooks.lua a53348ca15431cc67266c65e6215640f6f55eee7
-+++ std_hooks.lua 2bf9ca9c0181225388eba671beb3d6ca05fe8089
++++ std_hooks.lua 916cd22d3934d696d72799215b5e579e0b0ea899
@@ -284,6 +284,15 @@ function edit_comment(basetext, user_log
if user_log_message == "" or string.sub(user_log_message, -1) ~= "\n" then
tmp:write("\n")
@@ -548,7 +548,7 @@
tmp:write(basetext)
io.close(tmp)
-@@ -1175,3 +1184,153 @@ end
+@@ -1175,3 +1184,164 @@ end
netsync_notifiers[precedence] = notifier
return true, warning
end
@@ -644,7 +644,8 @@
+ "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 " ..
-+ "in the \".mtn-base\" file in the workspace root directory.",
++ "either in the \"mtn:base\" attribute of the root directory " ..
++ "or in a \".mtn-base\" file in the root directory.",
+ "command_base"
+)
+function command_base(op)
@@ -658,18 +659,28 @@
+ return
+ end
+
-+ -- determine current branch of workspace and base base
-+ local rc, branch_this = mtn_automate("get_option", "branch")
-+ if branch_this ~= nil then
-+ branch_this = string.match(branch_this, "^%s*(%S+)%s*$")
++ -- determine current branch of workspace
++ local branch_this = nil
++ local rc, txt = mtn_automate("get_option", "branch")
++ if txt ~= nil then
++ branch_this = string.match(txt, "^%s*(%S+)%s*$")
+ end
+ if branch_this == nil then
+ io.stderr:write("mtn: base: ERROR: failed to determine current branch\n")
+ return
+ end
-+ local branch_base = read_contents_of_file(".mtn-base", "r")
-+ if branch_base ~= nil then
-+ branch_base = string.match(branch_base, "^%s*(%S+)%s*$")
++
++ -- determine base branch of workspace
++ local branch_base = nil
++ local rc, txt = mtn_automate("get_attributes", ".")
++ if txt ~= nil then
++ branch_base = string.match(txt, "attr%s+\"mtn:base\"%s+\"([^\"]+)\"")
++ end
++ if branch_base == nil then
++ local txt = read_contents_of_file(".mtn-base", "r")
++ if txt ~= nil then
++ branch_base = string.match(txt, "^%s*(%S+)%s*$")
++ end
+ end
+ if branch_base == nil then
+ io.stderr:write("mtn: base: ERROR: failed to determine base branch\n")
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List openpkg-cvs@openpkg.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic