Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "User talk:Charley.wang.gmail.com"

Line 1: Line 1:
 +
'''Mylyn Patch:'''
 +
 +
'''Principle:''' As per contributor guidelines, avoid changing Mylyn code whereever possible. In case of failure, fall back on Mylyn's original behaviour (even if that behaviour will not work)
 +
 +
 +
 +
'''Customization cases:'''
 +
 +
1. User changes workflow only (via editworkflow.cgi)
 +
 +
    - Can use original BugzillaOperation enum
 +
 +
    - Certain transitions are version-specific (e.g. reassignbycomponent) -- will have to add verifiers
 +
 +
2. User changes name of statuses in bug_status table
 +
 +
3. Other special user-settings -- e.g. the DUPLICATE action can have different end bug_statuses, unconfirmed status may or may not exist
 +
 +
 +
 +
'''Proposed ''''''Workflow:'''
 +
 +
'''Front-end:''' User has selection box in Repository Preferences to choose a Transition Descriptor File (TDF), and a checkbox to specify that custom workflows are in use. By default, none of these are checked.
 +
 +
'''Back-end: '''If custom workflows are in use, Mylyn checks if TDF exists & is valid. If not, Mylyn then checks if XMLRPC is available & is valid. If either the TDF or XMLRPC are valid, parse their output and figure out the transition table. Render everything according to the transition table. If no custom transition table is available, use Mylyn's original default behaviour.
 +
 +
 +
 +
'''Plan:'''
 +
 +
Add IBugzillaOperation with two implementations -- the default BugzillaOperation enum that is already in use, and a new CustomBugzillaOperation. In addition to the current fields in BugzillaOperation, CustomBugzillaOperation needs to contain: Server String (i.e. operation that must be sent to the server when the user hits Submit), Version Verifier.
 +
 +
Use a TransitionManager that checks if a transition descriptor file or xmlrpc Bug.fields is available and uses available information to create a list of valid transitions. If the file or xmlrpc Bug.fields are not available, fall back on Mylyn default behaviour.<br>
 +
 +
 +
 +
'''Approaching completion:'''
 +
 +
Patch for customization case #1
 +
 +
 +
 +
'''Next step:'''
 +
 +
JUnit testing of current patch. Fix existing issues. Add Transition Descriptor File selection box to Repository Preferences. Add XMLRPC communication.
 +
 +
 +
 +
'''Future:'''
 +
 +
I have a plan and a half-implemented patch for case #2, after which I will work on case #3.
 +
 +
 +
 +
 +
 +
 +
 +
'''EGIt/JGit ignore testing:'''
 +
 +
 +
 
Successfully ignored<br>  
 
Successfully ignored<br>  
  
 
<br>  
 
<br>  
  
{| width="600" cellspacing="1" cellpadding="1" border="1"
+
{| cellspacing="1" cellpadding="1" border="1" width="600"
 
|-
 
|-
 
| '''Pattern'''''<b><br></b>''  
 
| '''Pattern'''''<b><br></b>''  
Line 94: Line 156:
 
<br>  
 
<br>  
  
{| width="600" cellspacing="1" cellpadding="1" border="1"
+
{| cellspacing="1" cellpadding="1" border="1" width="600"
 
|-
 
|-
 
| '''Pattern'''  
 
| '''Pattern'''  

Revision as of 09:33, 22 April 2010

Mylyn Patch:

Principle: As per contributor guidelines, avoid changing Mylyn code whereever possible. In case of failure, fall back on Mylyn's original behaviour (even if that behaviour will not work)


Customization cases:

1. User changes workflow only (via editworkflow.cgi)

    - Can use original BugzillaOperation enum

    - Certain transitions are version-specific (e.g. reassignbycomponent) -- will have to add verifiers

2. User changes name of statuses in bug_status table

3. Other special user-settings -- e.g. the DUPLICATE action can have different end bug_statuses, unconfirmed status may or may not exist


'Proposed 'Workflow:

Front-end: User has selection box in Repository Preferences to choose a Transition Descriptor File (TDF), and a checkbox to specify that custom workflows are in use. By default, none of these are checked.

Back-end: If custom workflows are in use, Mylyn checks if TDF exists & is valid. If not, Mylyn then checks if XMLRPC is available & is valid. If either the TDF or XMLRPC are valid, parse their output and figure out the transition table. Render everything according to the transition table. If no custom transition table is available, use Mylyn's original default behaviour.


Plan:

Add IBugzillaOperation with two implementations -- the default BugzillaOperation enum that is already in use, and a new CustomBugzillaOperation. In addition to the current fields in BugzillaOperation, CustomBugzillaOperation needs to contain: Server String (i.e. operation that must be sent to the server when the user hits Submit), Version Verifier.

Use a TransitionManager that checks if a transition descriptor file or xmlrpc Bug.fields is available and uses available information to create a list of valid transitions. If the file or xmlrpc Bug.fields are not available, fall back on Mylyn default behaviour.


Approaching completion:

Patch for customization case #1


Next step:

JUnit testing of current patch. Fix existing issues. Add Transition Descriptor File selection box to Repository Preferences. Add XMLRPC communication.


Future:

I have a plan and a half-implemented patch for case #2, after which I will work on case #3.




EGIt/JGit ignore testing:


Successfully ignored


Pattern
Target
Notes
/*.st?
/test.stp

/*.sta[0-9]
/test.sta1

/*/*.c
/src/a.c

/src/
/src
Where /src is a directory
/src/
/src/new/a.c

/src/
/src/a.c

.stp
/test.stp
No "/" in pattern, match filename
.stp
/src/test.stp
No "/" in pattern, match filename
 !/test.stp
/test.stp
/test.stp

/src/new
/src/new/
Ignore folder
/src/new
/src/new/a.c
Ignore contents of folder
/src/new/
/src/new/a.c

src
/src/a.c

src
/src/new/a.c

new /src/new/a.c Ignore folder (name-only match)
 ?rc /src/a.c
 ?rc /src/new/a.c
/new/a/b1 /src/new/a/b1/*
b1 /a/b1/*
b? /a/b1/*


Successfully not ignored (File added to parent's .gitignore)


Pattern Target Notes
/*.c /src/a.c * should not expand to '/'
/src/new/asdf/ /src/new/asdf Ends with "/", only match dirs

/*.st?
!/test.stp

/test.stp Pattern + higher priority negation
#/test.stp /test.stp Comment
 !/a.c

/src/a.c

/src/a.c Where !/a.c is in src/.gitignore
 !/test.stp

/test.stp
!/test.stp

/test.stp Negation chaining

Back to the top