00001
00002
00003
00004
00005
00006
00007
00008
00053 #include <unistd.h>
00054 #include <fcntl.h>
00055
00056 #include "global.h"
00057 #include "est_ops.h"
00058 #include "cp_mv.h"
00059 #include "url.h"
00060 #include "status.h"
00061 #include "waa.h"
00062 #include "warnings.h"
00063
00064
00067 int info__action(struct estat *sts)
00068 {
00069 int status;
00070
00071
00072 sts->was_output=0;
00073 sts->flags |= RF_PRINT;
00074
00075
00076 STOPIF( st__status(sts), NULL);
00077 STOPIF( st__print_entry_info(sts), NULL);
00078
00079 ex:
00080 return status;
00081 }
00082
00083
00084
00085 int info__work(struct estat *root, int argc, char *argv[])
00086 {
00087 int status;
00088 char **normalized;
00089
00090
00091 STOPIF( waa__find_common_base(argc, argv, &normalized), NULL);
00092
00093
00094 status=url__load_list(NULL, 0);
00095 if (status==ENOENT)
00096 STOPIF( wa__warn(WRN__NO_URLLIST, status, "No URLs defined"), NULL);
00097 else
00098 STOPIF_CODE_ERR( status, status, NULL);
00099
00100
00101
00102 opt_recursive-=2;
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 if (opt__get_int(OPT__VERBOSE) == VERBOSITY_DEFAULT_v)
00114 opt__set_int( OPT__VERBOSE, PRIO_CMDLINE,
00115 opt__get_int(OPT__VERBOSE) | VERBOSITY_COPYFROM);
00116
00117
00118
00119 status=waa__read_or_build_tree(root, argc, normalized, argv, NULL, 1);
00120 if (status == -ENOENT)
00121 {
00122 printf("No tree information available. Did you commit?\n");
00123 status=0;
00124 goto ex;
00125 }
00126 STOPIF( status, "Cannot get tree information");
00127
00128 ex:
00129 return status;
00130 }
00131