Results 1 to 7 of 7

Thread: identifying and rolling back a CVS committ locally

  1. #1
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    identifying and rolling back a CVS committ locally

    I've checked out a module in Gnu CVS and identified one file that I want to roll back. Aside from using the diff to unpatch, is there another way?

    Further, that one file depends on definitions in at least one other file changed during the same commit. How do I find the other files that were changed in the same commit?

  2. #2
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,172
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: identifying and rolling back a CVS committ locally

    My CVS is a bit rusty, and I've been using it mostly through the Eclipse plugin lately...

    If you have set a tag on the commit, then checkout -r {tag} will retrieve the file with that version. Checkout -D {date} will also gives you the file contents as it was in the repository at the given date. At that point CVS makes the files read-only and remember somewhere that this isn't the latest version, but there is some way to make it the current version again.

    To find the files changed on the same day, I have no better idea than running a cvs status on them and checking for the dates, unless you have been very specific when tagging them (but this is normally not a good way to use tags, that are best used across a whole project.).
    Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.

  3. #3
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: identifying and rolling back a CVS committ locally

    Ok, thanks. I'll look at dates a bit. However, it is likely that many files are changed on any given day, seeing as the module has about 65,000 regular files in all. If there is a way to identify a specific commit and the files it affects, that would be the best, I think.

  4. #4
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,588
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: identifying and rolling back a CVS committ locally

    Quote Originally Posted by Lars Noodén View Post
    Ok, thanks. I'll look at dates a bit. However, it is likely that many files are changed on any given day, seeing as the module has about 65,000 regular files in all. If there is a way to identify a specific commit and the files it affects, that would be the best, I think.
    My CVS is also very rusty and maybe this will help, but maybe this will help.
    Code:
    cvs -q diff --brief -r1.344 -r1.345  | grep Index
    I think this lists files change in revision 1.345, but I'm not sure how additions/deletions are handled.

  5. #5
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,172
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: identifying and rolling back a CVS committ locally

    But when you commit several files, each gets its ow version number, depending on its history?
    Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.

  6. #6
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: identifying and rolling back a CVS committ locally

    Yes, each file has its own, different version number.

  7. #7
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,588
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: identifying and rolling back a CVS committ locally

    Quote Originally Posted by ofnuts View Post
    But when you commit several files, each gets its ow version number, depending on its history?
    True, my mistake. I really have been away from it too long.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •