neo618 / tortoisesvn

Automatically exported from code.google.com/p/tortoisesvn
0 stars 0 forks source link

Patch Recorder #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Feature Proposal
================

Name
----

Patch Recorder

Chosen deliberately to not collide with the
feature that might be added to the SVN core
sometime in the future.

Common names for similar features: 

* offline commits
* pre-recorded commits
* commit queue

Purpose
-------

Allow the user to perform a commit-like actions
without connection to the repository:

* select changes to commit ("recorded patch")
* assign commit comment
* review the change
* allow multiple recorded patches for the same file
* option to show w/c modifications as if the
  recorded patches had actually be sent to the 
  repository
* commit pre-recorded patches to the repository 
  upon user request

There are already solutions like svngit that allow
offline commits. However, these do not integrate
with SVN clients and may be limited wrt. to SVN
feature support.

Part of this experiment is to find out what 
functionality is required for offline commits
and how that should integrate with existing
SVN features.

Functional Details
------------------

The following will be recorded per patch:

* list of file operations:
    - operation (A, M, R, D)
    - path
    - copy-from path
    - BASE revision (= copy-from rev for A)
    - isBinary flag
    - isFolder flag
* per changed node: 
    - props + file content before patch
    - props + file content after patch
      (patch / udiff files will be created
       dynamically)
* a comment
* a time stamp

A patch will be recorded as follows:

* directly from "commit" dialog
* "record only" button or checkbox
* patch info is then created automatically,
  taking existing patches into account

Another option allows to show to only changes
not already covered by pre-recorded patches:

* new "exclude pre-recorded patches" checkbox
  in "commit" dialog
* patch recorder is asked for current status
  of every path. BASE content has to be passed
  in as well. Result is unchg / M / A etc plus
  BASE content after applying all patches
* op is used to reduce change list and to
  show diffs (simply a different BASE content)

Recorded patches can be inspected and modified 
in the new "patch recorder" dialog.

* available from explorer context menu next
  to Commit entry (only available if there is
  at least one patch in the recorder)
* lists patches and their content similar to log 
  dialog (but with fewer options / operations)
* patch manipulation
    - delete seleted patches
    - merge selected patches
    - split patch
      (i.e move selected files to new patch)
    - edit comment
    - edit patch 
      (i.e modify "after" file via diff tool)
    - move part to previous 
        modify "before" file via diff tool,
        make it the "after" file of prev. patch
    - move part to next:
        modify "after" file via diff tool,
        make it the "before" file of prev. patch
    - check integrity:
        mark patches with this_before (node) !=
        pervious_after (node)
* commit button commits selected patches

Committing recorded patches:

* update and commit dialog will try to contact
  the repository for the oldest patch. If the
  repo is available, ask user whether patches 
  shall be uploaded. If "yes", the "patch recorder"
  dialog pops up.
* user (multi-)selects patches in "patch recorder"
  dialog and hits the "commit button"
* patches get committed in order of their timestamp,
  stop as soon as any user op was answered with 
  "cancel"
* committing a patch:
    - create a temporary, sparse w/c covering
      the changed paths
    - compare file contents & props against
      the recorded "before change" data;
      remember result as "merge was required"
    - replay changes
    - user must resolve conflicts immediately
      (TMerge / user-defined merge tool)
    - if merge was required, ask user to review
      change (bring up normal c/i dialog with
      comment preset accordingly)
    - otherwise, commit automatically 
    - delete temp. w/c
    - remove patch from recorder
* user has to update its w/c manually

TSVN Integration
----------------

The feature will be implemented on a branch of the 
TSVN main development line as part of the TortoiseProc 
project. Otherwise, numerous files needed to be 
duplicated and were hard to sync etc.

Impact on existing TSVN functionality is kept low
by extending only a few selected dialogs. Furthermore,
these extensions are of the form:

    AddExtraButtons();

or

    CallNewFunctionality();

The deliverable will be an experimental build of the
otherwise unchanged 1.7 code. During installation,
the user will be asked to accept the conditions of
the "experimental" build. Standard and experimental
build cannot be used side-by-side with the same bitness.

Original issue reported on code.google.com by tortoisesvn on 6 Feb 2011 at 5:29

GoogleCodeExporter commented 9 years ago

Original comment by tortoisesvn on 6 Feb 2011 at 5:30