#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "client.h"
#include "utils.h"
Go to the source code of this file.
Macro Definition Documentation
#define INIT_REPO "init_test_repo" |
Function Documentation
Create and setup the tmp directory where the acction will happends.
Definition at line 21 of file main.c.
Remove the tmp directory and all his files.
Definition at line 30 of file main.c.
Setup for init command.
Definition at line 39 of file main.c.
Create some commits in the current repository.
Definition at line 48 of file main.c.
Fill the current repository with commits for log command.
Definition at line 59 of file main.c.
Setup the merge command. Without conflicts.
Definition at line 70 of file main.c.
void setup_conflict_merge |
( |
| ) |
|
Setup the merge command. Create a conflict that will have prompts.
Definition at line 82 of file main.c.
void setup_export_import |
( |
| ) |
|
Setup environment for export_import process.
Definition at line 93 of file main.c.
void clean_export_import |
( |
| ) |
|
Clean the export and the import directorys.
Definition at line 105 of file main.c.
void setup_filename_with_space |
( |
| ) |
|
Setup for filename_with_space example.
Definition at line 113 of file main.c.
Init command example.
Create a repo to the specific path, and then open the connection with this new repo.
The clone command will follow the same steps.
- clone repo
- open connection.
- Return values
-
Definition at line 134 of file main.c.
Log command example.
Will read a huge mass of data in chunks and then will print this data on stdout.
- Parameters
-
handle | The handle of the connection, wherewith I want to communicate |
- Return values
-
Definition at line 167 of file main.c.
int hg_import_by_hand |
( |
hg_handle * |
handle, |
|
|
char * |
import_patch |
|
) |
| |
Import command example.
The purpose is to show the functionality, it's not the import function. This function will import to the handle the import_patch, using input environment.
- Parameters
-
handle | The handle of the connection, wherewith I want to communicate |
import_patch | the file from where to simulate the input importing. |
- Return values
-
Definition at line 198 of file main.c.
char prompt_function |
( |
char * |
output | ) |
|
The prompt function for the merge funtion.
- Return values
-
Definition at line 229 of file main.c.
int hg_merge_by_hand |
( |
hg_handle * |
handle, |
|
|
char(*)(char *) |
prompt |
|
) |
| |
The merge command example.
The merge function gets a prompt function that deals promps.
The prompt function will read the option from standart input. The purpose is to show the mechanism(is't not a level 0 issue)
- Parameters
-
handle | The handle of the connection, wherewith I want to communicate |
prompt | a pointer to a function. |
- Return values
-
Definition at line 248 of file main.c.
The verify command example.
Will receive data, either from output channel, either from error channel. The data is printed on stdout.
- Parameters
-
handle | The handle of the connection, wherewith I want to communicate |
- Return values
-
Definition at line 294 of file main.c.
The export-import command example.
An export-import process that is not buffering the entire path in to memory
- Parameters
-
ehandle | The handle connection, from where I am exporting |
ihandle | The handle connection, where I am importing. |
- Return values
-
Definition at line 328 of file main.c.
int hg_add_filename_with_space_by_hand |
( |
hg_handle * |
handle | ) |
|
Adding a file that contain spaces example.
- Parameters
-
handle | The handle of the connection, wherewith I want to communicate |
- Return values
-
Definition at line 368 of file main.c.
void print_select_case |
( |
| ) |
|
Printing the welcome message.
Will print the options that you will have in this example.
Definition at line 393 of file main.c.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
The main function.
Definition at line 414 of file main.c.