[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: register-archive potential ambiguity

From: Erik Toubro Nielsen
Subject: Re: [Gnu-arch-users] Re: register-archive potential ambiguity
Date: Tue, 09 Sep 2003 23:26:13 +0200
User-agent: Gnus/5.090018 (Oort Gnus v0.18) XEmacs/21.4 (Portable Code, linux)

Miles Bader <address@hidden> writes:

> Samium Gromoff <address@hidden> writes:
> >     Say we have an archive (i don`t think there is difference between
> >  local/remote in this case) address@hidden
> > 
> >     Could there be any problem if i register it like:
> > 
> >     tla register-archive address@hidden 
> >
> There's no fundamental problem, but note that if the archive contains
> tags that point to address@hidden/...' then it won't realize that it
> can get them from address@hidden, it will look for them in whatever
> archive is register as address@hidden (if any).
> Sometimes it can be useful to have the two names be different, e.g., if
> you want to to keep track of multiple copies of the same `logical'
> archive.  I have address@hidden' point to the main R/W copy of
> my archive, and address@hidden' point to the mirror on
>, even though in some sense they're the same archive.

I do the same but the example here shows that it is not well-defined
in all cases. For instance if I mirror Toms archive locally under
another archive-"handle":


and do (after I have mirrored tla--devo--1.1)

       > tla get address@hidden/tla--devo--1.1--patch-1
       * from archive cached: address@hidden/tla--devo--1.1--base-0
       * patching for revision: address@hidden/tla--devo--1.1--patch-1
       * making pristine copy
       * tree version set address@hidden/tla--devo--1.1

       > cd tla--devo--1.1--patch-1
       > tla what-changed
       what-changed: illegal revision name: address@hidden/tla--devo--1.1--

An strace reveals that tla tries to "access" the nonexistent directory
but the contents in the filesystem is

It could be "fixed" with something like this, but is it the right

--- orig/libarch/cmd-getrev.c
+++ mod/libarch/cmd-getrev.c
@@ -171,6 +171,13 @@
     archive = arch_parse_package_name (arch_ret_archive, default_archive, 
     arch = arch_archive_connect (archive, 0);
+    if (str_cmp(archive, arch->official_name) != 0) {
+      if (! silent)
+        safe_printfmt (1, "* Using official archive name %s instead of %s\n", 
arch->official_name, archive);
+      lim_free (0, archive);
+      archive = str_save(0, arch->official_name);
+    }
     if (arch_valid_package_name (revision_spec, arch_maybe_archive, 
arch_req_package, 0))
         t_uchar * package = 0;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]