From: Pavel Roskin Date: Sun, 15 Jan 2006 06:03:35 GMT Subject: Re: [PATCH] cg-seek should not complain if run twice Message-ID: <20060115010335.dj4swocs000k008o@webmail.spamcop.net> In-Reply-To: <20060114233037.GA28365@pasky.or.cz> Hello, Petr! Quoting Petr Baudis : > It seems cleaner to just make cg-seek fail with a sensible error message > if it's already unseeked. I don't like this. What if "cvs up -A" would fail if run twice? What if cg-clean would fail if there was nothing to clean? What if sync would fail if it didn't cause a single disk write? Idempotent operations are easier to work with. Please see http://en.wikipedia.org/wiki/Idempotent_(software) I could make an exception for the case when the command invocation indicates that the user is unaware of something, and that it would endanger the user's data. But it's not the case for cg-seek without arguments on non-seeked repository. The intention is clear, and the knowledge of the current state of the repository doesn't matter, since there will be no merge or something. -- Regards, Pavel Roskin