gnu-arch-users
[Top][All Lists]
Advanced

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

[Gnu-arch-users] Re: Are pristine trees really dead?


From: Miles Bader
Subject: [Gnu-arch-users] Re: Are pristine trees really dead?
Date: 20 Dec 2003 09:42:44 +0900

Tom Lord <address@hidden> writes:
>     > If you do a normal 'get', it will not populate the library since 'get'
>     > does not need anything from it. Instead, try 'get --link'.
> 
> or 'get --library'.

... but now I notice that _without_ --link or --library, tla get will
indeed still create a pristine tree, even if you have a greedy library
(I'm not sure why I thought differently before!).

Tom, what do you think of the following patch, to basically use
--library by default if there's a greedy library?

[A possible alternative in this case would be to simply _not_ make the
pristine tree if there's a greedy library (meaning the next time you did
something needing a pristine, it would create the library entry then);
however that's slightly less efficient if you're going to need the entry
soon anyway (especially with a remove archive).]


* comparing to address@hidden/tla--devo--1.1--patch-67
M  libarch/cmd-get.c

* modified files

--- orig/libarch/cmd-get.c
+++ mod/libarch/cmd-get.c
@@ -317,6 +317,11 @@
 
     rmrf_file (tmp_dir);
 
+    if (!library && !hardlinks)
+      /* Prefer a library entry over making a pristine tree, if there's
+        a greedy library.  */
+      library = arch_greedy_library_wants_revision (archive, revision);
+
     /* ensure revision is in the library if needed
      */
     if (library)


-Miles
-- 
Love is a snowmobile racing across the tundra.  Suddenly it flips over,
pinning you underneath.  At night the ice weasels come.  --Nietzsche




reply via email to

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