mercurial

How to view diff between head of local repository and head of remote repository?

青春壹個敷衍的年華 提交于 2019-12-20 12:14:07
问题 Before I push to a remote repository, I want to see a consolidated diff between the head of my local repository and the head of the repository I'm pushing too. The best way I know of doing this is to hg clone the remote repository, get the revision of the head, then do a diff between my head and that revision. But this is time-consuming. Is there a quick way? 回答1: In addition to $ hg outgoing -p which I normally use, I'll like to point you to revision sets. That is a query language that you

Pre Commit Hook for JSLint in Mercurial and Git

久未见 提交于 2019-12-20 11:48:19
问题 I want to run JSLint before a commit into either a Mercurial or Git repo is done. I want this as an automatic step that is set up instead of relying on the developer (mainly me) remembering to run JSLint before-hand. I normally run JSLint while developing, but want to specify a contract on JS files that they pass JSLint before being committed to the repo. For Mercurial, this page spells out the precommit syntax, but the only variables that seem to be available are the parent1 and parent2

Mercurial: Why do I get a 404 error when pushing to a repository whose URL I can hit in a browser?

微笑、不失礼 提交于 2019-12-20 11:36:50
问题 I have a Mercurial repository that I can see just fine if I navigate to it in a browser, but when I try to do a push, with my default path set to the same URL that I visit in the browser, I get this: abort: HTTP Error 404: Not Found Should the URL that I push to be different in some way? 回答1: Is this similar to this configuration, where hgweb.config need to be configured properly: / = /home/my_username/hg/** (with the two stars at then end) Or is it a http vs. https issue? For https, you need

Does Mercurial have an equivalent to git clean?

旧巷老猫 提交于 2019-12-20 10:59:36
问题 hg clean does not seem to exist, which kinda bothers me. Is this a feature that Mercurial doesn't have or did they just name it differently? 回答1: There is no equivalent to git clean in the core Mercurial package. However, the hg purge extension does what you are after. There is an open issue to make this extension part of the core package. 回答2: The extension is already included in mercurial, but you still have to activate it. It's as simple as creating a .hgrc file in your home directory (e.g

Hosting Mercurial HG via VisualSVN Server

旧街凉风 提交于 2019-12-20 10:54:30
问题 I have tried to host a Mercurial HG repository using a Scriptalias. ScriptAlias /hg/ "htdocs/hgwebdir.cgi" If I go to Chrome it display the contents of the cgi file. In IE it does render however images and links are not displayed. In either case the repository I want to display is not shown. Has anyone managed to get this working with VisualSVN? Also will this work if I have windows authentication and https? 回答1: Here's a alternative setup using mod_wsgi (fast!), combined repository directory

Set up a mercurial server on ubuntu

帅比萌擦擦* 提交于 2019-12-20 10:52:13
问题 I am new to mercurial. Here the question is basic, but I am very confused after googling. I am programming individually, I have my mercurial installed on local machine (ubuntu 11.04), it is working well. Now I would like to keep a repository on a server, such that I can push and pull whenever good for me. I would like to use SSH and prefer not using any web servers. Is it possible? I have installed the mercurial-server on the server, but what is next? How to setup a remote repository and how

hg equivalent of git notes

痞子三分冷 提交于 2019-12-20 10:44:52
问题 Is there a command in mercurial, that works like git notes? 回答1: Not that I know of: I do not think Hg has yet a special kind of object to associate to commit message. Introduced in July 2007, "git notes" by Johannes Schindelin, notes are: Commit notes are blobs which are shown together with the commit message. These blobs are taken from the notes ref, which you can configure by the config variable core.notesRef , which in turn can be overridden by the environment variable GIT_NOTES_REF . The

Is there a Git command to import a hg repository

て烟熏妆下的殇ゞ 提交于 2019-12-20 10:27:24
问题 With git svn clone I can work on a subversion repository using git. Is there a similar way to work on Mercurial (hg) repositories? 回答1: There isn't anything built in. You can use git-hg however, which I use a lot and works great for pulling hg repos and updates to a git repo, but the downside of it is that you cannot push updates made to your git repo to a hg repo with git-hg . 回答2: The Mercurial extension hg-git is another way to go in the Hg->Git direction. If you just want to go in that

In mercurial, how do I apply a reverse-patch to a particular file?

痞子三分冷 提交于 2019-12-20 10:26:53
问题 Related to Mercurial: Merging one file between branches in one repo , I'm trying to perform a backout operation on a single file, even though that file was one of many participants in the revision being backed out. HG being the changeset-oriented tool that it is, it doesn't want to operate on files. Closest I could find was to use hg export to create a diff, hand-edit the diff, and then hg import to patch the file in reverse order. ..but then I hit this annoying situation where http://hgbook

In mercurial, how do I apply a reverse-patch to a particular file?

拥有回忆 提交于 2019-12-20 10:26:03
问题 Related to Mercurial: Merging one file between branches in one repo , I'm trying to perform a backout operation on a single file, even though that file was one of many participants in the revision being backed out. HG being the changeset-oriented tool that it is, it doesn't want to operate on files. Closest I could find was to use hg export to create a diff, hand-edit the diff, and then hg import to patch the file in reverse order. ..but then I hit this annoying situation where http://hgbook