bugGNU arch -- a revision control system - Bugs: bug #5919, multi-path revision libraries and...

 
 

bug #5919: multi-path revision libraries and new hook "cached-revision"

Submitter:  Pau Aliagas <paulinux>
Submitted:  Mon 13 Oct 2003 03:51:32 PM UTC
   
 
Category:  tla Severity:  3 - Normal
Item Group:  small feature idea Status:  None
Privacy:  Public Open/Closed:  Open
Release:  tla--devo--1.1
Fixed Release: 
Merge Request?:  yes -- merge from my archive
Your Archive Name:  linuxnow@newtral.org--arch-2003/tla--devo--1.1
Your Archive Location: 
Assigned to:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 17 Nov 2003 05:24:00 AM UTC, comment #5: 

Ah, I can't usefully work on this until the hard link stuff is merged in, as it's dependent on it - I don't have time to redo it separately. I will review when the hardlink stuff is in. As far as doco goes, thats low priority just now - if you have time to hack on anything, do up the verification stuff for the hard link trees.

Robert Collins <robertc>
Thu 13 Nov 2003 07:05:02 AM UTC, comment #4: 

http://arch.newtral.org/{archives}/arch-2003

Again, if it is accepted, I'll add the necessary documentation.

Pau Aliagas <paulinux>
Sat 08 Nov 2003 11:21:18 AM UTC, comment #3: 

Uhm, your archive location is an essential component to be able to pull your patches. I'd like to review this for you....

Robert Collins <robertc>
Wed 22 Oct 2003 09:16:33 PM UTC, comment #2: 

Add final corrections:
linuxnow@newtral.org--arch-2003/tla--devo--1.1--patch-9
linuxnow@newtral.org--arch-2003/tla--devo--1.1--patch-10

The final hook name is `find-cached-revision'. An example of hook script follows:

...
case $1 in
...
find-cached-revision)
        # echo "find-cached-revision $ARCH_ARCHIVE/$ARCH_REVISION" | mail pau -s "find-cached-revision $ARCH_ARCHIVE/$ARCH_REVISION"
        # tla library-add $ARCH_ARCHIVE/$ARCH_REVISION
        tla library-add -d ~/.arch-cache $ARCH_ARCHIVE/$ARCH_REVISION
        echo -n "~/.arch-cache" 1>&3
        break
        ;;

esac

You can add a library in the hook, in the default revision library or in an alterante one and return the path to it using file descriptor 3.

If you always add a revision to the library, a pristine-tree is never generated because entries in libraries are searched for before. You save space because you share hard links and... if you get -l your tree, operation is almost instantaneous because you don't copy anything. Lightening fast.

It's working flawlessly for me.

Pau Aliagas <paulinux>
Wed 22 Oct 2003 09:16:25 PM UTC, comment #1: 

Add final corrections:
linuxnow@newtral.org--arch-2003/tla--devo--1.1--patch-9
linuxnow@newtral.org--arch-2003/tla--devo--1.1--patch-10

The final hook name is `find-cached-revision'. An example of hook script follows:

...
case $1 in
...
find-cached-revision)
        # echo "find-cached-revision $ARCH_ARCHIVE/$ARCH_REVISION" | mail pau -s "find-cached-revision $ARCH_ARCHIVE/$ARCH_REVISION"
        # tla library-add $ARCH_ARCHIVE/$ARCH_REVISION
        tla library-add -d ~/.arch-cache $ARCH_ARCHIVE/$ARCH_REVISION
        echo -n "~/.arch-cache" 1>&3
        break
        ;;

esac

You can add a library in the hook, in the default revision library or in an alterante one and return the path to it using file descriptor 3.

If you always add a revision to the library, a pristine-tree is never generated because entries in libraries are searched for before. You save space because you share hard links and... if you get -l your tree, operation is almost instantaneous because you don't copy anything. Lightening fast.

It's working flawlessly for me.

Pau Aliagas <paulinux>
Mon 13 Oct 2003 03:51:32 PM UTC, original submission:  

As discussed, as a first step to farewell the inefficient pristine trees, we needed multi-path revision libraries and a way to create them on demand in an ad-hoc directory.

With sparse revision libraries and the possibility of specifying a path for the library commands, the only part missing was how to create and retrieve the revision form the desired tree. My choice has been to:
-add a way to exchange information with the hook script via fd 3; the hook script can return whatever it need via this fd and the hooks can use as they need or just ignore it.
-create a `cached-revision' hook that uses this information to look in the returned path for the revision, instead of the default library.

This is implemented in:
linuxnow@newtral.org--arch-2003/tla--devo--1.1--patch-7
linuxnow@newtral.org--arch-2003/tla--devo--1.1--patch-8

A complete description will be posted to the arch-users list.

Pau Aliagas <paulinux>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-12ab.
Corresponding source code