Subversion Ignore Set

This is a discussion on Subversion Ignore Set within the Tech Board forums, part of the Community Boards category; I am trying to set svn:ignore on visual studio 2005 projects and figure out working directories and stuff. I have ...

  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465

    Subversion Ignore Set

    I am trying to set svn:ignore on visual studio 2005 projects and figure out working directories and stuff. I have an svn repository at file:///h:/repository and I make projects with visual studio 2005. I have a limited amount of disk space, and I am trying to really only import project files, executable, and source files into the repository (no debug info). I have an h:/ignore.txt

    Code:
    *.ncp
    *.obj
    *.opt
    *.plg
    *.res
    *.manifest
    *.idb
    *.pdb
    *.htm
    *.ilk
    And I try to ignore debug info and import it into the repository on a project which has not been imported before by doing something like this, H:\Test being a non-working copy VC++ 2005 project:

    Code:
    svn propset -R svn:ignore -F H:\Test H:\ignore.txt
    And I get that H:\Test is not a working copy.

    I don't really get by what it means by a working copy, but I kind of do. What I did was, I tried to make a program which would import the project (svn import), rmdir the project (completely gone, only in repository), and then checkout (svn checkout) the project to make a working copy, and then (svn propset) on that thing I checked out.

    Is this even an appropriate solution?

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I don't really get by what it means by a working copy,
    It means exactly that. A "working copy" essentially means that each directory contains a hidden ".svn" subdirectory containing the metainformation. Without that information, subversion cannot do things like checking status, updating, or setting properties. (Actually, you can set properties directly on a subversion URL, but that requires at least that you did an initial import.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    I know that my problem is not that simple. I simply will not accept it!

    Um, I'll report back, because I need to get the problem with the ignoring stuff consistent because what I'm doing is really inconsistent because of spaces in filenames/stuff already existing in repository/as working copy/thing not being ignored for no reason. Maybe I should use something like Tortoise SVN

    ...

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  4. #4
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Okay. The problem actually has to do with the import. I read in the subversion book that it does this.

    Code:
    /tmp/myproject/branches/
    /tmp/myproject/tags/
    /tmp/myproject/trunk/
                         foo.c
                         bar.c
                         Makefile
    That it like a project. And then

    Code:
    $ svn import /tmp/myproject file:///path/to/repos/myproject -m "initial import"
    Adding         /tmp/myproject/branches
    Adding         /tmp/myproject/tags
    Adding         /tmp/myproject/trunk
    Adding         /tmp/myproject/trunk/foo.c
    Adding         /tmp/myproject/trunk/bar.c
    Adding         /tmp/myproject/trunk/Makefile
    
    Committed revision 1.
    $
    This is very much like what I would like to do, except mine is like '.......... no you don't'. I have a project "H:\VS2005\Projects\Hello World" and I want to import it. I enter the command:

    Code:
    h:/subversion/bin/svn.exe import "H:\Visual Studio 2005\Projects\Hello World" "f
    ile:///h:/repository/Hello World" -m "Test."
    Noting that "h:/repository" is the repository, and I want to put it in it's own directory "h:/repository/Hello World". That command fails with these errors.

    Code:
    svn: Unable to open an ra_local session to URL
    svn: Unable to open repository 'file:///h:/repository/Hello%20World'
    svn: Can't open file 'h:\repository\Hello World\format': The filename, directory
     name, or volume label syntax is incorrect.
    Yeah, fine. But if I just do

    Code:
    h:/subversion/bin/svn.exe import "H:\Visual Studio 2005\Projects\Hello World" "f
    ile:///h:/repository/" -m "Test."
    Then it does not make a directory for the project inside the repository and I get all confused. It will make the tree:

    Code:
    file:///h:/repository/Hello World/
    file:///h:/repository/Hello World.ncb
    file:///h:/repository/Hello World.sln
    file:///h:/repository/Hello World.suo
    file:///h:/repository/debug/
    When I would rather it be

    Code:
    file:///h:/repository/Hello World/Hello World/
    file:///h:/repository/Hello World/Hello World.ncb
    file:///h:/repository/Hello World/Hello World.sln
    file:///h:/repository/Hello World/Hello World.suo
    file:///h:/repository/Hello World/debug/
    Like: repository/project_name/files in project. Question mark?

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Is repository the actual repository you created with svnadmin?

    Personally I use one repository per project. If you don't want that, you need to play with your directory structure. In other words:
    1) Create a directory "temp" in Projects.
    2) Move "Hello World" to Projects.
    3) Import temp.
    4) Check out "Hello World" so that you have a new "Hello World" in Projects.
    5) Move all files that were not in the repository from the old directory to the new.
    6) Delete temp and everything it contains.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 01-18-2008, 03:06 AM
  2. Replies: 4
    Last Post: 01-13-2008, 01:14 AM
  3. The new FAQ
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 08-30-2006, 10:05 AM
  4. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  5. Set default directory with GetTempDir?
    By Bajanine in forum Windows Programming
    Replies: 2
    Last Post: 05-04-2003, 11:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21