Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6236687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:53:29+00:00 2026-05-24T10:53:29+00:00

Within my program I have a method that checks out a file but I

  • 0

Within my program I have a method that checks out a file but I need to be able to check it back in again,

 ClearCase.ClearTool CCTool = new ClearCase.ClearTool();
    ClearCase.Application m_CC = new ClearCase.Application();
    ClearCase.CCCheckedOutFile file = null;

            void GetVersions(string sourcefile, string destinationPath)
            {
                ClearCase.CCElement element = m_CC.get_Element(sourcefile);

                if (element != null)
                {
                    ClearCase.CCVersion latestVersion = null;
                    FileInfo fi = new FileInfo(sourcefile);

                    latestVersion = element.get_Version("\\main\\LATEST");
                    if (latestVersion != null)
                    {
                        ClearCase.CCBranch branch = latestVersion.Branch;
                        ClearCase.CCCheckedOutFile file = latestVersion.CheckOut(ClearCase.CCReservedState.ccReserved, "", false, ClearCase.CCVersionToCheckOut.ccVersion_SpecificVersion, true, false);
                        string path = file.ExtendedPath;
                    }
                }
            }

What this will do is check out the latest version and create it on your own branch, would there be a way of checking it back in so you are putting it on the main with a new version.

Thanks,
Berbies

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:53:29+00:00Added an answer on May 24, 2026 at 10:53 am

    Once you have CCCheckoutFile objects, you can call the checkin method on them to check them in:

    Function CheckIn([ Comment As String = "" ], 
                     [ EvenIfIdentical As Boolean = False ], 
                     [ FromPath As String = "" ], 
                     [ KeepState As CCKeepState = ccKeep ]) As CCVersion
    

    If you don’t have those objects, you need to get them first, like in this CCCheckedOutFileQuery for instance.

    Or, for just one given file, you can determine if a file is checked-out to a particular view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose that I have a Java program within an IDE (Eclipse in this case).
I have a program that requires fast performance. Within one of its inner loops,
So this might be an odd question, but I have a C# program that
I have an AppleScript program which creates XML tags and elements within an Adobe
How should I run another program from within my C program? I need to
Is it possible to use a C++ .lib file from within a C# program?
I have a program that edits images in different ways... i have a Paint
I have a Util module in my VB.NET program that has project-wide methods such
I have a program in python that includes a class that takes a function
I have an idea for a program that will do a particular job for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.