shelve

Can I unshelve to a different branch in tfs 2008?

心已入冬 提交于 2019-12-29 02:19:12
问题 Let's assume that some developer in my team shelved his changes that he did in branch A. And I am working on branch B. Can I unshelve his changes into branch B? (By GUI or command prompt) 回答1: The Visual Studio Power Tools should let you do this. C:\src\2\Merlin\Main>tfpt unshelve /? tfpt unshelve - Unshelve into workspace with pending changes Allows a shelveset to be unshelved into a workspace with pending changes. Merges content between local and shelved changes. Allows migration of shelved

Can I unshelve to a different branch in tfs 2008?

懵懂的女人 提交于 2019-12-29 02:19:06
问题 Let's assume that some developer in my team shelved his changes that he did in branch A. And I am working on branch B. Can I unshelve his changes into branch B? (By GUI or command prompt) 回答1: The Visual Studio Power Tools should let you do this. C:\src\2\Merlin\Main>tfpt unshelve /? tfpt unshelve - Unshelve into workspace with pending changes Allows a shelveset to be unshelved into a workspace with pending changes. Merges content between local and shelved changes. Allows migration of shelved

Easiest way to add a function to existing class

筅森魡賤 提交于 2019-12-23 12:31:14
问题 I'm using the python's built-in shelve module to manage some simple dictionaries. The problem I'm having is I want to use with shelve.open(filename) as f: , but when I try it claims DbfilenameShelf has no attribute __exit__ . So, I'm guessing the easiest way to do this is to wrap it in another class and add an __exit__ function to that wrapper. I tried this: class Wrapper(shelve.DbfilenameShelf): def __exit__(self): self.close() def __init__(self, filename, writeback=False): shelve

Accessing Dictionaries VS Accessing Shelves

冷暖自知 提交于 2019-12-23 03:19:05
问题 Currently, I have a dictionary that has a number as the key and a Class as a value. I can access the attributes of that Class like so: dictionary[str(instantiated_class_id_number)].attribute1 Due to memory issues, I want to use the shelve module. I am wondering if doing so is plausible. Does a shelve dictionary act the exact same as a standard dictionary? If not, how does it differ? 回答1: Shelve doesn't act extactly the same as dictionary, notably when modifying objects that are already in the

Shelve module in python not working: “db type cannot be determined”

元气小坏坏 提交于 2019-12-22 05:32:01
问题 I am trying to make a simple password-storing program in Python, and it seems pretty simple so I am wondering if I am using shelve wrong. I have the main .py file: import shelve passwords = shelve.open('./passwords_dict.py') choice = raw_input("Add password (a) or choose site (c)?") if choice[0] == 'a': site_key = raw_input("Add for which site? ").lower() userpass = raw_input("Add any info such as username, email, or passwords: ") passwords[site_key] = userpass else: site = raw_input("Which

Shelve is too slow for large dictionaries, what can I do to improve performance?

半城伤御伤魂 提交于 2019-12-18 11:40:06
问题 I am storing a table using python and I need persistence. Essentially I am storing the table as a dictionary string to numbers. And the whole is stored with shelve self.DB=shelve.open("%s%sMoleculeLibrary.shelve"%(directory,os.sep),writeback=True) I use writeback to True as I found the system tends to be unstable if I don't. After the computations the system needs to close the database, and store it back. Now the database (the table) is about 540MB, and it is taking ages. The time exploded

What is Shelving in TFS?

瘦欲@ 提交于 2019-12-17 10:07:13
问题 Is shelving in TFS merely a soft checkin so other team members can see the source code? i.e. the shelved code will not be compiled right? 回答1: Shelving has many uses. The main ones are: Context Switching : Saving the work on your current task so you can switch to another high priority task. Say you're working on a new feature, minding your own business, when your boss runs in and says "Ahhh! Bug Bug Bug!" and you have to drop your current changes on the feature and go fix the bug. You can

hg unshelve seems to have no effect?

妖精的绣舞 提交于 2019-12-13 11:52:37
问题 Our team is just getting started with Mercurial. One of the first things we've started to play with is hg shelve . Locally, I have no problem shelving changes. It all works perfectly from what I can tell. However, when I try to unshelve, I get the restoring backup files message, but when I run hg diff , there are no changes, and my changes are missing from the code. If i do hg unshelve -i I can see the diff, but again, trying to unshelve seems to have no effect. I've been trying to test it

Optimizing reads & writes in a shelve object to scale up for larger dataset

时间秒杀一切 提交于 2019-12-13 03:00:37
问题 Context : I'm generating synthetic data in python that I will then store as a shelve object. On top of this, I build my scoring model using Individual scoring PER category, Frequency item set mining & collaborative filtering - in the later two I need to be able to scan through similar categories of OTHER users, beside this one. This is why I choose to use a dict data-structure, so that the access to faster. Please point me if you see a better data-structure for this usecase . My key idea is -

How do I take integer keys in shelve?

亡梦爱人 提交于 2019-12-12 17:05:08
问题 I want to store an integer key in shelve. But when I try to store integer key in shelve it give me an error Traceback (most recent call last): File "./write.py", line 12, in data[id] = {"Id": id, "Name": name} File "/usr/lib/python2.5/shelve.py", line 124, in __setitem__ self.dict[key] = f.getvalue() File "/usr/lib/python2.5/bsddb/__init__.py", line 230, in __setitem__ _DeadlockWrap(wrapF) # self.db[key] = value File "/usr/lib/python2.5/bsddb/dbutils.py", line 62, in DeadlockWrap return