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