git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Notes for CVS Converts
@ 2005-08-31 19:08 Jon Loeliger
  2005-09-21 14:04 ` Petr Baudis
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Loeliger @ 2005-08-31 19:08 UTC (permalink / raw)
  To: Git List

Guys,

I was recently bitten by a cg-rm behavior where
it silently Did The Wrong Thing, IMO.  I think
that other CVS Converts might stumble across the
same pitfall, so it might warrant a comment in
the documentation, perhaps in the "Notes For CVS
Users" section.

I am in the process of doing some file merging,
resulting in some files being eliminated from my
source tree.  But I wasn't prepared to just out-right
delete my original files until some testing had
been completed first.  So I moved my files out of
the way so the build would proceed without them.

Later, when I was satisfied the build was good, I
executed a "cg-rm floof/somefile.h" and then cg-commit'ed
them.  However, I realized, they were not actually
removed from the cache.

Reading through "cg-rm", I figured out that it expected
to actually rm the files from the filesystem after first
proving they existed with a "find".  That in turn also
drove the "git-cache-update --force-remove".

However, in my case I had already moved/removed the
original files.  The "find" didn't find them and the
cache update didn't happen.  And no output was generated
either.  But I thought nothing of it; after all, "rm"
doesn't produce output when it works successfully.

So two possible suggestions here:

First, perhaps cg-rm should issue a warning if the
generated temporary file results in an empty list of
files to be removed (and then maybe with a --silent
option subsequently?),

Secondly, maybe the documentation needs a section with
"Notes for CVS Converts" section that clearly states
that cg-rm _expects_ to actually remove the file from
the filesystem, directly opposite the normal CVS behavior.

Thanks,
jdl

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Notes for CVS Converts
  2005-08-31 19:08 Notes for CVS Converts Jon Loeliger
@ 2005-09-21 14:04 ` Petr Baudis
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Baudis @ 2005-09-21 14:04 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: Git List

Dear diary, on Wed, Aug 31, 2005 at 09:08:36PM CEST, I got a letter
where Jon Loeliger <jdl@freescale.com> told me that...
> Guys,
> 
> I was recently bitten by a cg-rm behavior where
> it silently Did The Wrong Thing, IMO.  I think
> that other CVS Converts might stumble across the
> same pitfall, so it might warrant a comment in
> the documentation, perhaps in the "Notes For CVS
> Users" section.

Thanks for this, I changed the default to not deleting the files.

> However, in my case I had already moved/removed the
> original files.  The "find" didn't find them and the
> cache update didn't happen.  And no output was generated
> either.  But I thought nothing of it; after all, "rm"
> doesn't produce output when it works successfully.

There was a bug like that, but I believe it was already fixed in the
release available by the time you were writing this mail.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-21 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 19:08 Notes for CVS Converts Jon Loeliger
2005-09-21 14:04 ` Petr Baudis

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.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).