subversion: Wie einen falschen svn commit rückgängig machen? – How to revert a bad commit

29. Februar 2012 at 14:07

Im SVN wurde ein falscher Commit getätigt? Und der soll nun wieder rückgängig gemacht werden? Wie ein SVN Commit reverten? Ganz einfach mit folgendem Befehl von der aktuellen Version zur vorherigen mergen:

svn merge -r [current_version]:[previous_version] [repository_url]

Danach die Änderungen mit dem folgenden Befehl in SVN übertragen:

svn commit

Fertig! 😉

 

Alle lokalen Änderungen per svn revert zurück setzen

17. Februar 2012 at 12:28

Mit dem folgenden Command könnt ihr alle lokal geänderten Dateien inkl. Unterordner reverten (leider fehlt dem SVN-Command dafür eine Option):

svn st -q | awk '{print $2;}' | xargs svn revert

SVN Client für Windows

6. Januar 2012 at 11:28

Ihr sucht ein guten SVN Client für Windows mit SVN Console?
Ich empfehle euch das kostenlose tool tortoisesvn !

How to ignore files in a directory under subversion control

26. Mai 2011 at 16:45
# ---------------------------------------------------------------------
#      Ignore all the .txt files in the /trunk/Blah/ directory
# ---------------------------------------------------------------------
# Go to the directory
cd trunk/Blah/              # The directory with the files
# Start editing the properties for the current directory
svn propedit svn:ignore .   # Opens an editor (SVN_EDITOR, EDITOR)
# Add the following value with a new line, save, and exit:
*.txt
# See that things worked
svn propget svn:ignore .    # So you can see the properties
svn status --no-ignore      # You should see an 'I' next to the ignored files
# Commit
svn commit -m "New Ignores" # You must commit the new property change

Overview: svn status codes / svn stat

18. April 2011 at 18:09

Overview about svn status codes (after typing of svn stat):

Name

svn status — Print the status of working copy files and directories.

Synopsis

svn status [PATH...]

Description

Print the status of working copy files and directories. With no arguments, it prints only locally modified items (no repository access). With --show-updates, add working revision and server out-of-date information. With --verbose, print full revision information on every item.

The first five columns in the output are each one character wide, and each column gives you information about different aspects of each working copy item.

The first column indicates that an item was added, deleted, or otherwise changed.

‚ ‚
No modifications.

‚A‘
Item is scheduled for Addition.

‚D‘
Item is scheduled for Deletion.

‚M‘
Item has been modified.

‚C‘
Item is in conflict with updates received from the repository.

‚X‘
Item is related to an externals definition.

‚I‘
Item is being ignored (e.g. with the svn:ignore property).

‚?‘
Item is not under version control.

‚!‘
Item is missing (e.g. you moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted).

‚~‘
Item is versioned as a directory, but has been replaced by a file, or vice versa.

The second column tells the status of a file’s or directory’s properties.

‚ ‚
No modifications.

‚M‘
Properties for this item have been modified.

‚C‘
Properties for this item are in conflict with property updates received from the repository.

The third column is populated only if the working copy directory is locked.

‚ ‚
Item is not locked.

‚L‘
Item is locked.

The fourth column is populated only if the item is scheduled for addition-with-history.

‚ ‚
No history scheduled with commit.

‚+‘
History scheduled with commit.

The fifth column is populated only if the item is switched relative to its parent (see the section called “Switching a Working Copy”).

‚ ‚
Item is a child of its parent directory.

‚S‘
Item is switched.

The out-of-date information appears in the eighth column (only if you pass the --show-updates switch).

‚ ‚
The item in your working copy is up-to-date.

‚*‘
A newer revision of the item exists on the server.

The remaining fields are variable width and delimited by spaces. The working revision is the next field if the --show-updates or --verbose switches are passed.

If the --verbose switch is passed, the last committed revision and last committed author are displayed next.

The working copy path is always the final field, so it can include spaces.

Alternate Names

stat, st

Tutorial: Eclipse Helios and SVN support

1. Juli 2010 at 20:32

Wie viele Java- und PHP-Entwickler benutze ich Eclipse, in der aktuellen Version Helios genannt. Neben dem freien PDT-Plugin von Zend ist ein Subversion-Plugin wichtig. Da es bei der Installation über den Software-/Update-Manager probleme gibt, hier der Weg wie es auf jedenfall funktioniert.

Führt einfach folgende Schritte in Eclipse aus:

  1. Help->Install New Software
  2. wählt Subversive SVN Team Provider (Incubation)
  3. Ihr müsste Eclipse neu starten, evtl. bekommt ihr eine  Fehlermeldung (war bei mir so), danach die Meldung dass ihr eine SVN connector library wählen sollt:: Selected SVN connector library is not available or cannot be loaded …’. Instead you rather install a connector library.
  4. Help->Install New Software
  5. Add a site
  6. Ich benutze: http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ , ihr könnt auch das SVNKit oder den JavaHL connector benutzen.
  7. entpackt den Subversive SVN Connectors
  8. Wählt Subversive SVN Connectors, SVNKit (1.3.0), JavaHL (1.6.0) and it’s native libraries.
  9. Eclipse neustarten
  10. Den Conector ggf. konfigurieren unter Window->Preferences->Team->SVN->SVN Connector.

Jetzt solltet ihr Subversion-Support haben!