OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 08-May-2008 23:28:29
Branch: HEAD Handle: 2008050822282900
Modified files:
openpkg-src/monotone monotone.patch.rse monotone.spec
Log:
add a convenient 'mtn setup-local' command
Summary:
Revision Changes Path
1.8 +39 -2 openpkg-src/monotone/monotone.patch.rse
1.37 +1 -1 openpkg-src/monotone/monotone.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/monotone/monotone.patch.rse
============================================================================
$ cvs diff -u -r1.7 -r1.8 monotone.patch.rse
--- openpkg-src/monotone/monotone.patch.rse 11 Apr 2008 20:24:40 -0000
1.7
+++ openpkg-src/monotone/monotone.patch.rse 8 May 2008 21:28:29 -0000
1.8
@@ -593,7 +593,7 @@
===================================================================
Index: std_hooks.lua
--- std_hooks.lua 9fd3160c435eff59acc8622875047304e3472b9c
-+++ std_hooks.lua 2f74359039d3ecc4b13d8b9cc9c561413323fb56
++++ std_hooks.lua daa4c14ed6e56a68a145b8a0baf6e28ae5230940
@@ -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")
@@ -610,7 +610,7 @@
tmp:write(basetext)
io.close(tmp)
-@@ -1257,3 +1266,164 @@ end
+@@ -1257,3 +1266,201 @@ end
return push_hook_functions(notifier)
end
end
@@ -773,6 +773,43 @@
+ return
+end
+
++-- extra command: "mtn setup-local"
++register_command(
++ "setup-local", "BRANCH",
++ "Place local directory under local version control.",
++ "Creates a new _MTN/mtn.db database and places the local " ..
++ "directory tree under version control using this database.",
++ "command_setup_local"
++)
++function command_setup_local(branch)
++ -- sanity check command line
++ if branch == nil then
++ io.stderr:write("mtn: setup-local: ERROR: no branch specified\n")
++ return
++ end
++
++ -- create new database
++ execute("mtn", "--db=mtn.db", "db", "init")
++
++ -- place current directory under version control
++ execute("mtn", "--db=mtn.db", "setup", "-b", branch)
++
++ -- use alternative book-keeping directory name
++ execute("mv", "_MTN", ".mtn")
++
++ -- place database into book-keeping directory
++ execute("mv", "mtn.db", ".mtn/mtn.db")
++ local txt = read_contents_of_file(".mtn/options")
++ txt = string.gsub(txt, "database \"[^\"]*\"", "database
\".mtn/mtn.db\"")
++ options = io.open(".mtn/options", "w")
++ options:write(txt)
++ io.close(options)
++
++ -- perform a simple operation so that Monotone
++ -- updates the book-keeping directory
++ execute("sh", "-c", "mtn stat >/dev/null 2>&1")
++end
++
+-- #endif
+
===================================================================
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/monotone/monotone.spec
============================================================================
$ cvs diff -u -r1.36 -r1.37 monotone.spec
--- openpkg-src/monotone/monotone.spec 22 Apr 2008 06:20:23 -0000
1.36
+++ openpkg-src/monotone/monotone.spec 8 May 2008 21:28:29 -0000
1.37
@@ -32,7 +32,7 @@
Group: SCM
License: GPL
Version: 0.40
-Release: 20080422
+Release: 20080508
# package options
%option with_rse yes
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]