monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] mtn automate get_current_revision_id - bug or featu


From: Richard Levitte
Subject: Re: [Monotone-devel] mtn automate get_current_revision_id - bug or feature?
Date: Thu, 20 Sep 2007 16:16:52 +0200 (CEST)

In message <address@hidden> on Thu, 20 Sep 2007 15:42:42 +0200, Thomas Keller 
<address@hidden> said:

me> Nuno Lucas schrieb:
me> > The problem is that if there are no changes to the working space,
me> > get_current_revision_id outputs some "bogus" ID, which have no value
me> > to me, as there are no changes.
me> > 
me> > Is this a feature or a bug? Shouldn't the current_revision_id be equal
me> > to the base_revision_id if there are no changes? After all I can't
me> > commit an empty revision, so why the "bogus" id?
me> > 
me> > What do you think?
me> 
me> Well, the current workspace revision (this is the one which is
me> returned by this command) is calculated from the hash of
me> _MTN/revision.

Please check the facts before you say something:

  : ; mtn automate get_current_revision_id
  da759e75171067bdd47e669e2f011423e90642ab
  : ; mtn automate get_revision
  format_version "1"
  
  new_manifest [8ddd34dbb39addfb25019d18be26b8bcbcf78994]
  
  old_revision [3da5f4162beb8a5c8886f8c7f2c915fa638fc845]
  : ; cat _MTN/revision 
  format_version "1"
  
  new_manifest [0000000000000000000000000000000000000002]
  
  old_revision [3da5f4162beb8a5c8886f8c7f2c915fa638fc845]
  : ; mtn automate get_revision|openssl sha1
  da759e75171067bdd47e669e2f011423e90642ab
  : ; cat _MTN/revision |openssl sha1
  4301630814dbf4628a670344498c0fb5e3d67daa

me> So, the only way (currently) to determine if the current workspace
me> has changes or not, is to look at the output of mtn au
me> get_revision. If this contains a dummy new_manifest stanza, then
me> you're good to go.

As my output showed, this is false.

However, if that's good enough, you can use 'mtn list changed' and see
if it outputs any lines.

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         address@hidden
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]