[SVN] r7480 (Git)

Allan Odgaard throw-away-1 at macromates.com
Sun Jun 10 15:41:04 UTC 2007


My motivation for starting this bundle is that I want a nice SCM bundle that other SCM bundles can clone (and re-use the shared plumbing).

The current state of this bundle is far from being that, it only has a Status… command for git (which might be quite incomplete) and everything is just thrown into the SCM::Git class.

But the components I think could be shared among SCM bundles (and commands within these) are:

 Status: I know many svn commands have their own mapping of letter → status text and foreground/background color. This should be encapsulated into a SCM::Status class where instances are mostly created by name (and can then be queried about color, etc.)
 
 Selection: Most commands have logic to check if there is a selection (and then various variations of how to decode TM_SELECTED_FILES into an array), a project folder, a current directory, etc.
 
 Paths: Paths need to be pretty printed, that means, if we run on the project folder, they should be relative to this one, if we run on a selection, preferably they should be relative to the nearest common ancestor of the selection, finally they should fall back to being shown with the home folder abbreviated using a tilde — many commands presently have some custom logic that sort of does the above (but not quite, and each one re-invents the wheel).

Another issue is that of templates, I am thinking that templates for status, blame, and log can at least to some degree be re-used between SCM bundles.

Comments, ideas, etc. welcome.

Changed:
A   trunk/Work in Progress/Bundles/Git.tmbundle/
A   trunk/Work in Progress/Bundles/Git.tmbundle/Commands/
A   trunk/Work in Progress/Bundles/Git.tmbundle/Commands/Status….tmCommand
A   trunk/Work in Progress/Bundles/Git.tmbundle/Support/
A   trunk/Work in Progress/Bundles/Git.tmbundle/Support/lib/
A   trunk/Work in Progress/Bundles/Git.tmbundle/Support/lib/git.rb
A   trunk/Work in Progress/Bundles/Git.tmbundle/info.plist



More information about the textmate-dev mailing list