{"id":117,"date":"2026-10-12T08:41:33","date_gmt":"2026-10-12T08:41:33","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2009\/01\/30\/common-problems-in-cvs\/"},"modified":"2026-10-12T08:41:33","modified_gmt":"2026-10-12T08:41:33","slug":"common-problems-in-cvs","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/common-problems-in-cvs\/","title":{"rendered":"CVS Troubleshooting Guide: 5 Common Problems and Practical Fixes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you still maintain legacy CVS repositories, small workflow mistakes can quickly turn into conflicts, auth issues, or confusing history output. This revised guide explains five common problems, what causes them, and practical recovery steps you can apply in day-to-day operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Originally published on 2009-01-30; fully revised and updated.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Original post: <a href=\"https:\/\/www.devopsschool.com\/blog\/common-problems-in-cvs\/\">List of 5 Common Problems in CVS \u2013 Troubleshooting Guide<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2009\/01\/cvs-common-problems.png\" alt=\"CVS common problems\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">A practical workflow for diagnosing CVS issues<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most CVS failures are easier to fix if you classify the symptom first (conflict, authentication, history lookup, or removed file), then run targeted commands.<\/p>\n\n\n\n<pre class=\"mermaid\">\nflowchart TD\n    A[Run cvs update or cvs commit] --> B{What failed}\n    B -->|Conflict marker C| C1[Open file and resolve markers]\n    C1 --> C2[Test locally]\n    C2 --> C3[Commit resolved file]\n    B -->|Password or user mismatch| D1[Inspect CVS metadata]\n    D1 --> D2[Set your own CVS user and login]\n    B -->|Need deleted history| E1[Use log annotate and diff]\n    E1 --> E2[Recover or compare target revision]\n    B -->|File moved to Attic| F1[Find last non dead revision]\n    F1 --> F2[Recreate file add and commit]\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Problem 1: Conflict after update (status C)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When multiple developers edit the same lines, CVS marks conflicts during update. Start with a dry run so you can see status codes before modifying your workspace.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>A filename<\/code>: file added locally<\/li><li><code>M filename<\/code>: file modified locally<\/li><li><code>C filename<\/code>: content conflict that needs manual merge<\/li><\/ul>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs language-bash\">cvs -n update\ncvs update -dP<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Conflicted files contain markers. Remove the markers only after you merge both sides correctly.<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs language-text\">&lt;&lt;&lt;&lt;&lt;&lt;&lt; filename\nyour lines\n=======\nother developer lines\n&gt;&gt;&gt;&gt;&gt;&gt;&gt; current version<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Problem 2: CVS asks for your colleague\u2019s password<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This usually happens when you copied someone else\u2019s checked-out workspace. CVS metadata inside each <code>CVS\/<\/code> directory can still point to that user.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\">find . -type f -path <span class=\"hljs-string\">\"*\/CVS\/Root\"<\/span> -<span class=\"hljs-keyword\">print<\/span>\ncat path\/to\/CVS\/Root<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Preferred fix: do a fresh checkout with your own account. If you must reuse the workspace, update the Root metadata carefully and re-authenticate.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript language-bash\"><span class=\"hljs-keyword\">export<\/span> CVSROOT=:pserver:youruser@cvs.example.com:<span class=\"hljs-regexp\">\/cvsroot\/<\/span>project\ncvs login<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Problem 3: Need information about deleted lines<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>cvs annotate<\/code> shows blame-style info for lines that currently exist. To inspect lines that were removed, use revision logs and diffs between revisions.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript language-bash\">cvs annotate path\/to\/file.c\ncvs log path\/to\/file.c\ncvs diff -u -r <span class=\"hljs-number\">1.23<\/span> -r <span class=\"hljs-number\">1.24<\/span> path\/to\/file.c\ncvs update -p -r <span class=\"hljs-number\">1.23<\/span> path\/to\/file.c &gt; <span class=\"hljs-regexp\">\/tmp\/<\/span>file.c.r1<span class=\"hljs-number\">.23<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Problem 4: <code>cvs log<\/code> shows <code>+0 -0<\/code> for a revision<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Line counts in log output are not always a reliable summary of actual content change. Verify the real delta directly with <code>cvs diff<\/code> between explicit revisions.<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs language-bash\">cvs log path\/to\/file.c\ncvs status path\/to\/file.c\ncvs diff -u -r 1.10 -r 1.11 path\/to\/file.c<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Problem 5: Restore a file from Attic (DEAD state)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If a file was removed with <code>cvs remove<\/code>, CVS stores it in Attic and marks newer revisions as dead. Restoration generally means recreating working content from the last non-dead revision, then adding and committing again.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># 1) Identify last non-dead revision<\/span>\ncvs log path\/to\/foo.c\n\n<span class=\"hljs-comment\"># 2) Recreate file content from that revision (example: 1.7)<\/span>\ncvs update -p -r <span class=\"hljs-number\">1.7<\/span> path\/to\/foo.c &gt; path\/to\/foo.c\n\n<span class=\"hljs-comment\"># 3) Re-add and commit<\/span>\ncvs add path\/to\/foo.c\ncvs commit -m <span class=\"hljs-string\">\"Restore foo.c from Attic\"<\/span> path\/to\/foo.c<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Quick reference: symptoms, causes, and fixes<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Problem<\/th><th>Typical symptom<\/th><th>Likely cause<\/th><th>First commands to run<\/th><\/tr><\/thead><tbody><tr><td>Update conflict<\/td><td><code>C filename<\/code><\/td><td>Concurrent edits on same lines<\/td><td><code>cvs -n update<\/code>, then manual merge<\/td><\/tr><tr><td>Wrong password prompt<\/td><td>Auth asks for colleague account<\/td><td>Copied workspace with foreign CVS metadata<\/td><td>Inspect <code>CVS\/Root<\/code>, set your own <code>CVSROOT<\/code>, <code>cvs login<\/code><\/td><\/tr><tr><td>Need deleted line history<\/td><td>Annotate does not show removed lines<\/td><td>Annotate only covers current text<\/td><td><code>cvs log<\/code> + <code>cvs diff -r old -r new<\/code><\/td><\/tr><tr><td>Log shows <code>+0 -0<\/code><\/td><td>Unexpected line summary<\/td><td>Log counters do not always reflect expected net edits<\/td><td><code>cvs diff<\/code> between exact revisions<\/td><\/tr><tr><td>File in Attic<\/td><td>DEAD state \/ removed file<\/td><td><code>cvs remove<\/code> committed earlier<\/td><td>Find last live revision, recreate, <code>cvs add<\/code>, commit<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Best practices for legacy CVS repositories<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Prefer fresh checkouts over copying another developer\u2019s workspace.<\/li><li>Run <code>cvs -n update<\/code> before commit windows to catch conflicts early.<\/li><li>Use explicit revision numbers when investigating history or restoring content.<\/li><li>Treat Attic restores as change-controlled operations and document the source revision in commit messages.<\/li><li>Keep a small internal runbook for your team\u2019s CVS authentication and branching conventions.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This updated guide walks through five frequent CVS problems and how to resolve them safely. It includes command examples, a troubleshooting workflow, and a quick-reference table.<\/p>\n","protected":false},"author":1,"featured_media":3980,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[20],"tags":[1979,2950,1026,369,2957,2954,2956,2955,2958,2961,2962,2959,2960,2731,2951,2953,255,507,1028,2952,1509,1594,2949,670],"class_list":["post-117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cvs-concurrent-version-system","tag-common","tag-common-issues","tag-common-problems","tag-cvs","tag-cvs-common-issues","tag-cvs-common-problems","tag-cvs-issues","tag-cvs-problems","tag-cvs-troubleshooting","tag-cvs-troubleshooting-guide","tag-cvs-troubleshooting-instructions","tag-cvs-troubleshooting-techniques","tag-cvs-troubleshooting-tutorial","tag-general","tag-general-problems","tag-issues-in-cvs","tag-issues","tag-list","tag-problems","tag-problems-in-cvs","tag-resolve","tag-solutions","tag-trouble","tag-what"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":78966,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/117\/revisions\/78966"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/3980"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}