Re: [Tailor] Re: vcpx library.



>>>>> "Stephen" == Stephen Kennedy <stevek gnome org> writes:

    Stephen> I would like to use vcpx to manage a local working copy,
    Stephen> without having to worry about the fine details of the
    Stephen> underlying vc system.

Uhm, that may be interesting, although a little off topic for tailor.
I mean, tailor does not currently care about local changes, as it is
driven almost only by source changesets.

I'm planning to separate WorkingDirs from Repositories, basically
moving low level commands out of the way, in other words abstracting
the "add this file" action. WorkingDirs at that point would be just
some sort of an adapter between Changeset and Repository.

This could easily host the "status" of the working copy machinery,
maybe exposed as some sort of "uncommitted" Changeset, see below.

    Stephen> For example, I would like to be able to write something
    Stephen> like this to browse a working copy.

    Stephen> # vcpx detects the vc system and reads entries
    Stephen> working_copy = vcpx.WorkingCopy("/some/local/path")

IMHO, a changeset centric approach fits more natural in current tailor
framework

    whatsnew = working_copy.unappliedChangeset()
    for entry in whatsnew.entries:
        ...
    
    Stephen> Perhaps to examine local changes one could write:

    Stephen> list_of_files = [...] # list of local files patch =
    Stephen> working_copy.diff( list_of_files ) for file in
    Stephen> patch.files: copy_file( file, some_temp_dir )
    Stephen> patch.apply( some_temp_dir ) for file in patch.files:
    Stephen> meld.launch_visual_comparison( file )

Changeset and ChangesetEntry already have a "unidiff" slot, that is
currently used/filled only by the darcs backend.

So, to sum up: I'll gladly accept any contribute either in code or
ideas that could help you using vcpx as library in that way, but I'm
afraid I won't be able to do it very soon...

Let me know,
ciao, lele.
-- 
nickname: Lele Gaifax	| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas	| comincerò ad aver paura di chi mi copia.
email: lele seldati it	|		-- Fortunato Depero, 1929.



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