Mon 01 Dec 2003 09:21:00 PM UTC, comment #8:
Yep, that seems fixed. However, the reported path is always
./{arch}/..., even when cwd isn't at the root of a tree.
That's not related to this bug, however (it occurs with the
tla source, for example).
This bug seems fixed.
|
Sat 01 Nov 2003 10:45:58 PM UTC, comment #2:
Hm, since attaching the patch didn't work, now sending it inline ...
--- orig/libarch/file-diffs.c
+++ mod/libarch/file-diffs.c
@@ -15,6 +15,7 @@
#include "tla/libarch/cached-inventory.h"
#include "tla/libarch/local-cache.h"
#include "tla/libarch/inv-ids.h"
+#include "tla/libarch/invent.h"
#include "tla/libarch/file-diffs.h"
@@ -30,10 +31,15 @@
t_uchar * orig_loc = 0;
t_uchar * orig_path = 0;
int status = 2;
+ struct arch_inventory_options inv_options;
mod_path = file_name_in_vicinity (0, tree_root, mod_loc);
safe_chdir (tree_root);
- id = arch_inventory_id (arch_unspecified_id_tagging, 0, mod_loc, 0, 0, 0);
+
+ mem_set0 ((t_uchar *)&inv_options, sizeof (inv_options));
+ arch_get_inventory_naming_conventions (&inv_options, tree_root);
+
+ id = arch_inventory_id (arch_unspecified_id_tagging, inv_options.untagged_source_category, mod_loc, 0, 0, 0);
cached_tree = arch_find_or_make_local_copy (out_fd, ".", 0, 0, archive, revision);
if (!cached_tree)
|
Sat 01 Nov 2003 10:39:23 PM UTC, comment #1:
arch_file_get_or_diff specifies 0 as 'untagged_is_source' argument to
arch_inventory_id, which then returns a null pointer in case of
untagged files.
The appended patch inserts a call to
arch_get_inventory_naming_conventions before, to get a proper value
for untagged_is_source.
BTW, arch_inventory_id internally sets
untagged_is_source = (untagged_is_source == arch_inventory_source);
the function argument `untagged_is_source' sometimes is provided as
result of the above expression, sometimes untagged_source_category
(member of struct arch_inventory_options) is inserted. This will work
for both cases as long as arch_inventory_source is 1 (perhaps no
coincidence).
|