info-cvs
[Top][All Lists]
Advanced

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

RE: Checking if two versions are the same


From: Zieg, Mark
Subject: RE: Checking if two versions are the same
Date: Thu, 12 Jun 2003 10:59:19 -0400

Um, yeah, or you could just compare "tag-name" to the tag associated with
your current sandbox:

$ awk -FN '{print $2}' < CVS/Tag


-----Original Message-----
From: Reinstein, Shlomo [mailto:address@hidden
Sent: Thursday, June 12, 2003 3:51 AM
To: address@hidden
Subject: Checking if two versions are the same


Hi,

I have a tag name, and a working directory of some project (without a sticky
tag). I want to know if the tag name denotes the same version as my working
directory. What is the right way to find out?

Suppose that I have just checked-out this working directory (i.e. only the
files from CVS are in the working directory, and I have not touched them) -
is the following algorithm correct?
1. Run: cvs -qn update -r tag-name
2. If this command had no output at all, then the tag name denotes the same
as the checked-out version. If the command had output (either on stdout or
on stderr), then the tag name denotes a different version.
[ In any case, I would prefer a simpler solution, in which I don't need to
check stderr, and preferrably even not stdout, only the exit status of a
command. This is because the algorithm needs to run in several environments.
]

Thanks,
Shlomo




reply via email to

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