# # # patch "automate.cc" # from [247ae15efd119c9f52597031773f96fa92dae0cd] # to [e045fd011c06f5c5ef4812e8c5ef82635182b8df] # # patch "paths.cc" # from [c6db93432b452384119501c050fbc0e94f5ac91a] # to [e6b106e1074a0547c4f4c99b8aa87f233ad9e299] # # patch "paths.hh" # from [e5be6f2b0e2ee3a9e41f405b221d83b478c69844] # to [b2dbcce45edb5e8f882948c1ceb6452083604b34] # ============================================================ --- automate.cc 247ae15efd119c9f52597031773f96fa92dae0cd +++ automate.cc e045fd011c06f5c5ef4812e8c5ef82635182b8df @@ -2341,6 +2341,10 @@ automate_stdio_shared_setup(app_state & // see, because anything else would screw the stdio-encoded output if (ft == force_stdio_ticker) app.opts.ticker.unchecked_set("stdio"); + + // clear path globals set by previous commands + reset_std_paths(); + } std::pair automate_stdio_helpers:: ============================================================ --- paths.cc c6db93432b452384119501c050fbc0e94f5ac91a +++ paths.cc e6b106e1074a0547c4f4c99b8aa87f233ad9e299 @@ -1,5 +1,5 @@ // Copyright (C) 2005 Nathaniel Smith -// 2008 Stephen Leake +// 2008, 2010 Stephen Leake // // This program is made available under the GNU GPL version 2.0 or // greater. See the accompanying file COPYING for details. @@ -1078,6 +1078,17 @@ mark_std_paths_used(void) initial_rel_path.get(); } +void +reset_std_paths(void) +{ + // we don't reset initial_abs_path here, because it is only set in + // monotone.cc:cpp_main. initial_rel_path, working_root are reset for each + // command. + initial_rel_path.unset(); + working_root.unset(); +} + + /////////////////////////////////////////////////////////////////////////// // utility used by migrate_ancestry /////////////////////////////////////////////////////////////////////////// ============================================================ --- paths.hh e5be6f2b0e2ee3a9e41f405b221d83b478c69844 +++ paths.hh b2dbcce45edb5e8f882948c1ceb6452083604b34 @@ -1,5 +1,5 @@ // Copyright (C) 2005 Nathaniel Smith -// 2008 Stephen Leake +// 2008, 2010 Stephen Leake // // This program is made available under the GNU GPL version 2.0 or // greater. See the accompanying file COPYING for details. @@ -477,6 +477,9 @@ void mark_std_paths_used(void); void mark_std_paths_used(void); +// reset path globals to uninitialized; should be done for each new command. +void reset_std_paths(void); + file_path find_new_path_for(std::map const & renames, file_path const & old_path);