commit

Why does this PostgreSQL transaction give “WARNING: there is no transaction in progress”

ε祈祈猫儿з 提交于 2019-12-02 01:16:50
I am running the transaction queries in code like this (simplified): try { runQuery("begin"); runQuery("some query ..."); runQuery("some other query ..."); runQuery("some more query ..."); runQuery("some extra query ..."); runQuery("commit"); } catch (e){ runQuery("rollback"); } Here is the list of statements from the postgres log file. Notice that first begin / commit works fine and the second commit gives the error mentioned in the subject: 2015-02-18 20:19:17 UTC [6459-7] vdsr@sails LOG: statement: begin 2015-02-18 20:19:17 UTC [6459-8] vdsr@sails LOG: execute <unnamed>: INSERT INTO "groups

how to list all pull request with count of files changed

拜拜、爱过 提交于 2019-12-02 00:35:27
I am looking for some command which tells me number of files committed in a single pull request. I would like to know count of files in a single pull request individual from beginning. Question explained in real life scenario: Let's say for some myProject someone raised a pull request number 100 which has changes in 15 files. I am looking for a command which list all pull request from 1 to 100 with count of changed files. Please answer wrto Windows 7. i.e. PR Number 100 has changes in 10 files PR Number 99 has changes in 5 files PR Number 98 has changes in 6 files PR Number 96 has changes in

postgresql: \\copy method enter valid entries and discard exceptions

我与影子孤独终老i 提交于 2019-12-02 00:16:20
When entering the following command: \copy mmcompany from '<path>/mmcompany.txt' delimiter ',' csv; I get the following error: ERROR: duplicate key value violates unique constraint "mmcompany_phonenumber_key" I understand why it's happening, but how do I execute the command in a way that valid entries will be inserted and ones that create an error will be discarded? Craig Ringer The reason PostgreSQL doesn't do this is related to how it implements constraints and validation. When a constraint fails it causes a transaction abort. The transaction is in an unclean state and cannot be resumed. It

How to commit & push selected files but not all in Git

一个人想着一个人 提交于 2019-12-01 23:44:37
问题 I have a git repo with two branches: develop and master . I work mostly at develop and when files are ready (sometimes not so sticky to this affirmation) I merge them to master branch to put them on production. Take a look to this pic: All that files comes from develop branch and was merged but I only want to commit and push RepresentativeRestController.php but any time I do right click => commit all of them are included on the commit. How I get rid, temporary since they will be added later,

Java more than one DB connection in UserTransaction

我的梦境 提交于 2019-12-01 23:05:41
static void clean() throws Exception { final UserTransaction tx = InitialContext.doLookup("UserTransaction"); tx.begin(); try { final DataSource ds = InitialContext.doLookup(Databases.ADMIN); Connection connection1 = ds.getConnection(); Connection connection2 = ds.getConnection(); PreparedStatement st1 = connection1.prepareStatement("XXX delete records XXX"); // delete data PreparedStatement st2 = connection2.prepareStatement("XXX insert records XXX"); // insert new data that is same primary as deleted data above st1.executeUpdate(); st1.close(); connection1.close(); st2.executeUpdate(); st2

How to commit & push selected files but not all in Git

左心房为你撑大大i 提交于 2019-12-01 21:20:14
I have a git repo with two branches: develop and master . I work mostly at develop and when files are ready (sometimes not so sticky to this affirmation) I merge them to master branch to put them on production. Take a look to this pic: All that files comes from develop branch and was merged but I only want to commit and push RepresentativeRestController.php but any time I do right click => commit all of them are included on the commit. How I get rid, temporary since they will be added later, of the ones I don't want to be included on the commit? I use Smartgit as a GUI client for Bitbucket

svn doesn't commit .o files, but why?

不羁的心 提交于 2019-12-01 20:36:47
问题 I found that svn doesn't commit my .o files by default. I've checked dir attributes - no any .o specific rules was found. Is there a list of files that svn do not commit by default, as .o? 回答1: Look at global-ignores in your configuration file. The standard location of this file on a *nix system will be ~/.subversion/config . 回答2: SVN only commits the files that you svn add first. If you did not run svn add on an *.o file (and this is usually the case because you would svn add the source

Grouping committed files together (as a single commit) after you've already committed them to the repository in Svn?

夙愿已清 提交于 2019-12-01 20:19:37
Is it possible to group a number of committed files together (as a single commit) after you've already committed them to the repository in Svn? It seems I always forget a file or two after I've committed a bunch them (when not using subeclipse) and I was just wondering if anyone knew if this was possible or not. I find the best solution to use a higher level tool to group revisions together and track changes. We use redmine to document all tasks, and our svn revisions are automatically stamped against that. Working this way, even though a fix may take 7 or 8 commits, you can quickly search

svn doesn't commit .o files, but why?

心已入冬 提交于 2019-12-01 19:13:15
I found that svn doesn't commit my .o files by default. I've checked dir attributes - no any .o specific rules was found. Is there a list of files that svn do not commit by default, as .o? Look at global-ignores in your configuration file. The standard location of this file on a *nix system will be ~/.subversion/config . SVN only commits the files that you svn add first. If you did not run svn add on an *.o file (and this is usually the case because you would svn add the source files before the project is built) then it will be ignored. 来源: https://stackoverflow.com/questions/6502776/svn

How to remove deleted files from git?

試著忘記壹切 提交于 2019-12-01 18:54:59
I have committed and pushed a too large file in bitbucket, and I've deleted it locally, committed and pushed again. But on the site bitbucket the size of the repository is still too large. Sounds like you created a new commit where you deleted the file. That means the file still exists in the previous commit. What you need to do is rewriting history . Assuming the two newest commits are deleting and adding that file, you can do the following: git reset --hard HEAD~2 git push --force This will remove the two newest commits and then forcefully push it to bitbucket. In case that doesn't help