Search Results

Search found 42 results on 2 pages for 'changelist'.

Page 1/2 | 1 2  | Next Page >

  • Custom Django admin URL + changelist view for custom list filter by Tags

    - by Botondus
    In django admin I wanted to set up a custom filter by tags (tags are introduced with django-tagging) I've made the ModelAdmin for this and it used to work fine, by appending custom urlconf and modifying the changelist view. It should work with URLs like: http://127.0.0.1:8000/admin/reviews/review/only-tagged-vista/ But now I get 'invalid literal for int() with base 10: 'only-tagged-vista', error which means it keeps matching the review edit page instead of the custom filter page, and I cannot figure out why since it used to work and I can't find what change might have affected this. Any help appreciated. Relevant code: class ReviewAdmin(VersionAdmin): def changelist_view(self, request, extra_context=None, **kwargs): from django.contrib.admin.views.main import ChangeList cl = ChangeList(request, self.model, list(self.list_display), self.list_display_links, self.list_filter, self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self.list_editable, self) cl.formset = None if extra_context is None: extra_context = {} if kwargs.get('only_tagged'): tag = kwargs.get('tag') cl.result_list = cl.result_list.filter(tags__icontains=tag) extra_context['extra_filter'] = "Only tagged %s" % tag extra_context['cl'] = cl return super(ReviewAdmin, self).changelist_view(request, extra_context=extra_context) def get_urls(self): from django.conf.urls.defaults import patterns, url urls = super(ReviewAdmin, self).get_urls() def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name my_urls = patterns('', # make edit work from tagged filter list view # redirect to normal edit view url(r'^only-tagged-\w+/(?P<id>.+)/$', redirect_to, {'url': "/admin/"+self.model._meta.app_label+"/"+self.model._meta.module_name+"/%(id)s"} ), # tagged filter list view url(r'^only-tagged-(P<tag>\w+)/$', self.admin_site.admin_view(self.changelist_view), {'only_tagged':True}, name="changelist_view"), ) return my_urls + urls Edit: Original issue fixed. I now receive 'Cannot filter a query once a slice has been taken.' for line: cl.result_list = cl.result_list.filter(tags__icontains=tag) I'm not sure where this result list is sliced, before tag filter is applied. Edit2: It's because of the self.list_per_page in ChangeList declaration. However didn't find a proper solution yet. Temp fix: if kwargs.get('only_tagged'): list_per_page = 1000000 else: list_per_page = self.list_per_page cl = ChangeList(request, self.model, list(self.list_display), self.list_display_links, self.list_filter, self.date_hierarchy, self.search_fields, self.list_select_related, list_per_page, self.list_editable, self)

    Read the article

  • Reapplying changelist in perforce

    - by Niklas
    I'm rather new to perforce, but have quite a bit of other VCS experience... Imagine this: You submit changes (changelist 1) A colleague submits changes on the same branch, accidentally overwriting your changes. (changelist 2) I tried integrating (which P4V refuses to do since it's already integrated) and looked around for a way to just generate a patch that I could apply, but couldn't find anything. For now, I will check out the versions in question and use an external merge tool, but it would be great to know if perforce supports this somehow. Is there a way using the perforce tools (preferably in P4V) to reapply changelist 1?

    Read the article

  • Perforce: How do I p4 integrate a local uncommited changelist?

    - by Nocturne
    So here's my scenario: I have two projects projectA and projectB. A branchspec auto-integrates projectA to projectB. Now, I have a changelist which modifies some files in projectA -- I have not committed/submitted this changelist yet. I'd like this changelist to go into projectB only. Doing a p4 integrate -b branchspec -c changelistNumber shows "All revision(s) are integrated." How can I integrate an uncommitted changelist?

    Read the article

  • How to filter queryset in changelist_view in django admin?

    - by minder
    Let's say I have a site where Users can add Entries through admin panel. Each User has his own Category he is responsible for (each Category has an Editor assigned through ForeingKey/ManyToManyField). When User adds Entry, I limit the choices by using EntryAdmin like this: class EntryAdmin(admin.ModelAdmin): (...) def formfield_for_foreignkey(self, db_field, request, **kwargs): if db_field.name == 'category': if request.user.is_superuser: kwargs['queryset'] = Category.objects.all() else: kwargs['queryset'] = Category.objects.filter(editors=request.user) return db_field.formfield(**kwargs) return super(EntryAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs) This way I can limit the categories to which a User can add Entry and it works perfect. Now the tricky part: On the Entry changelist/action page I want to show only those Entries which belong to current User's Category. I tried to do this using this method: def changelist_view(self, request, extra_context=None): if not request.user.is_superuser: self.queryset = self.queryset.filter(editors=request.user) But I get this error: AttributeError: 'function' object has no attribute 'filter' This is strange, because I thought it should be a typical QuerySet. Basically such methods are not well documented and digging through tons of Django code is not my favourite sport. Any ideas how can I achieve my goal?

    Read the article

  • How do you search the text of changelist descriptions in Perforce?

    - by raven
    On occasion, I find myself wanting to search the text of changelist descriptions in Perforce. There doesn't appear to be a way to do this in P4V. I can do it by redirecting the output of the changes command to a file... p4 changes -l > p4changes.txt ...(the -l switch tells it to dump the full text of the changelist descriptions) and then searching the file, but this is rather cumbersome. Has anyone found a better way?

    Read the article

  • How do I know if a particular build has a particular version control change in it?

    - by carleeto
    Let's say I have a build. I need to know if a particular changelist/commit is present in that build. How would I solve this problem? I can think of a couple of possible approaches: 1) Add the changelist number into the binary so that I can look somewhere in the GUI and know what the changelist number is. I can then use this information to determine if the change I'm interested in is within that build. 2) Tag version control using some string that uniquely identifies that build. What unique string would I use? Is either of these two better? Are there any other better approaches? The solution would have to work for both Mac and Windows builds.

    Read the article

  • Diff multiple files in perforce across a revision range

    - by Thanatos
    I'd like to diff a bunch of lines across several revisions. Like, I'd like to see a.c, b.c, and c.c from changelist X to changelist Y. p4 diff2 a.c@X a.c@Y (where X & Y are changelist numbers) seems to work, but only sometimes. Specifically, if a.c is non-existent at X, I don't get a diff. I'd like to be able to get the diff (even though it'll be the whole file with only adds) anyways. To get the bigger picture: I have several files, across several commits, and I'd like to merge the diffs of these files in these commits, to basically say "this is a diff of what changed in this set of files during this set of changelists"

    Read the article

  • assign a shelved changlist in perforce?

    - by Denise
    I'm really excited about Perforce's new shelve command. They say that you should be able to "reassign" the changelist to someone else, who can then unshelve it. How do I reassign a shelved changelist? Is there a way to do it in p4v, or only at the commandline?

    Read the article

  • Simple Remote Shared Object with Red5 Flash Server

    - by John Russell
    Hello, I am trying to create a simple chat client using the red5 media server, but I seem to be having a slight hiccup. I am creating a shared object on the server side, and it seems to be creating it successfully. However, when I make changes to the object via the client (type a message), the SYNC event fires, but the content within the shared object remains empty. I suspect I am doing something wrong on the java end, any advice? Console Results: Success! Server Message: clear Server Message: [object Object] Local message: asdf Server Message: change Server Message: [object Object] Local message: fdsa Server Message: change Server Message: [object Object] Local message: fewa Server Message: change Server Message: [object Object] Server Side: package org.red5.core; import java.util.List; import org.red5.server.adapter.ApplicationAdapter; import org.red5.server.api.IConnection; import org.red5.server.api.IScope; import org.red5.server.api.service.ServiceUtils; import org.red5.server.api.so.ISharedObject; // import org.apache.commons.logging.Log; // import org.apache.commons.logging.LogFactory; public class Application extends ApplicationAdapter { private IScope appScope; // private static final Log log = LogFactory.getLog( Application.class ); /** {@inheritDoc} */ @Override public boolean connect(IConnection conn, IScope scope, Object[] params) { appScope = scope; createSharedObject(appScope, "generalChat", false); // Creates general chat shared object return true; } /** {@inheritDoc} */ @Override public void disconnect(IConnection conn, IScope scope) { super.disconnect(conn, scope); } public void updateChat(Object[] params) { ISharedObject so = getSharedObject(appScope, "generalChat"); // Declares and stores general chat data in general chat shared object so.setAttribute("point", params[0].toString()); } } Client Side: package { import flash.display.MovieClip; import flash.events.*; import flash.net.*; // This class is going to handle all data to and from from media server public class SOConnect extends MovieClip { // Variables var nc:NetConnection = null; var so:SharedObject; public function SOConnect():void { } public function connect():void { // Create a NetConnection and connect to red5 nc = new NetConnection(); nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); nc.connect("rtmp://localhost/testChat"); // Create a StoredObject for general chat so = SharedObject.getRemote("generalChat", nc.uri, false); so.connect(nc); so.addEventListener(SyncEvent.SYNC, receiveChat) } public function sendChat(msg:String) { trace ("Local message: " + msg); nc.call("updateChat", null, msg) } public function receiveChat(e:SyncEvent):void { for (var i in e.changeList) { trace ("Server Message: " + e.changeList[i].code) trace ("Server Message: " + e.changeList[i]) } } // Given result, determine successful connection private function netStatusHandler(e:NetStatusEvent):void { if (e.info.code == "NetConnection.Connect.Success") { trace("Success!"); } else { trace("Failure!\n"); trace(e.info.code); } } } }

    Read the article

  • How can I Diff a Svn Repository using SharpSvn

    - by AngeDeLaMort
    Hello, My question is quite simple and with the SharpSvn Api, it should be easy as well. Here what I did: path = "c:\project"; using (SvnLookClient client = new SvnLookClient()) { SvnLookOrigin o = new SvnLookOrigin(path); Collection<SvnChangedEventArgs> changeList; client.GetChanged(o, out changeList); // <-- Exception } and when I call the GetChanged, I get an exception: Can't open file 'c:\project\format': The system cannot find the file specified. So, Maybe there is something I'm missing? Or maybe it's not the right way to do find out the list of files and folders that were modified in the local repository? Thanks in advance.

    Read the article

  • trying to use code_swarm but Im having some python scripting problems

    - by theprojectabot
    I am having issues running this: link-mbp:codeswarm-0.1 benb$ python convert_logs/convert_logs.py -perforce-path Traceback (most recent call last): File “convert_logs/convert_logs.py”, line 408, in main() File “convert_logs/convert_logs.py”, line 350, in main files = run_marshal(’p4 -G describe -s “‘ + changelist['change'] + ‘”‘) KeyError: ‘change’ link-mbp:codeswarm-0.1 benb$ I am trying to use code_swarm from this link http://blog.perforce.com/blog/?p=780&cpage=1#comment-965 to visualize my codebase changes. if I run p4 changes everything shows correct but the code in this python script doesnt seem to process correctly... if I run p4 describe on a a changelist number it correctly reports ideas?

    Read the article

  • Updating files with a Perforce trigger before submit [migrated]

    - by phantom-99w
    I understand that this question has, in essence, already been asked, but that question did not have an unequivocal answer, so please bear with me. Background: In my company, we use Perforce submission numbers as part of our versioning. Regardless of whether this is a correct method or not, that is how things are. Currently, many developers do separate submissions for code and documentation: first the code and then the documentation to update the client-facing docs with what the new version numbers should be. I would like to streamline this process. My thoughts are as follows: create a Perforce trigger (which runs on the server side) which scans the submitted documentation files (such as .txt) for a unique term (such as #####PERFORCE##CHANGELIST##NUMBER###ROFL###LOL###WHATEVER#####) and then replaces it with the value of what the change list would be when submitted. I already know how to determine this value. What I cannot figure out, is how or where to update the files. I have already determined that using the change-content trigger (whether possible or not), which "fire[s] after changelist creation and file transfer, but prior to committing the submit to the database", is the way to go. At this point the files need to exist somewhere on the server. How do I determine the (temporary?) location of these files from within, say, a Python script so that I can update or sed to replace the placeholder value with the intended value? The online documentation for Perforce which I have found so far have not been very explicit on whether this is possible or how the mechanics of a submission at this stage would work.

    Read the article

  • IntelliJ IDEA plugin development: Get classes VirtualFile (or paths) for a specific source VirtualFi

    - by Ran Biron
    Hi all. This is a cross-post from http://www.jetbrains.net/devnet/message/5264436#5264436 - I failed to get any answer on that forum for two weeks now, so I'm re-asking it here (please don't flame). This question refers to plugin development for the IntelliJ IDEA IDE, specifically targeting java development: Is there any API to get the list of .class files for given source file? I'm trying to write a plugin that creates a binary patch jar based on a changelist. I've managed to get the changelist and, from it, a list of source files (VirtualFile). Now I'm trying to get the compiled class files for these source files (I don't mind preforming a "make" or relying on the previous compile output). I've played a bit with ProjectFileIndex but could only find the classes root. I'd hate to do a "dumb" path-based search because inner classes (and inner anonymous classes) would make it difficult to get correctly. Is there such an API? Or am I doomed to parse the paths? Thanks, Ran.

    Read the article

  • @ in p4 filename

    - by Denise
    I'd like to script p4 a little. Unfortunately, some of the filenames that we're tracking have "@" in the filename. The filenames are in the form [email protected]. If I try to do something like p4 sync a\@b.xml on a mac (or p4 sync [email protected] on windows) it gives the error: Invalid changelist/client/label/date '@b.xml' Is there another way to escape it that perforce will recognize?

    Read the article

  • Need to recover local changes overwritten by p4 revert

    - by Nayn
    Hi, I had a pending changelist in my workspace. By mistake I reverted one of the files by reverting to depot. Eclipse wiped off the local history. I am not sure if perforce keeps any history for pending changelists. Could someone tell me if it is possible to recover such file. Thanks Nayn

    Read the article

  • Is it possible to create a patch using a set of changelists?

    - by webXL
    Problem: 2 projects shared trunk and were updating some of the same files. Now one project needs to be released, so a new branch was created from a checkpoint before the projects started. I have a list of just my changelist numbers from the mainline. Using that I can generate a list changed files and diff output using a script with a series of 'p4 describe #' commands. Can I reformat that output and apply it to the new branch somehow?

    Read the article

  • Where is the -j (select job) option when using p4 submit?

    - by Marius
    When submitting changelists in Perforce I need to allocate a job. The jobs which I am supposed to associate with my changelist are not allocated to me and does not show up in the list of available jobs when I invoke "p4 submit". I know the job number which I am going to use, but can't find a way to specify it. Basically, I want to do something like: p4 submit -j But there is no -j option...

    Read the article

  • "Vidalia detected that the Tor software exited unexpectedly."

    - by Brian
    I can start and kill tor via command line, but I want to control it with Vidalia. The browser bundle works, but I'd rather not use it. This is the message log in vidalia: Sep 25 19:29:13.696 [Notice] Tor v0.2.3.22-rc (git-4a0c70a817797420) running on Linux. Sep 25 19:29:13.696 [Notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Sep 25 19:29:13.696 [Notice] Read configuration file "/home/brian/.vidalia/torrc". Sep 25 19:29:13.697 [Notice] Initialized libevent version 2.0.16-stable using method epoll (with changelist). Good. Sep 25 19:29:13.697 [Notice] Opening Socks listener on 127.0.0.1:9050 Sep 25 19:29:13.697 [Warning] /var/run/tor is not owned by this user (brian, 1000) but by debian-tor (114). Perhaps you are running Tor as the wrong user? Sep 25 19:29:13.697 [Warning] Before Tor can create a control socket in "/var/run/tor/control", the directory "/var/run/tor" needs to exist, and to be accessible only by the user account that is running Tor. (On some Unix systems, anybody who can list a socket can connect to it, so Tor is being careful.) Sep 25 19:29:13.698 [Notice] Closing partially-constructed Socks listener on 127.0.0.1:9050 Sep 25 19:29:13.698 [Warning] Failed to parse/validate config: Failed to bind one of the listener ports. Sep 25 19:29:13.698 [Error] Reading config failed--see warnings above.

    Read the article

  • Integrating different branches from external sources into a single Mercurial repository

    - by dukeofgaming
    I'm currently working in a company using Perforce and am making way for distributed version control with Mercurial. I've had success importing Perforce history using the perfarce (quite a suitable name, I laugh every time I see/say it) however, this only works with a single branch at a time. Here's how my P4 integration setup works: In perforce, create a "client", which is kind of a description of what you will be constantly updating/checking-out. This can only address one branch at a time (trunk or other). Once you do this, run hg clone p4://<server>/<client_name> Go to .hg/hgrc and put the perforce path line: perforce = p4://<server>/<client_name> Work normally with the code under mercurial, do hg pull perforce to sync up, hg push to export a changelist What I'd like to be able to do is have a perforce path per branch and have everything work in the same repository. Now, pushing is not a problem, however, if I pull the history from another branch it would end up at the default branch. I'd like to be able to do something like hg pull perforce-R5 and have it land in mercurial's R5 branch. Even if I have no merging history, it would be sweet enough to be able to preserve it. There are also other plugins for CVCSs that let you integrate mercurial, but AFAIK the subversion one has the same problem. I don't think there is a straight-through way of doing this, but as long as I could automate the process with some hooks and scripts in a single Mercurial machine, that would be good enough.

    Read the article

  • Tor Browser Failing to Load

    - by Ben
    Dec 12 22:32:25.313 [notice] Tor v0.2.3.22-rc (git-4a0c70a817797420) running on Linux. Dec 12 22:32:25.313 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Dec 12 22:32:25.313 [notice] Read configuration file "/etc/tor/torrc". Dec 12 22:32:25.319 [notice] Initialized libevent version 2.0.19-stable using method epoll (with changelist). Good. Dec 12 22:32:25.319 [notice] Opening Socks listener on 127.0.0.1:9050 Dec 12 22:32:25.319 [warn] Could not bind to 127.0.0.1:9050: Address already in use. Is Tor already running? Dec 12 22:32:25.319 [warn] Failed to parse/validate config: Failed to bind one of the listener ports. Dec 12 22:32:25.319 [err] Reading config failed--see warnings above. I've tried reinstalling it and I always get this error after powering off and back on, despite it working fine directly after the install...

    Read the article

  • How to install Tor (Web Browser) in Ubuntu 12.10?

    - by Zignd
    I would like to install the Tor, but I'm having some problems. I know that someone will say "This question is a exactly duplication of How to install tor?", but it's not, because the another question can not be applied to Ubuntu 12.10 as the deb command is not available anymore. I did a research and even at the Tor's Official Website the available resource can not be applied to Ubuntu 12.10. I tried to use the deb command (as the above question says: deb http://deb.torproject.org/torproject.org <DISTRIBUTION> main) and the Terminal says deb: command not found and when I try to install it says E: Unable to locate package deb. I've also tried to use the ppa: ubun-tor, but it's not compatible with Quantal Quetzal, because it's too old. I've also tried to use sudo apt-get install tor, but browser icon don't shows up after installation and if you try to use the command tor in the Terminal I get the following error message: Nov 26 10:59:25.731 [notice] Tor v0.2.3.22-rc (git-4a0c70a817797420) running on Linux. Nov 26 10:59:25.731 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Nov 26 10:59:25.731 [notice] Read configuration file "/etc/tor/torrc". Nov 26 10:59:25.737 [notice] Initialized libevent version 2.0.19-stable using method epoll (with changelist). Good. Nov 26 10:59:25.737 [notice] Opening Socks listener on 127.0.0.1:9050 Nov 26 10:59:25.737 [warn] Could not bind to 127.0.0.1:9050: Address already in use. Is Tor already running? Nov 26 10:59:25.737 [warn] Failed to parse/validate config: Failed to bind one of the listener ports. Nov 26 10:59:25.737 [err] Reading config failed--see warnings above. Thanks in advance.

    Read the article

  • Problems with calendar application on Android 2.1

    - by Rick
    Hi, I have compiled the android 2.1 source code and I can start the emulator. But I can't launch calendar application. Every time I tried to lauch the calendar application, it crashed. The log is as following: // CRASH: com.android.calendar (pid 272) // Short Msg: java.lang.NullPointerException // Long Msg: java.lang.NullPointerException // Build Label: android:generic/generic/generic/:2.1-update1/ERE27/eng.root.20100317.113135:eng/test-keys // Build Changelist: -1 // Build Time: 1268798948 // ID: // Tag: AndroidRuntime // java.lang.NullPointerException: // at com.android.providers.calendar.CalendarSyncAdapter.onAccountsChanged(CalendarSyncAdapter.java:1400) // at android.content.AbstractSyncableContentProvider$1.onAccountsUpdated(AbstractSyncableContentProvider.java:189) // at android.accounts.AccountManager$10.run(AccountManager.java:826) // at android.os.Handler.handleCallback(Handler.java:587) // at android.os.Handler.dispatchMessage(Handler.java:92) // at android.os.Looper.loop(Looper.java:123) // at android.app.ActivityThread.main(ActivityThread.java:4363) // at java.lang.reflect.Method.invokeNative(Method.java:-2) // at java.lang.reflect.Method.invoke(Method.java:521) // at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) // at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) // at dalvik.system.NativeStart.main(NativeStart.java:-2) has anyone met this problem, or any suggestions on how to fix it? Thanks very much!! Rick

    Read the article

1 2  | Next Page >