General SCM Interview Questions

The previous chapters outlined the state of CM technology from the standpoint of a spectrum of concepts underlying automated CM, and from the standpoint of the reflection of some of these concepts in commercial CM products. Clearly, no CM product supports all CM concepts; similarly, not all CM concepts are necessary in the support of all possible end-user requirements. That is, different CM tools (and the concepts which underlie these tools) may be required by different organizations or projects, or within projects at different  phases of the software development life cycle. This observation, coupled with the observed,continuing industry effort to adopt computer-aided software engineering (CASE) tools, leads us to conclude that integration is key to providing automated CM support in software development environments.
In this chapter we define what we mean by integration by way of a three-level model of integration. We illustrate where CM integration fits into this three-level model.  e then describe the advantages and disadvantages of current approaches to achieving integration in  software development environments. We close with a brief discussion on the relationship between future integration technology and the three levels of integration.

CM Services in Software Environments: A Question of Integration

There is no concensus regarding where CM services should reside in software environment architectures, despite the diversity of approaches that have been explored. For example, CM services have been offered via:

· Tools such as RCS, SCCS, CCC.
· Operating system extensions at the file-system level such as DSEE and NSE.
· Shared data models such as in the CIS specifications [18] and the PCTE PACT [53] environment.

A further complication is the emergence of a robust CASE tool industry, wherein many popular CASE tools provide their own tool-specific repository and CM services. As a result, CM functions are increasingly provided by, and distributed across, several CASE tools in an environment.
We have found it useful to think of integration in terms of a three-level model. This model, illustrated in Figure 5-1, corresponds to the ANSI/SPARC [48] three-schema  pproach used to describe database architectures. A useful intuition is that this correspondence is more than accidental. The bottom level of integration, called “mechanism” integration, corresponds to the ANSI/SPARC physical schema level. Mechanism integration addresses the implementation aspects of software integration, including, but not limited to: software interfaces provided by the environment infrastructure, e.g., operating system or environment framework interfaces;

software interfaces provided by individual tools in the environment; and architectural aspects of the tools, such as process structure (e.g., client/server) and data management structure (derivers, data dictionary, database). In the case of CM, mechanism integration can refer to integration with CM systems such as SCCS, RCS, CCC and DSEE; and CM implementation aspects such as transparent repositories and other operating-systems level CM services.

The middle level of integration, called “services” integration, corresponds to the ANSI/SPARC logical schema level. Services refers to the high-level functions provided by tools, and integration at this level can be regarded as the specification of how services can be related in a coherent fashion. In the case of CM, these services refer to elements of the spectrum of concepts discussed in chapter 3, e.g., workspaces and transactions, and services integration constitutes a kind of unified model of CM services.

The top level of integration, called “process” integration, corresponds to the ANSI/SPARC external schema (also called “end-user”) level. Process integration can be regarded as a kind of process specification for how software will be developed; this specification can define a view of the process from many perspectives, spanning individual roles through larger organizational pespectives. In the case of CM, process integration refers to policies and procedures for carrying out CM activities.

Integration occurs within each of these levels of integration; thus, mechanisms are inte- 34 ATR grated with mechanisms, services with services, and process elements with process elements. There are also relationships that span the levels. The relationship between the mechanism level and the services level is an implementation relationship: a CM concept in  he services layer may be implemented by different tools in the mechanism level, and conversely, a single mechanism may implement more than one CM concept. The relationship between the services level and the process level is a process adaptation relationship: different CM services may be combined, and tuned, to support different process requirements.

image

This three-level model provides a working context for understanding integration. For the moment, however, existing integration technology does not match exactly this somewhat idealized model of integration. For example, many services provided by CASE tools (including CM) embed process constraints that should logically be separate, i.e., reside in the process level. Similarly, tool services are often closely coupled to particular implementation techniques.

The level of adaptability required of integrating CM—both in terms of adaptability for projectspecific requirements as well as adaptability to multiple underlying CM
implementations—pushes the limits of available environment integration techniques. The following sections describe the current state of integration technology and its limitations. The next chapter discusses how future generation integration technology can address these shortcomings.

Reference: 
The State of Automated Configuration Management.
A. Brown, S. Dart, P. Feiler, K. Wallnau

Tagged : / / / / / / / / / /

Git Interview Questions and Answer

git-interview-questions-and-answer

Q1. What is GIT?

Git is a distributed version control system and source code management (SCM) system with focus to handle small and large projects source code versions in the local repository with speed and efficiency. It is free and open source and its one of widly used versioning tools used ever worldwide.


Q2. What do you understant the repository in Git?

A repository in git, consists of .git directory which contains the each source code commited in form of objects created using SHA1 algorithms. A .git directry where git keeps all of its metadata for the source code in objects forms. It also contains the git configuration file, breanch reference and staging state of the work space.


Q. What is the command you can use to write a commit message?

The command that is used to write a commit message is “git commit –m”this is reason for commit”.  The –a on the command line instructs git to commit the new content of all tracked files that have been modified. You can use “git add <file>” before git commit –a if new files need to be committed for the first time.

In nutshell, any new changes has to added from working directory to stageing area and then commit from staging area to reposiory. Please refer the image for the same as below;


Q. What is the difference between GIT and SVN?

The difference between GIT and SVN is

  1. Git is less preferred for handling extremely large files or frequently changing binary files while SVN can handle multiple projects stored in the same repository.
  2. GIT does not support ‘commits’ across multiple branches or tags.  Subversion allows the creation of folders at any location in the repository layout.
  3. Gits are unchangeable, while Subversion allows committers to treat a tag as a branch and to create multiple revisions under a tag root.

Q. What are the advantages of using GIT?

  1. Data redundancy and replication
  2. High availability
  3. Only one.git directory per repository
  4. Superior disk utilization and network performance
  5. Collaboration friendly
  6. Any sort of projects can use GIT

Q. What language is used in GIT?

GIT is fast, and ‘C’ language makes this possible by reducing the overhead of runtimes associated with higher languages.


Q. What is the function of ‘GIT PUSH’ in GIT?

‘GIT PUSH’ updates remote refs along with associated objects.


Q. Why GIT better than Subversion?

GIT is an open source version control system; it will allow you to run ‘versions’ of a project, which show the changes that were made to the code overtime also it allows you keep the backtrack if necessary and undo those changes.  Multiple developers can checkout, and upload changes and each change can then be attributed to a specific developer.


Q. What is “Staging Area” or “Index” in GIT?

Before completing the commits, it can be formatted and reviewed in an intermediate area known as ‘Staging Area’ or ‘Index’.


Q. What is GIT stash?

GIT stash takes the current state of the working directory and index and puts in on the stack for later and gives you back a clean working directory.  So in case if you are in the middle of something and need to jump over to the other job, and at the same time you don’t want to lose your current edits then you can use GIT stash.

Q. What is GIT stash drop?

When you are done with the stashed item or want to remove it from the list, run the git ‘stash drop’ command.  It will remove the last added stash item by default, and it can also remove a specific item if you include as an argument.


Q. How will you know in GIT if a branch has been already merged into master?

Git branch—merged lists the branches that have been merged into the current branch

Git branch—no merged lists the branches that have not been merged


Q. is the function of git clone?

The git clone command creates a copy of an existing Git repository.  To get the copy of a central repository, ‘cloning’  is the most common way used by programmers.


Q. What is the function of ‘git config’?

The ‘git config’ command is a convenient way to set configuration options for your Git installation.  Behaviour of a repository, user info, preferences etc. can be defined through this command.


Q. What does commit object contain?

  1. A set of files, representing the state of a project at a given point of time
  2. Reference to parent commit objects
  3. An SHAI name, a 40 character string that uniquely identifies the commit object.

Q. How can you create a repository in Git?

In Git, to create a repository, create a directory for the project if it does not exist, and then run command “git init”. By running this command .git directory will be created in the project directory, the directory does not need to be empty.


Q. What is ‘head’ in git and how many heads can be created in a repository?

A ‘head’ is simply a reference to a commit object. In every repository, there is a default head referred as “Master”.  A repository can contain any number of heads.


Q. What is the purpose of branching in GIT?

The purpose of branching in GIT is that you can create your own branch and jump between those branches. It will allow you to go to your previous work keeping your recent work intact.


Q. What is the common branching pattern in GIT?

The common way of creating branch in GIT is to maintain one as “Main“

branch and create another branch to implement new features. This pattern is particularly useful when there are multiple developers working on a single project.


Q. How can you bring a new feature in the main branch?

To bring a new feature in the main branch, you can use a command “git merge” or “git pull command”.


Q. What is a ‘conflict’ in git?

A ‘conflict’ arises when the commit that has to be merged has some change in one place, and the current commit also has a change at the same place. Git will not be able to predict which change should take precedence.


Q. How can conflict in git resolved?

To resolve the conflict in git, edit the files to fix the conflicting changes and then add the resolved files by running “git add” after that to commit the repaired merge,  run “git commit”.  Git remembers that you are in the middle of a merger, so it sets the parents of the commit correctly.


Q. To delete a branch what is the command that is used?

Once your development branch is merged into the main branch, you don’t need development branch.  To delete a branch use, the command “git branch –d [head]”.


Q. What is another option for merging in git?

“Rebasing” is an alternative to merging in git.


Q. What is the syntax for “Rebasing” in Git?

The syntax used for rebase is “git rebase [new-commit] “


Q. What is the difference between ‘git remote’ and ‘git clone’?

‘git remote add’  just creates an entry in your git config that specifies a name for a particular URL.  While, ‘git clone’ creates a new git repository by copying and existing one located at the URI.


Q. What is GIT version control?

With the help of GIT version control, you can track the history of a collection of files and includes the functionality to revert the collection of files to another version.  Each version captures a snapshot of the file system at a certain point of time. A collection of files and their complete history are stored in a repository.


Q. Mention some of the best graphical GIT client for LINUX?

Some of the best GIT client for LINUX is

  1. Git Cola
  2. Git-g
  3. Smart git
  4. Giggle
  5. Git GUI
  6. qGit

Q. What is Subgit? Why to use Subgit?

‘Subgit’ is a tool for a smooth, stress-free SVN to Git migration.  Subgit is a solution for a company -wide migration from SVN to Git that is:

a)      It is much better than git-svn

b)      No requirement to change the infrastructure that is already placed

c)       Allows to use all git and all sub-version features

d)      Provides genuine stress –free migration experience.


Q. What is the function of ‘git diff ’ in git?

‘git diff ’ shows the changes between commits, commit and working tree etc.


Q. What is ‘git status’ is used for?

As ‘Git Status’ shows you the difference between the working directory and the index, it is helpful in understanding a git more comprehensively.


Q. What is the difference between the ‘git diff ’and ‘git status’?

‘git diff’ is similar to ‘git status’, but it shows the differences between various commits and also between the working directory and index.


Q. What is the function of ‘git checkout’ in git?

A ‘git checkout’ command is used to update directories or specific files in your working tree with those from another branch without merging it in the whole branch.


Q. What is the function of ‘git rm’?

To remove the file from the staging area and also off your disk ‘git rm’ is used.


Q. What is the function of ‘git stash apply’?

When you want to continue working where you have left your work, ‘git stash apply’ command is used to bring back the saved changes onto the working directory.


Q. What is the use of ‘git log’?

To find specific commits in your project history- by author, date, content or history ‘git log’ is used.


Q. What is ‘git add’ is used for?

‘git add’ adds file changes in your existing directory to your index.


Q. What is the function of ‘git reset’?

The function of ‘Git Reset’ is to reset your index as well as the working directory to the state of your last commit.


Q. What is git Is-tree?

‘git Is-tree’ represents a tree object including the mode and the name of each item and the SHA-1 value of the blob or the tree.


Q. How git instaweb is used?

‘Git Instaweb’ automatically directs a web browser and runs webserver with an interface into your local repository.


Q. What does ‘hooks’ consist of in git?

This directory consists of Shell scripts which are activated after running the corresponding Git commands.  For example, git will try to execute the post-commit script after you run a commit.


Q. Explain what is commit message?

Commit message is a feature of git which appears when you commit a change. Git provides you a text editor where you can enter the modifications made in commits.


Q. How can you fix a broken commit?

To fix any broken commit, you will use the command “git commit—amend”. By running this command, you can fix the broken commit message in the editor.


Q. Why is it advisable to create an additional commit rather than amending an existing commit?

There are couple of reason

  1. The amend operation will destroy the state that was previously saved in a commit.  If it’s just the commit message being changed then that’s not an issue.  But if the contents are being amended then chances of eliminating something important remains more.
  2. Abusing “git commit- amend” can cause a small commit to grow and acquire unrelated changes.

Q. What is ‘bare repository’ in GIT?

To co-ordinate with the distributed development and developers team, especially when you are working on a project from multiple computers ‘Bare Repository’ is used. A bare repository comprises of a version history of your code.


Q. How do you revert a commit that has already been pushed and made public?

One or more commits can be reverted through the use of git revert. This command, in essence, creates a new commit with patches that cancel out the changes introduced in specific commits. In case the commit that needs to be reverted has already been published or changing the repository history is not an option, git revert can be used to revert commits. Running the following command will revert the last two commits:

git revert HEAD~2..HEAD

Alternatively, one can always checkout the state of a particular commit from the past, and commit it anew.


Q. How do you squash last N commits into a single commit?

Squashing multiple commits into a single commit will overwrite history, and should be done with caution. However, this is useful when working in feature branches. To squash the last N commits of the current branch, run the following command (with {N} replaced with the number of commits that you want to squash):

git rebase -i HEAD~{N}

Upon running this command, an editor will open with a list of these N commit messages, one per line. Each of these lines will begin with the word “pick”. Replacing “pick” with “squash” or “s” will tell Git to combine the commit with the commit before it. To combine all N commits into one, set every commit in the list to be squash except the first one. Upon exiting the editor, and if no conflict arises, git rebase will allow you to create a new commit message for the new combined commit.


Q. How do you find a list of files that has changed in a particular commit?

git diff-tree -r {hash}

Given the commit hash, this will list all the files that were changed or added in that commit. The -r flag makes the command list individual files, rather than collapsing them into root directory names only.

The output will also include some extra information, which can be easily suppressed by including a couple of flags:

git diff-tree –no-commit-id –name-only -r {hash}

Here –no-commit-id will supress the commit hashes from appearing in the output, and –name-only will only print the file names, instead of their paths.


Q. How do you setup a script to run every time a repository receives new commits through push?

To configure a script to run every time a repository receives new commits through push, one needs to define either a pre-receive, update, or a post-receive hook depending on when exactly the script needs to be triggered.

Pre-receive hook in the destination repository is invoked when commits are pushed to it. Any script bound to this hook will be executed before any references are updated. This is a useful hook to run scripts that help enforce development policies.

Update hook works in a similar manner to pre-receive hook, and is also triggered before any updates are actually made. However, the update hook is called once for every commit that has been pushed to the destination repository.

Finally, post-receive hook in the repository is invoked after the updates have been accepted into the destination repository. This is an ideal place to configure simple deployment scripts, invoke some continuous integration systems, dispatch notification emails to repository maintainers, etc.

Hooks are local to every Git repository and are not versioned. Scripts can either be created within the hooks directory inside the “.git” directory, or they can be created elsewhere and links to those scripts can be placed within the directory.


Q. What is git bisect? How can you use it to determine the source of a (regression) bug?

Git provides a rather efficient mechanism to find bad commits. Instead of making the user try out every single commit to find out the first one that introduced some particular issue into the code, git bisect allows the user to perform a sort of binary search on the entire history of a repository.

By issuing the command git bisect start, the repository enters bisect mode. After this, all you have to do is identify a bad and a good commit:

git bisect bad # marks the current version as bad

git bisect good {hash or tag} # marks the given hash or tag as good, ideally of some earlier commit

Once this is done, Git will then have a range of commits that it needs to explore. At every step, it will checkout a certain commit from this range, and require you to identify it as good or bad. After which the range will be effectively halved, and the whole search will require a lot less number of steps than the actual number of commits involved in the range. Once the first bad commit has been found, or the bisect mode needs to be ended, the following command can be used to exit the mode and reset the bisection state:

git bisect reset


Q. What are the different ways you can refer to a commit?

In Git each commit is given a unique hash. These hashes can be used to identify the corresponding commits in various scenarios (such as while trying to checkout a particular state of the code using the git checkout {hash} command).

Additionally, Git also maintains a number of aliases to certain commits, known as refs. Also, every tag that you create in the repository effectively becomes a ref (and that is exactly why you can use tags instead of commit hashes in various git commands). Git also maintains a number of special aliases that change based on the state of the repository, such as HEAD, FETCH_HEAD, MERGE_HEAD, etc.

Git also allows commits to be referred as relative to one another. For example, HEAD~1 refers to the commit parent to HEAD, HEAD~2 refers to the grandparent of HEAD, and so on. In case of merge commits, where the commit has two parents, ^ can be used to select one of the two parents, e.g. HEAD^2 can be used to follow the second parent.

And finally, refspecs. These are used to map local and remote branches together. However, these can be used to refer to commits that reside on remote branches allowing one to control and manipulate them from a local Git environment.


Q. What is git rebase and how can it be used to resolve conflicts in a feature branch before merge?

In simple words, git rebase allows one to move the first commit of a branch to a new starting location. For example, if a feature branch was created from master, and since then the master branch has received new commits, git rebase can be used to move the feature branch to the tip of master. The command effectively will replay the changes made in the feature branch at the tip of master, allowing conflicts to be resolved in the process. When done with care, this will allow the feature branch to be merged into master with relative ease and sometimes as a simple fast-forward operation.


Q. How do you configure a Git repository to run code sanity checking tools right before making commits, and preventing them if the test fails?

This can be done with a simple script bound to the pre-commit hook of the repository. The pre-commit hook is triggered right before a commit is made, even before you are required to enter a commit message. In this script one can run other tools, such as linters and perform sanity checks on the changes being committed into the repository. For example, the following script:

#!/bin/sh
files=$(git diff –cached –name-only –diff-filter=ACM | grep ‘.go$’)
if [ -z files ]; then
exit 0
fi
unfmtd=$(gofmt -l $files)
if [ -z unfmtd ]; then
exit 0
fi
echo “Some .go files are not fmt’d”
exit 1

… checks to see if any .go file that is about to be commited needs to be passed through the standard Go source code formatting tool gofmt. By exiting with a non-zero status, the script effectively prevents the commit from being applied to the repository.

Tagged : / / / / / / / / / / /

Top 20 DevOps Questions you must prepare before Interview | scmGalaxy

devops-interview-questions

  1. What do you understand about DevOps? Can you please define it in your terminologies?

  2. What are the ways, DevOps will help the Software Projects and Team?

  3. What is Continuous Integration? Share your approach which you applied in your projects in order to implement CI.

  4. What is difference between Continuous Delivery and Continuous Deployment?

  5. How Jenkins will help to implement CI and what are the capabilities what Jenkins has so we call Jenkins is a CI tool?

  6. How is DevOps different from Agile / SDLC?

  7. What are the advantages of DevOps for the organization?

  8. Whether DevOps can be implemented only by DevOps Engineer in a project? If not, Why we should hire you?

  9. How would you deploy a software to 5000 systems? Do you know how you would go about large-scale deployments?

  10. How would you trace a binary deployment back to the source code ? How would you structure such a build ?How do you plan capacity for your CI/CD servers ?

  11. Which are the top DevOps tools? Which tools have you worked on? How do all these tools work together?

  12. Explain your understanding and expertise on both the software development side and the technical operations side of an organization you have worked with in the past.

  13. What is agile development and Scrum ?

  14. Can we consider DevOps as an agile methodology ?

  15. What is DevOps engineer’s duty with regards to Agile development ?

  16. How people communicate or the tools that you choose to deploy?

  17. How would you make software deployable?

  18. How do you manage dependencies ?

  19. What are the branching strategy you follow and why?

  20. Discuss your experience building bridges between IT Ops, QA and development.

Tagged : / / / / / / / / /

Top 25 TFS Interview Questions and Answers

tfs-interview-questions-and-answers

TFS Interview Questions

1) What is Team  Foundation Server? What does it cover – version control? build processes? bug tracking? task management?

Team Foundation Server is defined in the documentation as:

Team Foundation is a collection of collaborative technologies that support a team effort to deliver a product. While the Team Foundation technologies are typically employed by a software team to build a software product, they can also be used on other types of projects.

As the customer already noted three of the core deliverables of Team Foundation Server:

1. Build Process

2. List/Work item Tracking

3. Source Control

This is leaving off probably the two most import features of Team Foundation Server. By integrating the build process, source control,policy and work item tracking you can get a deep insight into what teams are doing and some analytics for future trends which leads to the 4th core deliverable of Team Foundation Server

4. Reporting

Having insight into how a team is tracking is really only half the answer their also needs to a mechanism to share this information which brings us to the last feature of Team Foundation Server:

5. Collaboration (Typically enabled through the Team Portal, Team Project and Process Guidance)

Interestingly it is the two missing categories that set Team Foundations Server apart from other offerings.

2) List out the functionalities provided by team foundation server?

– Project Management

– Tracking work items

– Version Control

– Test case management

– Build Automation

– Reporting

– Virtual Lab Management

3) Explain TFS in respect to GIT?

t

4) Explain how you can create a Git-TFS in Visual Studio 2013 express?

To create a Git-TFS in Visual Studio 2013 express

– Create an account with MS TFS service if you don’t have inhouse TFS server

– After that, you will be directed to TFS page, where you will see tow option for creating project, one with new team project and another with a new team project+Git

– The account URL will be found right below “Getting Started.”

– Click on create git project and it will take you to a new window, where you specify details about the project like project name, description, the process template, version control, etc. and once completed click on create project.

– Now you can create a local project in team foundation server by creating a new project in Visual studio and do not forget to mark the check box that says “Add to source control”

– In the next window, select mark Git as your version control and click ok, and you will be able to see the alteration made in the source code

– After that, commit your code, right click a file in team explorer and you can compare version differences

5) Mention whether all of the team foundation service features are included into the Team foundation server?

TFS service is updated every 3 weeks while Team Foundation Server “on-premise” is updated every 3 months.  So, the on-premise version will always remain a little behind. However, TFS on-premise has got something that the TFS service does not.

– You can use TFS Lab

– Customize work items/process templates

6) Explain what kind or report server you can add in TFS?

TFS uses SQL for its data storage, so you have to add SQL server reporting services to provide a report server for TFS.

7) How one would know whether the report is updated in TFS?

For each report, there will be an option “Date Last Updated” in the lower light corner, when you click or select that option, it will give details about when it was last updated.

8) Explain how you can restore hidden debugger commands in Visual Studio 2013?

To restore the debugger feature that is hidden, you have to add the command back to the command

– Open your project, click on Tools menu and then click customize

– Tap the command tab in the customize dialog box

– In the menu bar, drop down, choose the debug menu for which you want to contain the restored command

– Tap on the Add command button

– In the Add command box, choose the command you want to add and click OK

– Repeat the step to add another command

9) Explain how you can track your code by customizing the scroll bar in Visual Studio 2013?

To show the annotations on the scroll bar

– You can customize the scroll bar to display code changes, breakpoints, bookmarks and errors

– Open the scroll bar options page

– Choose the option “show annotations over vertical scroll bar”, and then choose the annotations you want to see

– You can replace anything in the code that frequently appears in the file which is not meant to be

10) Can I install the TFS 2010 Build Service on my TFS 2008 build machine? 

Yes, you can. Even though they both default to the same port (9191), they can share that port without any problems.

11) Can we disable the “Override CheckIn Policy Failure” checkbox? Can that be customized based on User Login, Policy Type of File type?

No. It is designed it to be fully auditable by including policy compliance data in the changeset details and in the checkin mail that is delivered, but left it up to the developer to determine whether they have a good reason for overriding.

12) What are the different events available in the event model and is there any documentation on them?

There is really only one SCC event and that is the one that is raised on checkin. Subscription is via the general event model that is discussed in the extensibility kit.

13) Are Deletes you make in TFS 2010 Source Control physical or logical? Can accidental deletes be recovered?

Deletes are fully recoverable with the “undelete” operation. You wouldn’t want to do a SQL restore because that would roll back every change to the TFS in the time since the file was deleted.

14) Can different CheckIn Policies be applied on different branches? E.g. Can they have QA specific policies applied on CheckIn in a QA branch?

No.

15) How do I redisplay source control explorer?

Selecting View > Other Windows > Source Control Explorer will display the Source Control Explorer window within the IDE.

16) Why doesn’t source control detect that I have deleted a file/folder on my local disk?

The main scenario here is deleting a file (by mistake or intentionally) outside of Team Foundation and then trying the get that file back from source control. If the file version has not changed the server thinks the user already has the file and does not copy it over. This is because the server keeps a list of files that the user already has and when activities are made outside of source control this list becomes out of date. Team Foundation Version Control does have a force get option which will provide the functionality needed to obtain the desired version but it is currently partially hidden under the Get Specific Version Dialog window as a check box item.

17) Can I compare directory structures in TFS Source Control?

No, you cannot compare Directory Structures in TFS Source Control

18) Can we configure SCC to not check-in the binary files? Where are such configurations done?

Team Foundation Version Control provides a way to limit check-ins by setting up check-in policies that are evaluated before a check-in can take effect. The easiest way to do this is by authoring a policy that checks if the user is trying to check-in a binary file from a given folder structure and reject or accept it in accordance.

19) How can I add non-solution items to source control?

This can be achieved by either clicking the Add icon or by going to File > Source Control and selecting the Add To Source Control menu item.

20) When a user “edits” a file in a “source controlled” project, it gets checked out automatically. Is this configurable? Can we change this behavior?

Yes it can be done by configuring TFS by going to Tools > Options > Source Control > Environment provides an option where a user can change the settings to not checkout files automatically on edit.

21) What plugin / extensibility API does it expose?

The Team Foundation Server component model for modifying both the Process Template and creating plugins is built on to be entirely open(in many cases the entry points are defined in XML configuration files). In addition to the having this the development team and community is quite active in supplying samples of this:

Brian Harry

Buck Hodges

Rob Caron

This open platform has also enabled a ecosystem of add-ons like Teamlook, Teamprise, Teamplain, Teamword, TFSPermission Manager.

22)  How does it integrate with other non-MS platforms?

Team Foundation Server uses Web Services for cross machine communication therefore the Team Foundation Server functionality can be made available to any computer. (see MSDN Team System Article on how to use these web services) This is exactly how companies likeTeamprise, Teamplain, have built their clients to run on non windows computers.

23) How does it integrate with other software (eg custom task management software etc)?

In addition to the integration methods mentioned above Team Foundation is also a popular platform for other software manufacturers to host themselves in. Examples of this is Borland with their Together and Caliber Products and Compuware Testing with DevPartner.

24) How does the version control compare to Perforce? Branching, merging, change lists etc?

Team Foundation Server supports all normally expected Source Control features such as branching, merging, exclusively locking, remote disconnected scenarios, labeling, searching on various properties high fidelity reporting (how much code churn per person per project per iteration etc) plus a couple of newer paradigms like shelving and optimization for things like branching scenarios (many version control systems do a full copy for branches). I would have some performance comparisons but most systems don’t allow this.

25)  Automated build system?

Yes Team Foundation Server includes an Automated Build System. This system is based on MSBUILD and offers the additional functionality of automatically running tests, profiling, code analysis, verifying policies, collating the changesets and workitems for reporting.

26) Any support for distributed build tools? Eg integrating our custom data build tools into the system throughout a network?

MSbuild was written to be extensible and integrate with existing tools through easy to use XML configuration files. Many of the commercial build utilities are already using and/or integrated with MSBuild –such as Cruisecontrol.net. In addition to making these actions part of the build script I have found the generic tests set to run as part of the build to do just as good a job with a rich user interface and support for managing/filtering etc.

27) Documentation support – eg integrating documentation with code check-ins etc?

This would typically be done through an entry to a work item (to be either associated or resolved) on time of check in and linked with this work item.

The links to the documentation can exist in a couple of ways.

1. Checked in as Files (ie doc, HTML etc) Team Foundation Server makes it trivial to link all object checked in (as well as other workitems.)

2. Process guidance files that exist on the Windows Sharepoint Site – Again making it easy for linking.

3. External files once again to linked in a Workitem entry.

28) Does it send data compressed over the network?

Team Foundation uses Web Services for cross machine communication and by default automatically configures IIS use Compression.

29) Working from home / remote location?

Since cross machine communication is accomplished through web services remote access is vastly simplified.

30) Working offline? If the server is offline?

Yes, you need to change the file property to offline via a command utility called TFPT and save changes your local workspace. Any subsequent check-in does a get latest which would resolve if there are conflicts to be merged.

Tagged : / / / / / / / / / / / / /

Top 25 Chef configuration management interview questions and answers

chef-interview-questions-and-answers

Source – learn.chef.io

What is a resource?
Answer- A resource represents a piece of infrastructure and its desired state, such as a package that should be installed, a service that should be running, or a file that should be generated.

Question: What is a recipe?
Answer- A recipe is a collection of resources that describes a particular configuration or policy. A recipe describes everything that is required to configure part of a system. Recipes do things such as:

install and configure software components.
manage files.
deploy applications.
execute other recipes.

Question: What happens when you don’t specify a resource’s action?
Answer- When you don’t specify a resource’s action, Chef applies the default action.

Question: Are these two recipes the same?

package 'httpd'
service 'httpd' do    action [:enable, :start]  end

&&

service 'httpd' do    action [:enable, :start]    end
package 'httpd'

Answer-
No, they are not. Remember that Chef applies resources in the order they appear. So the first recipe ensures that the httpd package is installed and then configures the service. The second recipe configures the service and then ensures the package is installed.

Question: The second recipe may not work as you’d expect because the service resource will fail if the package is not yet installed.

Are these two recipes the same?

package 'httpd'
service 'httpd' do    action [:enable, :start]    end
package 'httpd'
service 'httpd' do    action [:start, :enable]    end

Answer-
No, they are not. Although both recipes ensure that the httpd package is installed before configuring its service, the first recipe enables the service when the system boots and then starts it. The second recipe starts the service and then enables it to start on reboot.

Are these two recipes the same?

file ‘/etc/motd’ do
owner ‘root’
group ‘root’
mode ‘0755’
action :create
end

file ‘/etc/motd’ do
action :create
mode ‘0755’
group ‘root’
owner ‘root’
end

Answer-
Yes, they are! Order matters with a lot of things in Chef, but you can order resource attributes any way you want.

Question –
Write a service resource that stops and then disables the httpd service from starting when the system boots.

Answer –
service ‘httpd’ do
action [:stop, :disable]
end

How does a cookbook differ from a recipe?
A recipe is a collection of resources, and typically configures a software package or some piece of infrastructure. A cookbook groups together recipes and other information in a way that is more manageable than having just recipes alone.

For example, in this lesson you used a template resource to manage your HTML home page from an external file. The recipe stated the configuration policy for your web site, and the template file contained the data. You used a cookbook to package both parts up into a single unit that you can later deploy.

How does chef-apply differ from chef-client?

chef-apply applies a single recipe; chef-client applies a cookbook.

For learning purposes, we had you start off with chef-apply because it helps you understand the basics quickly. In practice, chef-apply is useful when you want to quickly test something out. But for production purposes, you typically run chef-client to apply one or more cookbooks.

You’ll learn in the next module how to run chef-client remotely from your workstation.

What’s the run-list?

The run-list lets you specify which recipes to run, and the order in which to run them. The run-list is important for when you have multiple cookbooks, and the order in which they run matters.

What are the two ways to set up a Chef server?

Install an instance on your own infrastructure.
Use hosted Chef.

What’s the role of the Starter Kit?
The Starter Kit provides certificates and other files that enable you to securely communicate with the Chef server.

Where can you get reusable cookbooks that are written and maintained by the Chef community?
Chef Supermarket, https://supermarket.chef.io.

What’s the command that enables you to interact with the Chef server?
knife

What is a node?
A node represents a server and is typically a virtual machine, container instance, or physical server – basically any compute resource in your infrastructure that’s managed by Chef.

What information do you need to in order to bootstrap?
You need:

your node’s host name or public IP address.
a user name and password you can log on to your node with.
Alternatively, you can use key-based authentication instead of providing a user name and password.

What happens during the bootstrap process?
During the bootstrap process, the node downloads and installs chef-client, registers itself with the Chef server, and does an initial checkin. During this checkin, the node applies any cookbooks that are part of its run-list.

Which of the following lets you verify that your node has successfully bootstrapped?

The Chef management console.
knife node list
knife node show
You can use all three of these methods.

What is the command you use to upload a cookbook to the Chef server?
knife cookbook upload

How do you apply an updated cookbook to your node?
We mentioned two ways.

Run knife ssh from your workstation.
SSH directly into your server and run chef-client.
You can also run chef-client as a daemon, or service, to check in with the Chef server on a regular interval, say every 15 or 30 minutes.

Update your Apache cookbook to display your node’s host name, platform, total installed memory, and number of CPUs in addition to its FQDN on the home page.

Update index.html.erb like this.
<html>
<body>
<h1>hello from <%= node[‘fqdn’] %></h1>

<pre>
<%= node[‘hostname’] %>
<%= node[‘platform’] %> – <%= node[‘platform_version’] %>
<%= node[‘memory’][‘total’] %> RAM
<%= node[‘cpu’][‘total’] %> CPUs
</pre>
</body>
</html>

Then upload your cookbook and run it on your node.

What would you set your cookbook’s version to once it’s ready to use in production?

According to Semantic Versioning, you should set your cookbook’s version number to 1.0.0 at the point it’s ready to use in production.

What is the latest version of the haproxy community cookbook?

To know the latest version of any cookbook on Chef Supermarket, browse to its page and view the latest version from the version selection box.

Or, get the info from the knife cookbook site command, like this.

knife cookbook site show haproxy | grep latest_version
latest_version: http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1.6.6

Create a second node and apply the awesome_customers cookbook to it. How long does it take?

You already accomplished the majority of the tasks that you need. You wrote the awesome_customers cookbook, uploaded it and its dependent cookbooks to the Chef server, applied the awesome_customers cookbook to your node, and verified that everything’s working.

All you need to do now is:

Bring up a second Red Hat Enterprise Linux or CentOS node.
Copy your secret key file to your second node.
Bootstrap your node the same way as before. Because you include the awesome_customers cookbook in your run-list, your node will apply that cookbook during the bootstrap process.
The result is a second node that’s configured identically to the first one. The process should take far less time because you already did most of the work.

Now when you fix an issue or add a new feature, you’ll be able to deploy and verify your update much more quickly!

What’s the value of local development using Test Kitchen?

Local development with Test Kitchen:

enables you to use a variety of virtualization providers that create virtual machine or container instances locally on your workstation or in the cloud.
enables you to run your cookbooks on servers that resemble those that you use in production.
speeds up the development cycle by automatically provisioning and tearing down temporary instances, resolving cookbook dependencies, and applying your cookbooks to your instances.

What is VirtualBox? What is Vagrant?

VirtualBox is the software that manages your virtual machine instances.

Vagrant helps Test Kitchen communicate with VirtualBox and configures things like available memory and network settings.

Verify that your motd cookbook runs on both CentOS 6.6 and CentOS 6.5.

Your motd cookbook is already configured to work on CentOS 6.6 as well as CentOS 6.5, so you don’t need to modify it.

To run it on CentOS 6.5, add an entry to the platforms section of your .kitchen.yml file like this.

---       driver:       name: vagrant
provisioner:       name: chef_zero
platforms:       - name: centos-6.6       driver:       box: opscode-centos-6.6       box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.6_chef-provisionerless.box       - name: centos-6.5       driver:       box: opscode-centos-6.5       box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
suites:       - name: default       run_list:       - recipe[motd::default]       attributes:

In many cases, Test Kitchen can infer the box and box_url parameters, which specify the name and location of the base image, or box. We specify them here to show you how to use them.

Run kitchen list to see the matrix of test instances that are available. Here, we have two platforms – CentOS 6.5 and CentOS 6.6 – multiplied by one suite – default.

$kitchen list

Instance           Driver   Provisioner  Verifier  Transport  Last Action default-centos-66  Vagrant  ChefZero     Busser    Ssh        <Not Created> default-centos-65  Vagrant  ChefZero     Busser    Ssh        <Not Created>

Run kitchen converge to create the instances and apply the motd cookbook.

$kitchen converge    -----> Starting Kitchen (v1.4.0)    -----> Creating <default-centos-66>...    Bringing machine 'default' up with 'virtualbox' provider...    [...]    Running handlers:    Running handlers complete    Chef Client finished, 1/1 resources updated in 10.372334751 seconds    Finished converging <default-centos-66> (3m52.59s).    -----> Creating <default-centos-65>...    Bringing machine 'default' up with 'virtualbox' provider...    [...]    Running handlers:    Running handlers complete    Chef Client finished, 1/1 resources updated in 5.32753132 seconds    Finished converging <default-centos-65> (10m12.63s).  -----> Kitchen is finished. (19m47.71s)

Now to confirm that everything’s working, run kitchen login. But this time, you need to provide the instance name so that Test Kitchen knows which instance to connect to.

$kitchen login default-centos-66       Last login: Wed May 13 20:15:00 2015 from 10.0.2.2              hostname:  default-centos-66       fqdn:      default-centos-66       memory:    469392kB       cpu count: 1       [vagrant@default-centos-66 ~]$ logout       Connection to 127.0.0.1 closed.$kitchen login default-centos-65       Last login: Wed May 13 20:28:18 2015 from 10.0.2.2              hostname:  default-centos-65       fqdn:      default-centos-65       memory:    469452kB       cpu count: 1       [vagrant@default-centos-65 ~]$ logout       Connection to 127.0.0.1 closed.
Tagged : / / / / / / / / / / / / / / /

Chef configuration management interview questions and answers | Chef Interview Q&A

chef-interview-questions-and-answers

Source – learn.chef.io

What is a resource?
Answer- A resource represents a piece of infrastructure and its desired state, such as a package that should be installed, a service that should be running, or a file that should be generated.

Question: What is a recipe?
Answer- A recipe is a collection of resources that describes a particular configuration or policy. A recipe describes everything that is required to configure part of a system. Recipes do things such as:

install and configure software components.
manage files.
deploy applications.
execute other recipes.

Question: What happens when you don’t specify a resource’s action?
Answer- When you don’t specify a resource’s action, Chef applies the default action.

Question: Are these two recipes the same?

package 'httpd'
service 'httpd' do    action [:enable, :start]  end

&&

service 'httpd' do    action [:enable, :start]    end
package 'httpd'

Answer-
No, they are not. Remember that Chef applies resources in the order they appear. So the first recipe ensures that the httpd package is installed and then configures the service. The second recipe configures the service and then ensures the package is installed.

Question: The second recipe may not work as you’d expect because the service resource will fail if the package is not yet installed.

Are these two recipes the same?

package 'httpd'
service 'httpd' do    action [:enable, :start]    end
package 'httpd'
service 'httpd' do    action [:start, :enable]    end

Answer-
No, they are not. Although both recipes ensure that the httpd package is installed before configuring its service, the first recipe enables the service when the system boots and then starts it. The second recipe starts the service and then enables it to start on reboot.

Are these two recipes the same?

file ‘/etc/motd’ do
owner ‘root’
group ‘root’
mode ‘0755’
action :create
end

file ‘/etc/motd’ do
action :create
mode ‘0755’
group ‘root’
owner ‘root’
end

Answer-
Yes, they are! Order matters with a lot of things in Chef, but you can order resource attributes any way you want.

Question –
Write a service resource that stops and then disables the httpd service from starting when the system boots.

Answer –
service ‘httpd’ do
action [:stop, :disable]
end

How does a cookbook differ from a recipe?
A recipe is a collection of resources, and typically configures a software package or some piece of infrastructure. A cookbook groups together recipes and other information in a way that is more manageable than having just recipes alone.

For example, in this lesson you used a template resource to manage your HTML home page from an external file. The recipe stated the configuration policy for your web site, and the template file contained the data. You used a cookbook to package both parts up into a single unit that you can later deploy.

How does chef-apply differ from chef-client?

chef-apply applies a single recipe; chef-client applies a cookbook.

For learning purposes, we had you start off with chef-apply because it helps you understand the basics quickly. In practice, chef-apply is useful when you want to quickly test something out. But for production purposes, you typically run chef-client to apply one or more cookbooks.

You’ll learn in the next module how to run chef-client remotely from your workstation.

What’s the run-list?

The run-list lets you specify which recipes to run, and the order in which to run them. The run-list is important for when you have multiple cookbooks, and the order in which they run matters.

What are the two ways to set up a Chef server?

Install an instance on your own infrastructure.
Use hosted Chef.

What’s the role of the Starter Kit?
The Starter Kit provides certificates and other files that enable you to securely communicate with the Chef server.

Where can you get reusable cookbooks that are written and maintained by the Chef community?
Chef Supermarket, https://supermarket.chef.io.

What’s the command that enables you to interact with the Chef server?
knife

What is a node?
A node represents a server and is typically a virtual machine, container instance, or physical server – basically any compute resource in your infrastructure that’s managed by Chef.

What information do you need to in order to bootstrap?
You need:

your node’s host name or public IP address.
a user name and password you can log on to your node with.
Alternatively, you can use key-based authentication instead of providing a user name and password.

What happens during the bootstrap process?
During the bootstrap process, the node downloads and installs chef-client, registers itself with the Chef server, and does an initial checkin. During this checkin, the node applies any cookbooks that are part of its run-list.

Which of the following lets you verify that your node has successfully bootstrapped?

The Chef management console.
knife node list
knife node show
You can use all three of these methods.

What is the command you use to upload a cookbook to the Chef server?
knife cookbook upload

How do you apply an updated cookbook to your node?
We mentioned two ways.

Run knife ssh from your workstation.
SSH directly into your server and run chef-client.
You can also run chef-client as a daemon, or service, to check in with the Chef server on a regular interval, say every 15 or 30 minutes.

Update your Apache cookbook to display your node’s host name, platform, total installed memory, and number of CPUs in addition to its FQDN on the home page.

Update index.html.erb like this.
<html>
<body>
<h1>hello from <%= node[‘fqdn’] %></h1>

<pre>
<%= node[‘hostname’] %>
<%= node[‘platform’] %> – <%= node[‘platform_version’] %>
<%= node[‘memory’][‘total’] %> RAM
<%= node[‘cpu’][‘total’] %> CPUs
</pre>
</body>
</html>

Then upload your cookbook and run it on your node.

What would you set your cookbook’s version to once it’s ready to use in production?

According to Semantic Versioning, you should set your cookbook’s version number to 1.0.0 at the point it’s ready to use in production.

What is the latest version of the haproxy community cookbook?

To know the latest version of any cookbook on Chef Supermarket, browse to its page and view the latest version from the version selection box.

Or, get the info from the knife cookbook site command, like this.

knife cookbook site show haproxy | grep latest_version
latest_version: http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1.6.6

Create a second node and apply the awesome_customers cookbook to it. How long does it take?

You already accomplished the majority of the tasks that you need. You wrote the awesome_customers cookbook, uploaded it and its dependent cookbooks to the Chef server, applied the awesome_customers cookbook to your node, and verified that everything’s working.

All you need to do now is:

Bring up a second Red Hat Enterprise Linux or CentOS node.
Copy your secret key file to your second node.
Bootstrap your node the same way as before. Because you include the awesome_customers cookbook in your run-list, your node will apply that cookbook during the bootstrap process.
The result is a second node that’s configured identically to the first one. The process should take far less time because you already did most of the work.

Now when you fix an issue or add a new feature, you’ll be able to deploy and verify your update much more quickly!

What’s the value of local development using Test Kitchen?

Local development with Test Kitchen:

enables you to use a variety of virtualization providers that create virtual machine or container instances locally on your workstation or in the cloud.
enables you to run your cookbooks on servers that resemble those that you use in production.
speeds up the development cycle by automatically provisioning and tearing down temporary instances, resolving cookbook dependencies, and applying your cookbooks to your instances.

What is VirtualBox? What is Vagrant?

VirtualBox is the software that manages your virtual machine instances.

Vagrant helps Test Kitchen communicate with VirtualBox and configures things like available memory and network settings.

Verify that your motd cookbook runs on both CentOS 6.6 and CentOS 6.5.

Your motd cookbook is already configured to work on CentOS 6.6 as well as CentOS 6.5, so you don’t need to modify it.

To run it on CentOS 6.5, add an entry to the platforms section of your .kitchen.yml file like this.

---       driver:       name: vagrant
provisioner:       name: chef_zero
platforms:       - name: centos-6.6       driver:       box: opscode-centos-6.6       box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.6_chef-provisionerless.box       - name: centos-6.5       driver:       box: opscode-centos-6.5       box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
suites:       - name: default       run_list:       - recipe[motd::default]       attributes:

In many cases, Test Kitchen can infer the box and box_url parameters, which specify the name and location of the base image, or box. We specify them here to show you how to use them.

Run kitchen list to see the matrix of test instances that are available. Here, we have two platforms – CentOS 6.5 and CentOS 6.6 – multiplied by one suite – default.

$kitchen list

Instance           Driver   Provisioner  Verifier  Transport  Last Action default-centos-66  Vagrant  ChefZero     Busser    Ssh        <Not Created> default-centos-65  Vagrant  ChefZero     Busser    Ssh        <Not Created>

Run kitchen converge to create the instances and apply the motd cookbook.

$kitchen converge    -----> Starting Kitchen (v1.4.0)    -----> Creating <default-centos-66>...    Bringing machine 'default' up with 'virtualbox' provider...    [...]    Running handlers:    Running handlers complete    Chef Client finished, 1/1 resources updated in 10.372334751 seconds    Finished converging <default-centos-66> (3m52.59s).    -----> Creating <default-centos-65>...    Bringing machine 'default' up with 'virtualbox' provider...    [...]    Running handlers:    Running handlers complete    Chef Client finished, 1/1 resources updated in 5.32753132 seconds    Finished converging <default-centos-65> (10m12.63s).  -----> Kitchen is finished. (19m47.71s)

Now to confirm that everything’s working, run kitchen login. But this time, you need to provide the instance name so that Test Kitchen knows which instance to connect to.

$kitchen login default-centos-66       Last login: Wed May 13 20:15:00 2015 from 10.0.2.2              hostname:  default-centos-66       fqdn:      default-centos-66       memory:    469392kB       cpu count: 1       [vagrant@default-centos-66 ~]$ logout       Connection to 127.0.0.1 closed.$kitchen login default-centos-65       Last login: Wed May 13 20:28:18 2015 from 10.0.2.2              hostname:  default-centos-65       fqdn:      default-centos-65       memory:    469452kB       cpu count: 1       [vagrant@default-centos-65 ~]$ logout       Connection to 127.0.0.1 closed.
Tagged : / / / / / / / / / / / / / / /

Interview Questions and Answer for Perforce Version Control Tool

perforce-interview-questions-answers

Some of the perforce commands which is not commonly used but useful.
p4 annotate – Print file lines along with their revisions.
e.g p4 annotate file.c

How to ignore files/folder in perforce workspace/client?
Assuming you have a client named “CLIENT”, a directory named “foo” (located at your project root), and you wish to ignore all .dll files in that directory tree, you can add the following lines to your workspace view to accomplish this:

-//depot/foo/*.dll //CLIENT/foo/*.dll
-//depot/foo/…/*.dll //CLIENT/foo/…/*.dll

The first line removes them from the directory “foo” and the second line removes them from all sub directories. Now, when you ‘Reconcile Offline Work…’, all the .dll files will be moved into “Excluded Files” folders at the bottom of the folder diff display. They will be out of your way, but can still view and manipulate them if you really need to.

You can also do it another way, which will reduce your “Excluded Files” folder to just one, but you won’t be able to manipulate any of the files it contains because the path will be corrupt (but if you just want them out of your way, it doesn’t matter).

-//depot/foo.../*.dll //CLIENT/foo.../*.dll

Reference
How can I exclude a directory from a Perforce command?

P4IGNORE
Specify a file that contains a list of files to ignore when adding files to the depot and reconciling workspaces.
Reference

How to check last 10 submitted, pending, or shelved changelists that include any file under the project directory?
p4 changes -m 5 //depot/project/…

How to check last 10 submitted or pending, or shelved changelists that include any file under the project directory?
p4 changes -m 1 -s submitted | pending | shelved

Interview Questions Related to Perforce Admin

  1. How to take perforce backup
  2. How to restore perforce backup
  3. How to verify health of the perforce repos database
  4. What is the ise of p4 dbverify and p4 verify

What is the use of p4 admin commands.

The p4 admin command allows Perforce superusers to perform administrative tasks even when working from a different machine than the one running the shared Perforce service.
p4 [g-opts] admin checkpoint [ -z | -Z ] [ prefix ]
p4 [g-opts] admin journal [ -z ] [ prefix ]
p4 [g-opts] admin stop
p4 [g-opts] admin restart
p4 [g-opts] admin updatespecdepot [ -a | -s type ]
p4 [g-opts] admin resetpassword -a | -u user
Reference – Click here

How to remove files from perforce permanently?
p4 archive -p with caution. This is the one of only two commands in Perforce that actually removes file data. (The other command that removes file data is p4 obliterate.)

How to set properly in Perforce?
The Perforce service offers three ways of storing metadata: counters/keys, attributes, and properties.

If your application requires only the flat storage of simple key/value pairs, and attempts to implement no security model, use the p4 counters and p4 keys commands.

The p4 property command can be used by administrators to view and update property definitions stored in the Perforce service. The service does not use the property definitions; it provides this capability for other Perforce applications, such as P4V

If your application’s metadata is associated with particular files, use p4 attribute.

If your application’s metadata is not associated with files, and if you have a requirement to restrict its visibility to users, groups, and/or to control the precedence of multiple values using sequence numbers, use p4 property.

p4 property -n name -v value
p4 counter mycounter 123
p4 key mykey 12
p4 attribute -n name [ -v value ] files…

Perforce Integration with other Tools

  1. Gitfushion
  2. Swarm
  3. Replication
Tagged : / / / / / / / / / / / / / / /

Top Interview Questions and Answers of Jenkins

jenkins-interview-questions

  • What is continuous integration?

  • Jenkins Continuous integration API features?

  • Advantages of jenkins?

  • Jenkins plugins?

  • Requirements for using Jenkins?

  • Installing Jenkins on Ubuntu and RHEL?

  • Process to take Jenkins backup and copying files?

  • Top 20 Jenkins and Useful Plugins?

Tagged : / / / / / / / / / / / / /

Top 10 Interview Questions and Answers in SVN (Subversion)

svn-subversion-interview-questions-and-answers

  • What is SVN?

  • What is “branch” , “Tag” and “Trunk” in SVN ?

  • what do you mean by “Synchronizing with Repository” ? How is it different from “Update” ?

  • Difference between Update and Commit ?

  • How to apply a patch in SVN ?

  • What if SVN Update gives Merge Conflicts and you just want your local files to be overriden with the repository versions ?

  • trunk vs branch vs tag in subversion or SVN

  • What is the process to take backuop and restore in SVN?

  • How to setup SVN?

  • How to setup authentication in SVN?

Tagged : / / / / / / / / / / / / / / /

All Possible Interview Questions on Git, Github and Gitlab

interview-questions-on-git-github-gitlab

  • What is GIT?
  • What is a repository in GIT?
  • What is the command you can use to write a commit message?
  • What is the difference between GIT and SVN and other CM systems?
    • Answers –
      • Cheap Local Branching
      • Everything is Local
      • Git is Fast
      • Git is Small
      • The Staging Area
      • Distributed
      • Any Workflow
      • Easy to Learn
      • Git is the new standard
  • What are the advantages of using GIT?
  • What language is used in GIT?
  • What is the function of ‘GIT PUSH’ in GIT?
  • Why GIT better than Subversion?
  • What is “Staging Area” or “Index” in GIT?
  • What is GIT stash?
  • What is GIT stash drop?
  • How will you know in GIT if a branch has been already merged into master?
  • What is the function of git clone?
  • What is the function of ‘git config’?
  • What does commit object contain?
  • How can you create a repository in Git?
  • What is ‘head’ in git and how many heads can be created in a repository?
  • What is the purpose of branching in GIT?
  • What is the common branching pattern in GIT?
  • How can you bring a new feature in the main branch?
  • What is a ‘conflict’ in git?
  • How can conflict in git resolved?
  • To delete a branch what is the command that is used?
  • What is another option for merging in git?
  • What is the syntax for “Rebasing” in Git?
  • What is the difference between ‘git remote’ and ‘git clone’?
  • What is GIT version control?
  • Mention some of the best graphical GIT client for LINUX?
  • What is Subgit? Why to use Subgit?
  • What is the function of ‘git diff ’ in git?
  • What is ‘git status’ is used for?
  • What is the difference between the ‘git diff ’and ‘git status’?
  • What is the function of ‘git checkout’ in git?
  • What is the function of ‘git rm’?
  • What is the function of ‘git stash apply’?
  • What is the use of ‘git log’?
  • What is ‘git add’ is used for?
  • What is the function of ‘git reset’?
  • What is git Is-tree?
  • How git instaweb is used?
  • What does ‘hooks’ consist of in git?
  • Explain what is commit message?
  • How can you fix a broken commit?
  • What is ‘bare repository’ in GIT?
  • How do you start Git and what is the process called?
  • How do you put your local repository (repo) on the GitHub server?
  • How to delete the working branch?
  • What as the strength and weaknesses of the software?
  • But I am quite happy with Subversion (SVN). What is all this fuss about? Is there a substantial trend for distributed versioning control systems (DVCS)?
  • Isn’t DVCS something for small teams and startups? I am working in a very big company. We value established things way more than the cutting edge stuff, that may not be here to stay.
  • Okay. Let’s say we go with DVCS. Why should I take git and not mercurial?
  • I like, that git allows our developers to host the complete repository on his local machine. That makes software development faster. So why do
  • you I need Stash on top?
  • How do you use this rights management with Stash? How does it work? Will developers only get have a repository? Is that still functional then?
  • What is a pull request? What is this for? Aren’t we sharing all code with all developers and let everyone do what he wants? Is that only for
  • hierachical software development methods?
  • How would you summarize the advantages of Stash in short?
  • What is the one reason, that your customers give Atlassian today on why they purchase Stash?
  • Can you offer us a small sneak peak into your upcoming next releases? Is there anything, that you can share first hand with us?
  • What is your general roadmap for stash? Where do you want to position it near and long term?
  • Do you ultimately plan to support Mercurial? When is a good time to buy Stash, if I run with hg at the moment?
  • Why should I go for Stash in favor of GitHub Enterprise or RhodeCode?
  • Why is Stash a separated product and not part of Bitbucket. I could imagine seeing Bitbucket Enterprise resembling GitHub Enterprise.
  • Is Atlassian using Stash internally in software development? If not, why not?
  • Wouldn’t it be interesting to combine Fisheye, Crucible and Stash in one product?
  • What is the difference between GIT and SVN?
  • What are the advantages of using GIT over other tools?
  • What is GIT stash?
  • What does commit object contain?
  • How can conflict in git resolved?
  • What is the difference between ‘git remote’ and ‘git clone’?
  • Mention some of the best graphical GIT client for LINUX?
  • What does ‘hooks’ consist of in git?
  • What is ‘bare repository’ in GIT?
  • Add a line to the some.txt file and then throw out all changes since the last commit.
  • Why GIT better than Subversion?
  • How to troubleshoot Git?
  • How to troubleshoot GitLab?
  • How to troubleshoot Github?
  • How to take Gitlab backup
  • What is Git Objects? explain about Tree, blob, commit, tag, branch objects?
  • How git Object storage works?
  • What is SHA1?
  • Introduction to the GitHub platform
  • github Distributed version control synchronization
  • github Project management and repository integration
  • github Multiple remotes and Fork maintenance
  • github Remote repository interaction and dependencies
Tagged : / / / / / / / / / / / / /