Skip to main content

SVN Dos and Dont’s

The Dos and Dont’s
Dos
Don’ts
  • Check out the latest revision before start working, and check your changes back in as soon as possible.
  • Don’t use svn locks. Commits in subversion are transactional and locks are almost always unnecessary.
  • Commit often, one change at a time. Easier to read and debug.
  • Don’t include multiple changes in a single large commit.
  • Look at the diff before committing, make sure you can answer the question: what are you changing? You’ll need the answer for the next point.
  • Don’t tidy up the code while making changes. If tidying up is necessary, do it in a separate commit (see Bruno’s comment).
  • Document changes in the commit message, use the -m switch in the command line or the entry field provided by TortoiseSVN or other SVN-GUIs.
  • Don’t leave the message field empty. If the change requires more than a few lines of explanations, consider breaking it down into multiple commits.
  • Reference tracker tickets in the comment when applicable.
  • Don’t fill the message field with prose. If the nature of the change requires a lot of explanations (e.g. new API), provide documentation in separate file(s) and refer to it.
  • Use svn:externals or scripts to fetch and unpack external dependencies.
  • Don’t commit external dependencies (e.g. “SDK”) to the repository.
  • Discuss conflicting choices and seek consensus on the hugin-ptxmailing list. Consider adding alternative functionality rather than replacing existing one.
  • Don’t override other committers code just because you disagree with their solution.
  • Consider branching when the development work you initiate will take more than a day or two to complete.
  • Don’t regret the code lost because you did not commit it right away.
  • Test your changes locally before committing. If you must leave unfinished or untested work, wrap it in an always false condition so that it won’t affect other users.
  • Don’t commit changes without having them tested locally.
  • Keep in mind that the code is for multiple platforms. Ask users of other platforms to check if your changes affect their platforms adversely.
  • Don’t ignore other platforms and silently break the code for them.
  • Ask on the hugin-ptx mailing list for advice. If you are unsure whether you should commit, provide a patch that other users can apply and test.
  • Don’t be shy. Your contribution is always welcome. If it breaks something, we’ll work together to fix it.
  • Give credit where credit is due. If adding to SVN code from a third party patch, mention the third party as originator of the code. If making a change on user feedback, mention the user.
  • Don’t commit third party changes without testing and understanding what they do first.
  • Keep files that do not require version control in appropriate resources such as Flickr, Vimeo, or webspace that is donated to the community.
  • Don’t clutter the repository with files that do not require version control and use a lot of space/bandwidth, such as podcasts and presentations.

Comments

Popular posts from this blog

Top 10 ASP.NET Web API Interview Questions

What is ASP.NET Web API? ASP.NET Web API is a framework that simplifies building HTTP services for broader range of clients (including browsers as well as mobile devices) on top of .NET Framework. Using ASP.NET Web API, we can create non-SOAP based services like plain XML or JSON strings, etc. with many other advantages including: Create resource-oriented services using the full features of HTTP Exposing services to a variety of clients easily like browsers or mobile devices, etc. What are the Advantages of Using ASP.NET Web API? Using ASP.NET Web API has a number of advantages, but core of the advantages are: It works the HTTP way using standard HTTP verbs like  GET ,  POST ,  PUT ,  DELETE , etc. for all CRUD operations Complete support for routing Response generated in JSON or XML format using  MediaTypeFormatter It has the ability to be hosted in IIS as well as self-host outside of IIS Supports Model binding and Validation Support for OD...

Extension methods in C#

Consider the class C# 1 2 3 4 5 6 7 8 9 10 11 12 13          namespace ExtensionMethod      {          public class testClass {              public string sayHello ( ) {              return "Hello" ;            }        }      }     Invoke the above from your form using C# 1 2 3 4 5 6          testClass test = new testClass ( ) ;      MessageBox . Show ( test . sayHello ( ) ) ;     This will show “Hello” in message box. Consider the scenario where you don...

What is cookie? Advantages and disadvantages of cookies?

What is cookie? A cookie is a small piece of text file stored on user's computer in the form of name-value pair. Cookies are used by websites to keep track of visitors e.g. to keep user information like username etc. If any web application using cookies, Server send cookies and client browser will store it. The browser then returns the cookie to the server at the next time the page is requested. The most common example of using a cookie is to store User information, User preferences, Password Remember Option etc.It is also one of the common and mostly asked interview questions. Some facts about Cookie Here are a few facts to know about cookies: · Cookies are domain specific i.e. a domain cannot read or write to a cookie created by another domain. This is done by the browser for security purpose. · Cookies are browser specific. Each browser stores the cookies in a different location. The cookies are browser specific and so a cookie created in one browser(e.g in Google Chrome...