unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Julio Merino <jmmv84@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Dan Nicolaescu <dann@gnu.org>, era eriksson <era@iki.fi>,
	6513@debbugs.gnu.org
Subject: bug#6513: vc-mtn broken with monotone 0.48 (can't even open files)
Date: Sun, 5 Sep 2010 13:02:36 +0100	[thread overview]
Message-ID: <5666743B-2157-4D9C-A2AC-0013D052C2A4@gmail.com> (raw)
In-Reply-To: <87occd8hbe.fsf@stupidchicken.com>

On Sep 4, 2010, at 8:00 PM, Chong Yidong wrote:

> Julio Merino <jmmv84@gmail.com> writes:
> 
>>> Do you want to take a stab at it?
>>> Just need to modify the parser for the mtn command...
>> 
>> Sure, and I actually even tried.  But it's not as easy as changing
>> some regexps... my elisp knowledge tends to zero.  The thing is that
>> the automate interface is good for automatic interaction, but its
>> output is completely different to what the interactive interface
>> provides.  Hence, some of the assumptions currently in the code make
>> it a bit harder to adjust...
> 
> If you provide several precise examples of the monotone output, someone
> else could try.

OK, here they go.  I'm listing all the different calls to mtn that I found in vc-mtn, what they are being used for, and what they should be instead.

As I mentioned above, the code should be using "mtn automate" instead of the commands directly, because the output of the automate subcommands is designed to be parseable and to remain stable.

Hope this helps.

===> mtn status

This is currently used to determine:

1) The state of a file.
2) The state of a directory.
3) The current branch name.
4) The identifier of the parent revision.

Its output in 0.48 is something like:

---- begin ----
$ mtn status
----------------------------------------------------------------------
Revision: 74b28934c805d0f851ddf65b506b2b294b28bd1f
Parent:   fae253a2ecad09ee873d95fae7c53148708d5496
Author:   jmmv@NetBSD.org
Date:     09/05/10 12:41:28
Branch:   testing

Changes against parent fae253a2ecad09ee873d95fae7c53148708d5496

  dropped  dir2
  dropped  dir2/bar
  dropped  file2
  renamed  dir1
       to  dir3
  renamed  file1
       to  file3
  added    dir4
  added    dir4/baz
  added    file4
  patched  file0

---- end ----

1, 2 and 4 should be obtained using "mtn automate get_current_revision":

---- begin ----
$ mtn automate get_current_revision
format_version "1"

new_manifest [ebc50c8bd814864861acc5a3cbf8596e2f6424ca]

old_revision [fae253a2ecad09ee873d95fae7c53148708d5496]

delete "dir2"

delete "dir2/bar"

delete "file2"

rename "dir1"
    to "dir3"

rename "file1"
    to "file3"

add_dir "dir4"

add_file "dir4/baz"
 content [da39a3ee5e6b4b0d3255bfef95601890afd80709]

add_file "file4"
 content [da39a3ee5e6b4b0d3255bfef95601890afd80709]

patch "file0"
 from [da39a3ee5e6b4b0d3255bfef95601890afd80709]
   to [c2dfb20012cea6a8088917c6edea86db619000c8]
---- end ----

To get 3, aka the current branch name, one has to obtain the old_revision value from the output above and run "mtn automate certs" on it, to later get the value of the "branch" certificate:

---- begin ----
mtn automate certs fae253a2ecad09ee873d95fae7c53148708d5496
      key [6ea96157b01677a59e263d6b82337b781ce57370]
signature "ok"
     name "author"
    value "jmmv@NetBSD.org"
    trust "trusted"

      key [6ea96157b01677a59e263d6b82337b781ce57370]
signature "ok"
     name "branch"
    value "testing"
    trust "trusted"

      key [6ea96157b01677a59e263d6b82337b781ce57370]
signature "ok"
     name "changelog"
    value "Another.
"
    trust "trusted"

      key [6ea96157b01677a59e263d6b82337b781ce57370]
signature "ok"
     name "date"
    value "2010-09-05T09:08:42"
    trust "trusted"
---- end ----

===> mtn cat -r

Use "mtn -r <revision id> automate get_file_of <filename>" instead.

===> mtn list tags

Use "mtn automate tags":

---- begin ----
$ mtn automate tags
     tag "atf-0.1"
revision [b5177db1b525d850f0df932506cf6a0910eb1696]
  signer [6ea96157b01677a59e263d6b82337b781ce57370]
branches "org.NetBSD.atf.src"

     tag "atf-0.10"
revision [bab5e0f99e767de2e6650bf3c1aa7a7aad23a915]
  signer [6ea96157b01677a59e263d6b82337b781ce57370]
branches "org.NetBSD.atf.src"

     tag "atf-0.2"
revision [d448334ad6893ecd494228e8d5555272adcc5643]
  signer [6ea96157b01677a59e263d6b82337b781ce57370]
branches "org.NetBSD.atf.src"
[... more similar entries ...]
---- end ----

===> mtn list branches

Use "mtn automate branches":

---- begin ----
$ mtn automate branches
org.NetBSD.atf.htdocs
org.NetBSD.atf.src
org.NetBSD.atf.src.doc
org.NetBSD.atf.src.reorg
---- end ----

===> mtn add
===> mtn commit -m
===> mtn revert
===> mtn log
===> mtn diff
===> mtn annotate
===> mtn complete revision

Can't find how to do these with the automate interface, so they should remain as they are.






  reply	other threads:[~2010-09-05 12:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25  9:16 bug#6513: vc-mtn broken with monotone 0.48 (can't even open files) Julio Merino
2010-06-25 21:34 ` Dan Nicolaescu
2010-06-26 22:27 ` Stefan Monnier
2010-06-26 23:45   ` Julio Merino
2010-07-10 15:20     ` Julio Merino
2010-09-02  7:19 ` era eriksson
2010-09-02  8:47   ` Julio Merino
2010-09-03 15:57     ` Dan Nicolaescu
2010-09-03 16:02       ` Julio Merino
2010-09-04 19:00         ` Chong Yidong
2010-09-05 12:02           ` Julio Merino [this message]
2012-01-06 21:30 ` Douglas Dickinson
2022-05-06 19:35 ` bug#6513: bug#7171: vc-mtn to use "mtn automate" Lars Ingebrigtsen
2022-05-06 19:47   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-06 20:41   ` Glenn Morris
2022-05-06 20:43     ` Lars Ingebrigtsen
2022-06-04 12:16       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5666743B-2157-4D9C-A2AC-0013D052C2A4@gmail.com \
    --to=jmmv84@gmail.com \
    --cc=6513@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=dann@gnu.org \
    --cc=era@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).