TFS - Shelve sets - You cannot unshelve a change to $/Business/Path/Logic because there is a conflict on this item in your workspace - visual-studio-2012

I wanted to transfer my work from on pc to another (at home). I checked in a shelve set on my main pc. I pulled it from my laptop fine. I then updated my code on my main pc and made another shelve set. I pulled it again on my laptop. It was taking some, so I cancelled the operation and deleted the whole directory on my laptop disk. When I tried getting the shelve set again I just get
Multiple error occurred during the operations, the first of which is
displayed below. A full error list is available in the Output Window
You cannot unshelve a change to $/Business/Path/Logic because there is
a conflict on this item in your workspace
The output window lists about 100 of these:
You cannot unshelve a change to $/Business/Path/Logic/app.config because there is
a conflict on this item in your workspace. You must first resolve the conflict or exclude this file when you unshelve the shelveset.
What? I just want a new copy of the latest shelve set. I tried mapping to a new path on my laptop, but same thing.
Thanks
Thomas

Sounds like when you "deleted the whole directory" on your laptop source control actually picked this up as a change. If that is the case your laptop should actually show that you have changes in your "My work" area. If you do and didn't really intend to make that change just undo the checkout.
This version of VS is a little different... even if you make a change using the Explorer and not within the VS source control explorer it can pick that change up. This is normally a great thing... you can use whatever editor you like and it will count that as a change. But you have to be aware that it is going to do that so that you don't accidently make unintended changes.

Related

Tortoise SVN merging repository with working copy

I've tried searching for answers to my problem but every thread starts talking about branches and trunks and I have no idea what they're talking about.
I'm in a team of 2. We've started working on a single excel spreadsheet. I use SVN update before making my changes, however while I'm making changes, my team-mate also makes changes and commits them before I do.
I was first told that I simply have to update again before I commit and it should merge my team-mate's changes with mine. However when I update the .xlsx file, nothing seems to happen. I open up my local copy again and it isn't showing my team-mates changes. I've tried using the merge option and clicked random things in numerous attempts but nothing works. Nothing I've tried will add my team-mates changes to my working copy. Every time I compare my working copy with the repository, the changes from both of us are all highlighted, but nothing I do seems to merge them together.
The cells we modify in the spreadsheet are different ones, so we don't both make direct changes to the same cell. It should be a simple merge.
This is driving me up the wall, it keeps saying "merge successful" or "update successful" but it isn't doing anything.
.xlsx files are not text-files (they are really zip-archives), don't expect merging of such files from Subversion in any case
You can't have easy teamwork with Office's documents
First of all, xlsx files are binary rather than textual so SVN cannot merge them very well. So two of you working on one such file at the same time will not work well even if nothing goes wrong.
As for why you never saw the changes, probably you still had the file with your changes open in Excel when you did your update, and Excel never prompted to load the new changes.
To correct the immediate situation you can move your version of the file elsewhere, svn update to get the repository version back, and manually compare and resolve the differences.
In the future, since SVN is not suited well for merging this type of file, set the svn:needs-lock property on this file, and always be sure to svn lock it before editing to keep your coworkers from making changes at the same time.
If you need simultaneous editing capabilities, look into what cloud services Microsoft offers, or switch to Google Docs or similar.

P4V Won't Sync All Files/Folders

I am rather new to P4V, so I apologize if this is obvious, but I cannot figure out a solution to my problem.
I have a depot that I have connected to just fine, and navigate to the folder that I wish to get the latest revision of. Great, no problem so far.
I right-click the folder, and select "Get Lastest Revision". Except, it doesn't. It only grabs some of the files from the folder.
Fine. So I right-click the folder, select "Get Revision", have the radio selected for "Get Latest Revision", and check the box for "Force Operation". Nothing, same behavior, missing the same files.
Tried starting P4V in admin mode. Same behavior.
A coworker suggests I go into the workspace and manually exclude and then include the missing folders/files. Same behavior. Also suggests I try reverting to the initial commit of the missing folders/files, and then updating to the newest. Same behavior, I'm only able to get the same files every time.
Okay, so time for a more extreme solution. I restart, and use p4 sync ...#none in a command prompt to remove everything. Somehow several dozen files throw the warning that they're in use even though I've just rebooted. I don't know how this is possible, so I navigate to the folder via the File Explorer and delete them all manually. I right-click the folder, and select "Get Latest Revision"... and nothing.
This is... frustrating. This should be pretty simple - I just want the entire contents of a single folder, no frills. What's even more confusing is that I had these files before, and when I did a "Get Latest Revision" they were deleted. Coworkers are able to download all of the files in that folder with no problems - it's just a problem for me. Which implies that there's an option/setting I have that's messing with things. However, considering I just installed P4V for the first time, I know I haven't messed around with any of the settings, and don't know which ones to change to make this work.
Thanks for reading, and thanks in advance for any advice.
p4 sync and force sync fails only for the files that have been opened in the workspace. In case you want to sync such files, shelve and revert them to maintain a copy or just revert them and then try to force sync again! I have faced this problem several times and this always solved my problem!

How do I force Perforce to add files to changelist?

