mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
Merge branch 'bugfix-149' of github.com:bcbcarl/learnGitBranching into zh-tw-2
solve the issue 149
This commit is contained in:
commit
5cd22772ac
9 changed files with 21 additions and 19 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,6 +4,7 @@ build/bundle.js
|
||||||
build/bundle.*.js
|
build/bundle.*.js
|
||||||
build/main.*.css
|
build/main.*.css
|
||||||
screens
|
screens
|
||||||
|
.DS_STORE
|
||||||
search_replace.sh
|
search_replace.sh
|
||||||
FontAwesome-Vectors.pdf
|
FontAwesome-Vectors.pdf
|
||||||
index.html
|
index.html
|
||||||
|
|
|
@ -68,10 +68,11 @@ cd learnGitBranching
|
||||||
npm install # to install all the node modules I depend on
|
npm install # to install all the node modules I depend on
|
||||||
git checkout -b newAwesomeFeature
|
git checkout -b newAwesomeFeature
|
||||||
# some changes
|
# some changes
|
||||||
grunt build # now you can open up your browser to the index.html and see your changes
|
./node_modules/grunt/bin/grunt fastBuild # to use the npm version of grunt
|
||||||
|
# after building you can open up your browser to the index.html that is generated and see your changes
|
||||||
grunt watch # will keep watch over files and fastBuild whenever they change. lot of CPU though
|
grunt watch # will keep watch over files and fastBuild whenever they change. lot of CPU though
|
||||||
# more changes
|
# more changes
|
||||||
grunt build
|
./node_modules/grunt/bin/grunt build # build runs the tests and lint as well
|
||||||
git commit -am "My new sweet feature!"
|
git commit -am "My new sweet feature!"
|
||||||
git push
|
git push
|
||||||
# go online and request a pull
|
# go online and request a pull
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt": "~0.3.17",
|
"grunt": "~0.3.17",
|
||||||
"jasmine-node": "~1.0.28",
|
"jasmine-node": "~1.11.0",
|
||||||
"grunt-browserify": "0.1.1",
|
"grunt-browserify": "0.1.1",
|
||||||
"grunt-jslint": "~0.2.2-1",
|
"grunt-jslint": "~0.2.2-1",
|
||||||
"grunt-jasmine-node": "0.0.6",
|
"grunt-jasmine-node": "0.1.0",
|
||||||
"grunt-hash": "0.2.2",
|
"grunt-hash": "0.2.2",
|
||||||
"grunt-rm": "~0.0.3",
|
"grunt-rm": "~0.0.3",
|
||||||
"grunt-shell": "0.1.4",
|
"grunt-shell": "0.1.4",
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"backbone": "~0.9.9",
|
"backbone": "~0.9.9",
|
||||||
"underscore": "~1.4.3",
|
"underscore": "~1.4.3",
|
||||||
"jquery": "~1.8.3",
|
"jquery": "~1.7.3",
|
||||||
"q": "~0.8.11",
|
"q": "~0.8.11",
|
||||||
"markdown": "~0.4.0",
|
"markdown": "~0.4.0",
|
||||||
"grunt-shell": "~0.1.4"
|
"grunt-shell": "~0.1.4"
|
||||||
|
|
|
@ -56,5 +56,11 @@ describe('Mercurial', function() {
|
||||||
'%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C2%22%2C%22id%22%3A%22master%22%7D%2C%22feature%22%3A%7B%22target%22%3A%22C4%22%2C%22id%22%3A%22feature%22%7D%2C%22debug%22%3A%7B%22target%22%3A%22C3%27%22%2C%22id%22%3A%22debug%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C4%22%3A%7B%22parents%22%3A%5B%22C3%27%22%5D%2C%22id%22%3A%22C4%22%7D%2C%22C3%27%22%3A%7B%22parents%22%3A%5B%22C2%22%5D%2C%22id%22%3A%22C3%27%22%7D%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22debug%22%2C%22id%22%3A%22HEAD%22%7D%7D'
|
'%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C2%22%2C%22id%22%3A%22master%22%7D%2C%22feature%22%3A%7B%22target%22%3A%22C4%22%2C%22id%22%3A%22feature%22%7D%2C%22debug%22%3A%7B%22target%22%3A%22C3%27%22%2C%22id%22%3A%22debug%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C4%22%3A%7B%22parents%22%3A%5B%22C3%27%22%5D%2C%22id%22%3A%22C4%22%7D%2C%22C3%27%22%3A%7B%22parents%22%3A%5B%22C2%22%5D%2C%22id%22%3A%22C3%27%22%7D%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22debug%22%2C%22id%22%3A%22HEAD%22%7D%7D'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
assert(
|
||||||
|
'grafts commits down',
|
||||||
|
'hg book foo;hg commit; hg update master; hg commit;hg graft -r C2;hg update foo; hg graft -r C3',
|
||||||
|
'%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C2%27%22%2C%22id%22%3A%22master%22%2C%22remoteTrackingBranchID%22%3Anull%7D%2C%22foo%22%3A%7B%22target%22%3A%22C3%27%22%2C%22id%22%3A%22foo%22%2C%22remoteTrackingBranchID%22%3Anull%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C3%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C3%22%7D%2C%22C2%27%22%3A%7B%22parents%22%3A%5B%22C3%22%5D%2C%22id%22%3A%22C2%27%22%7D%2C%22C3%27%22%3A%7B%22parents%22%3A%5B%22C2%22%5D%2C%22id%22%3A%22C3%27%22%7D%7D%2C%22tags%22%3A%7B%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22foo%22%2C%22id%22%3A%22HEAD%22%7D%7D'
|
||||||
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -58,14 +58,8 @@ var commandConfig = {
|
||||||
'-r'
|
'-r'
|
||||||
],
|
],
|
||||||
delegate: function(engine, command) {
|
delegate: function(engine, command) {
|
||||||
|
command.acceptNoGeneralArgs();
|
||||||
command.prependOptionR();
|
command.prependOptionR();
|
||||||
var options = command.getOptionsMap();
|
|
||||||
if (!options['-r']) {
|
|
||||||
throw new GitError({
|
|
||||||
msg: intl.str('git-error-options')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
command.setGeneralArgs(options['-r']);
|
|
||||||
return {
|
return {
|
||||||
vcs: 'git',
|
vcs: 'git',
|
||||||
name: 'cherrypick'
|
name: 'cherrypick'
|
||||||
|
@ -140,7 +134,7 @@ var commandConfig = {
|
||||||
if (options['-r']) {
|
if (options['-r']) {
|
||||||
// we specified a revision with -r but
|
// we specified a revision with -r but
|
||||||
// need to flip the order
|
// need to flip the order
|
||||||
var generalArgs = command.getGeneralArgs();
|
generalArgs = command.getGeneralArgs();
|
||||||
branchName = generalArgs[0];
|
branchName = generalArgs[0];
|
||||||
rev = options['-r'][0];
|
rev = options['-r'][0];
|
||||||
delegate.name = 'branch';
|
delegate.name = 'branch';
|
||||||
|
|
|
@ -25,7 +25,7 @@ var GRAPHICS = {
|
||||||
defaultEasing: 'easeInOut',
|
defaultEasing: 'easeInOut',
|
||||||
defaultAnimationTime: 400,
|
defaultAnimationTime: 400,
|
||||||
|
|
||||||
rectFill: 'hsb(0.8816909813322127,0.7,1)',
|
rectFill: 'hsb(0.8816909813322127,0.6,1)',
|
||||||
headRectFill: '#2831FF',
|
headRectFill: '#2831FF',
|
||||||
rectStroke: '#FFF',
|
rectStroke: '#FFF',
|
||||||
rectStrokeWidth: '3',
|
rectStrokeWidth: '3',
|
||||||
|
@ -42,7 +42,7 @@ var GRAPHICS = {
|
||||||
visBranchStrokeWidth: 2,
|
visBranchStrokeWidth: 2,
|
||||||
visBranchStrokeColorNone: '#333',
|
visBranchStrokeColorNone: '#333',
|
||||||
|
|
||||||
defaultNodeFill: 'hsba(0.5,0.8,0.7,1)',
|
defaultNodeFill: 'hsba(0.5,0.6,0.7,1)',
|
||||||
defaultNodeStrokeWidth: 2,
|
defaultNodeStrokeWidth: 2,
|
||||||
defaultNodeStroke: '#FFF',
|
defaultNodeStroke: '#FFF',
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ var TreeCompare = require('../graph/treeCompare');
|
||||||
|
|
||||||
var randomHueString = function() {
|
var randomHueString = function() {
|
||||||
var hue = Math.random();
|
var hue = Math.random();
|
||||||
var str = 'hsb(' + String(hue) + ',0.7,1)';
|
var str = 'hsb(' + String(hue) + ',0.6,1)';
|
||||||
return str;
|
return str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue