Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Version control refactoring suggestions
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Peter Dimov  
View profile  
 More options Jan 29 2007, 10:11 am
From: Peter Dimov <peter.di...@calitko.org>
Date: Mon, 29 Jan 2007 16:11:31 +0100
Local: Mon, Jan 29 2007 10:11 am
Subject: Version control refactoring suggestions
Hello everybody,

A main assumption in current implementation is that a revision is global
to the whole repository. This is however not the case with bazaar and
other distributed version control systems.

Additionally there is some unnecessary duplication of functionality in
the current api. For example, there are two ways to create a changeset –
either from a Changeset.get_changes() from a Repository.get_changes().
In the first case path restriction is implemented by Trac, whereas in
the second it is implemented by the version control backend. This could
surely be avoided.

Let me do a summary of the functionality we have:

changeset – displays all / some changes committed in a single revision
diff – displays all / some changes committed over multiple revisions,
possibly between different paths
log – lists all revision that modify a given path
source – lists the inventory at a given revision

Suggestions:

1. Since a changeset is a special diff, I’d suggest that they share
implementation in class Changeset.

2. Also, revision is currently just a string and that is insufficient
(e.g. to better implement bzr support) and IMHO we’d better make a class
out of it. A revision would be a snapshot of (part of) the repository at
the time of a commit. Let that be the class Revision.

3. A Revision object could be extracted from a Repository from a
revision number (currently hex allowed) and path (to support bzr like
systems). The reason is that revno 100 at path1 would be different from
revno 100 at path2.

4. A Changeset would then be the difference between two nodes. A node is
a file or dir at a specific revision (as it is now). A changeset
(current implementation) would be the difference between '/' at revno 99
and '/' at revno 100.

To summarize, here are the classes with some of their methods:

Repository
        get_revision (path, rev)
        get_revisions (start, end)

Revision
        properties: revno, message, time, author, etc.
        get_node (path)
Changeset
        create (node1, node2)
        get_changes()

I plan to try this out with the bzr backend (Aaron Bentley's trac+bzr)
and would really appreciate if somebody gives me feedback, or even
better, works in parallel on the svn backend.

Regards,

Peter


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.