bugmonotone - Bugs: bug #15981, Output of `monotone automate...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15981: Output of `monotone automate inventory` doesn't lists dropped dirs correctly

Submitted by:  None
Submitted on:  Fri 03 Mar 2006 11:19:17 PM UTC  
 
Category: command line UISeverity: 3 - Normal
Item Group: incorrect behaviorStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed
mtn version --full: 

monotone 0.26pre2 (base revision: 9ca37b918cb5309d8d3b0be000dc8a1151df262f)
Running on: Linux 2.6.14-1.1637_9.rhfc4.cubbi_swsusp2 #1 Fri Nov 25 17:06:18 CET 2005 i686
Changes since base revision: unknown

Generated from data cached in the distribution;
further changes may have been made.

Generated from data cached in the distribution;
further changes may have been made.

Generated from data cached in the distribution;
further changes may have been made.

Generated from data cached in the distribution;
further changes may have been made.

Generated from data cached in the distribution;
further changes may have been made.

Sun 25 Nov 2007 04:00:44 PM UTC, comment #2:

I believe this should be fixed now.

Timothy Brownawell <tbrownaw>
Project Member
Fri 03 Mar 2006 11:26:54 PM UTC, comment #1:

Thanks for the bug report. Here's a few details for whoever looks at this bug (the solution is not immediately clear to me).

In automate_inventory, we do:
if (curr.has_node(i->first))
{
// explicitly skip the root dir for now...
// the trailing / dir format isn't going to work here
node_t n = curr.get_node(i->first);
if (is_root_dir_t(n)) continue;
if (is_dir_t(n)) path_suffix = "/";
}
else if (directory_exists(file_path(i->first)))
{
path_suffix = "/";
}

which will obviously do the wrong thing (i.e. not print a trailing slash) for a dropped directory that has also been removed from the underlying filesystem. There is a FIXME comment further down in automate_inventory that mentions a similar case:
// FIXME: it's possible that a directory was deleted and a file was added
// in it's place (or vice-versa) so we need something like pre/post node
// type indicators rather than a simple path suffix! ugh.

Matthew Gregan <kinetik>
Project Member
Fri 03 Mar 2006 11:19:17 PM UTC, original submission:

Normally, if automate inventory is called, each listed directory has a trailing slash to distinguish dirs from normal files.

If a directory has been dropped and automate inventory is called again, this trailing slash is missing, thus the item can no longer be identified as directory.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tbrownaw (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 25 Nov 2007 04:00:44 PM UTCtbrownawStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 03 Mar 2006 11:27:44 PM UTCtommydCarbon-Copy-=>Added tommyd

    Back to the top


    Powered by Savane 3.1-cleanup1