Re: [Monotone-devel] automate get_current_revision failing

2009-03-09 Thread Zbigniew Zagórski
2009/3/9 Thomas Moschny thomas.mosc...@gmx.de:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi!

 Zbigniew Zagórski wrote:
 2009/3/7 Thomas Moschny thomas.mosc...@gmx.de:
 In f62181ae.. someone made mtn automate get_current_revision fail in

 Apologies, it was me :/

 Just curious: What was the idea/intention behind it?

Memory is short, sorry. This change was intentional. See the thread:

  
http://thread.gmane.org/gmane.comp.version-control.monotone.devel/13632/focus=13872

According to this discussion revision can't be empty ... because it
doesn't make sense.

I have to think a little about this ...

Regards,
-- 
Zbigniew Zagórski
/ software developer / geek / http://zbigg.blogspot.com /


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


Fwd: [Monotone-devel] automate get_current_revision failing

2009-03-09 Thread Zbigniew Zagórski
Hello,

2009/3/7 Thomas Moschny thomas.mosc...@gmx.de:
 In f62181ae.. someone made mtn automate get_current_revision fail in

Apologies, it was me :/

 case the workspace is clean, and the revision is trivial (empty
 changeset). I don't see why this should fail, and furthermore, it breaks
  the logic that makes mtn revision --full display changes made against
 the base revision.

 So, I'd like to partially revert that (see patched attached).

 Any objections?

Absolutely no. It was stupid mistake. Strange that spotting this took
a whole year ...

Please fix it as i don't have any workable monotone build site
(landing of ...stripped has complicated build ...)

--
Zbigniew Zagórski
/ software developer / geek / http://zbigg.blogspot.com /



-- 
Zbigniew Zagórski
/ software developer / geek / http://zbigg.blogspot.com /


___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel


[Monotone-devel] automate get_current_revision failing

2009-03-06 Thread Thomas Moschny
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi!

In f62181ae.. someone made mtn automate get_current_revision fail in
case the workspace is clean, and the revision is trivial (empty
changeset). I don't see why this should fail, and furthermore, it breaks
 the logic that makes mtn revision --full display changes made against
the base revision.

So, I'd like to partially revert that (see patched attached).

Any objections?

- - Thomas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmxsbcACgkQm/6MhNYca5jodgCggs5JkIahd2/C66oLXC/d5QgA
sDoAn32ZHxIB2swDfYHeUFEx7iGshamO
=zV9Z
-END PGP SIGNATURE-
#
# old_revision [d24b59732a5b3293592457cba013c8f8b716a875]
#
# patch automate.cc
#  from [63b44f3c2366f52a040cc8d0029ffc1d896740d9]
#to [4a5ef4b00f72c0c766b65bcf4d26fce3c662cbfc]
# 
# patch monotone.texi
#  from [50c10e49ae961d0b36374f02b09b5af2fab9cb00]
#to [d562dab57e07e0822e54af0b40dea69881c085c5]
# 
# patch tests/automate_get_current_revision/__driver__.lua
#  from [a56d2598ca7be71521f38b0a577baa92fbf55022]
#to [febb7bc6adea00e46e2f0e932ec3f939badab4a2]
#

--- automate.cc	63b44f3c2366f52a040cc8d0029ffc1d896740d9
+++ automate.cc	4a5ef4b00f72c0c766b65bcf4d26fce3c662cbfc
@@ -1260,8 +1260,7 @@ CMD_AUTOMATE(get_revision, N_(REVID),
 // Added in: 7.0
 // Purpose: Outputs (an optionally restricted) revision based on
 //  changes in the current workspace
-// Error conditions: If there are no changes in the current workspace or the
-// restriction is invalid or has no recorded changes, prints an error message
+// Error conditions: If the restriction is invalid, prints an error message
 // to stderr and exits with status 1. A workspace is required.
 CMD_AUTOMATE(get_current_revision, N_([PATHS ...]),
  N_(Shows change information for a workspace),
@@ -1293,7 +1292,6 @@ CMD_AUTOMATE(get_current_revision, N_([
   make_restricted_revision(old_rosters, new_roster, mask, rev,
excluded, join_words(execid));
   rev.check_sane();
-  E(rev.is_nontrivial(), origin::user, F(no changes to commit));
 
   calculate_ident(rev, ident);
   write_revision(rev, dat);

--- monotone.texi	50c10e49ae961d0b36374f02b09b5af2fab9cb00
+++ monotone.texi	d562dab57e07e0822e54af0b40dea69881c085c5
@@ -7716,9 +7716,8 @@ @section Automation
 
 @item Error conditions:
 
-If the command is executed outside of a workspace, there are no changes in the
-current workspace or the restriction is invalid or has no recorded changes,
-prints an error message to stderr and exits with status 1.
+If the command is executed outside of a workspace, or the restriction is
+invalid, prints an error message to stderr and exits with status 1.
 
 @end table
 

--- tests/automate_get_current_revision/__driver__.lua	a56d2598ca7be71521f38b0a577baa92fbf55022
+++ tests/automate_get_current_revision/__driver__.lua	febb7bc6adea00e46e2f0e932ec3f939badab4a2
@@ -6,8 +6,7 @@ check(mtn(commit, --date=2005-05-21T1
   --branch=testbranch, --message=blah-blah), 0, false, false) 
   
 -- ensure clear workspace fails wih error
-check(mtn(automate, get_current_revision), 1, true, false)
-check(fsize(stdout) == 0)
+check(mtn(automate, get_current_revision), 0, true, false)
 
 addfile(foox, blah\n)
 addfile(barx, blah2\n)


get_current_revision.patch.sig
Description: Binary data
___
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel