Jerry tests out the brand new model of the repository and starts offevolved working on a challenge. He creates array.C document in the trunk directory.
[jerry@CentOS ~]$ cd project_repo/trunk/
[jerry@CentOS trunk]$ cat array.c
The above command will produce the following result.
#include <stdio.h>
#define MAX 16
int main(void) {
int i, n, arr[MAX];
printf("Enter the total number of elements: ");
scanf("%d", &n);
printf("Enter the elements\n");
for (i = 0; i < n; ++i) scanf("%d", &arr[i]);
printf("Array has following elements\n");
for (i = 0; i < n; ++i) printf("|%d| ", arr[i]);
printf("\n");
return 0;
}
He wants to take a look at his code earlier than dedicate.
[jerry@CentOS trunk]$ make array
cc array.c -o array
[jerry@CentOS trunk]$ ./array
Enter the total number of elements: 5
Enter the elements
1
2
3
4
5
Array has following elements
|1| |2| |3| |4| |5|
Array has following factors23fourfivetested his code and the entirety is running as predicted, now it is time to devote changes.
[jerry@CentOS trunk]$ svn status
? array.c
? array
Subversion is showing '?' in the front of filenames as it would not recognise what to do with those documents.
Before dedicate, Jerry needs to add this document to the pending exchange-list.
[jerry@CentOS trunk]$ svn add array.c
A array.c
Let us test it with the 'status' operation. Subversion suggests A earlier than array.C, it approach, the report is correctly brought to the pending trade-list.
[jerry@CentOS trunk]$ svn status
? array
A array.c
To save array.C document to the repository, use the commit command with -m choice accompanied by using dedicate message. If you omit -m choice Subversion will convey up the text editor where you can type a multi-line message.
[jerry@CentOS trunk]$ svn commit -m "Initial commit"
Adding trunk/array.c
Transmitting file data .
Committed revision 2.
Now array.C document is efficaciously delivered to the repository, and the revision number is incremented through one