Re: [Tailor] Re: vcpx library.



>     Stephen> I'd like to use it for working copy management in meld
>     Stephen> instead of reinventing the wheel. Are you interested in
>     Stephen> developing it as a standalone library to be used in this
>     Stephen> way?
> 
> Can you explain better what kind of library do you have in mind?

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

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

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

for entry in working_copy:
	# each entry has minimally a name and status
	# depending on the vc system, it may also have
	# a tag, branch, revision id, etc
	if entry.status & vcpx.STATUS_LOCALLY_MODIFIED:
		print "M",
	elif entry.status & vcpx.STATUS_UNVERSIONED:
		if not (entry.status & vcpx.STATUS_IGNORED):
		print "?",
	else:
		print " ",
	print entry.name



Perhaps to examine local changes one could write:

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



I was going to write an interface so that different vc systems would be
pluggable into meld, but it seems like vcpx has already done most of the
work and already supports many systems.

Have I explained that well?

Regards,
Stephen.




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