I'm a very fresh user of Perfoce, so please be patient!
I am trying to create a commit (I understand it that in Perforce it is called a changelist) of the files which have been changed. It sort of happens automatically in other VC systems, but there seems to be no easy way of doing it in p4... The problem is (maybe) that I'm not editing the files by hand, the files are generated (please don't ask me why do I have to check in the generated files...) so the whole directory tree is getting removed and then copied over with the new files. But Perforce acts as if nothing happened. In both my workspace and the depot it displays the updated files, but when someone will check them out on another machine, the files will be of the previous version.
I'm fine with doing it either through GUI or through the command line. I'd prefer the command line, because that would spare me the trouble in the long run, but it doesn't seem like it should be much hassle either way.
In other words, let's say, this is the workflow I'm used to from SVN or Git:
Run status to see what changed.
Stage / add to commit what you want to be in the next revision.
Commit and send it to the versioning server.
What I'm not able to do is the "stage" phase - because the changes are not discovered automatically.
EDIT
Ah, I think, I figured it out: reconciliation was what I needed... well, I guess if you don't marry, this word would hardly ever happen in your vocabulary :)
It appears that the proper command is reconcile. Also, as Bryan Pendleton suggested there should be status, but I must have an older version of Perforces, which doesn't have this command. This command is also available from context menu in either depot or workspace panels of Perforce graphical interface, when you click on the modified file.

TortoiseSVN switch Branches

I have used svn for a while but recently a couple teams were added to the project. One of the teams made a new branch and has asked me to check some of their changes. I went to the directory, right click, svn->switch and chose the new branch. I went in and tried to echo something to the page I was on to see if I was working in the new branch and I wasn't. This is a little beyond what I do but with the project getting so big I need to learn this.
Based on that, my question..is there something more to this that I am not doing? After switching the working copy to this new branch how do I work on it?
The difference between checkout and switch might be adding to the confusion. I think that in your case it would be simpler to just check out the branch to a different folder since you're just doing review and it may be the most straightforward way to proceed regardless.
See this section from the Tortoise docs:
To Checkout or to Switch...
...that is (not really) the question. While a checkout downloads
everything from the desired branch in the repository to your working
directory, TortoiseSVN → Switch... only transfers the changed data to
your working copy. Good for the network load, good for your patience.
:-)
To be able to work with your freshly generated branch or tag you have
several ways to handle it. You can:
TortoiseSVN → Checkout to make a fresh checkout in an empty folder.
You can check out to any location on your local disk and you can
create as many working copies from your repository as you like.
Switch your current working copy to the newly created copy in the
repository. Again select the top level folder of your project and use
TortoiseSVN → Switch... from the context menu.
In the next dialog enter the URL of the branch you just created.
Select the Head Revision radio button and click on OK. Your working
copy is switched to the new branch/tag.
Switch works just like Update in that it never discards your local
changes. Any changes you have made to your working copy which have not
yet been committed will be merged when you do the Switch. If you do
not want this to happen then you must either commit the changes before
switching, or revert your working copy to an already-committed
revision (typically HEAD).
If you want to work on trunk and branch, but don't want the expense of
a fresh checkout, you can use Windows Explorer to make a copy of your
trunk checkout in another folder, then TortoiseSVN → Switch... that
copy to your new branch.
In the regular "Properties" dialogue (right click on Windows explorer) you have a "Subversion" tab that will tell you what URL the file or directory points to. Use that to verify that you actually switched to the correct branch.
It's also worth nothing that any non-committed local changes will still be in your working copy.
There might be a misconception about svn switch :
At first I thought that the existence of a switch command would imply that there were a "current" or a "selected" working copy for the proper functioning of SVN. Like I'm currently working on trunk, then I'm working on a branch B, hence "switching" from a working copy to another. The truth is : there is no such thing as a current working copy ! There are just many local working copies : one for the trunk, one for a branch another for a tag and so on. But none would be "implicitly selected".
As Paul Sasik quotes : switch would allow, for instance, to have only one working copy of say, the trunk, and then, merging that local working copy with a targeted branch or tag from the remote repository. switch only sync differences between local and remote, hence avoiding to do a whole check out of a solution. Past exectution of command, every further commits on the working copy will occur on the distant repository folder which's been switched to, which's been targeted. No matter what the initial check out was for that local folder.

Perforce changelist does not show any files

Using P4V 2009.2.
I have used P4Win in the past, but this is a new setup for me.
The problem is that the files I have checked out disappear from the changelists, so I cannot check them in.
To reproduce:
Check out a file, make a change to it.
Go to the 'pending changelist' tab.
There will be a + sign on the default changelist.
Click on the plus, or on the changelist line, the plus will disappear, there will be nothing in the changelist.
Try to check the file in by right-click on the file itself, the changelist dialog will show up but NO files are listed.
You can transfer the file to a new changelist, the same thing happens.
Looking at the file in the 'checked out by' window does correctly show the changelist number & description.
It sometimes happens to me, and what I normally do is change workspace and then change back again. Not sure if there is an easier way to get it to realise the files are checked out.
the only thing I can imagine is that you are looking at a different client workspace. Notice that the "Pending Changes" tab has a filter on the top, where you can separately filter for folder/files, user and workspace. Maybe the filter is set to something so that it doesn't match the client workspace where you have actually checked out the file.
Good luck,
Henrik
You may get this if the perforce server has not been upgraded. Old versions of P4D have this error: http://kb.perforce.com/article/1167/opened-files-missing-in-default-changelist
If that is not an option, use p4Win.
I agree with jhwist,sounds like your looking at a different client spec.
P4V is a bit confusing on this front, IMO and I personally prefer P4 Win but to check, open up a command prompt and type p4 changes -s pending -c YOURCLIENTSPEC - chances are that the changes you think you have aren't in your current clientspec
This can happen sometimes and in my experience it is a refresh issue with p4v. Often simply closing the pending tab or reopening p4v solves the problem.
In my case, the pending List has over 4000 files, (due to eclipse created so many files after mvn tasks) so none of them are shown. I created a different pending list, then cleared all contents, then moved the files to the new change list. Then it is appearing in the new change list.
Modify the file directly in the correctly mapped client folder (i.e. your current workspace). You will see the changelist for sure. As jhwist mentioned clear filters if any and choose your current workspace (since you may have many)

Resources