info-cvs
[Top][All Lists]
Advanced

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

Checking if two versions are the same


From: Reinstein, Shlomo
Subject: Checking if two versions are the same
Date: Thu, 12 Jun 2003 10:51:05 +0300

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]