If you update your working tree to an earlier revision, then bzr revno reports the latest revision in the repository, not the revision of your working tree. bzr version-info however, reports the revision of your working tree. Why the difference?
> bzr up
M file1.txt
M file2.txt
All changes applied successfully.
Updated to revision 1000 of branch bzr+ssh://bazaar.launchpad.net/~foo/bar/baz
> bzr up -r969
M file2.txt
All changes applied successfully.
Updated to revision 969 of branch bzr+ssh://bazaar.launchpad.net/~foo/bar/baz
> bzr revno
1000
> bzr version-info
revision-id: foo#example.com-20101014072808-xo8f7r0oad9fjelaoi9
date: 2010-10-14 12:58:08 +0530
build-date: 2010-11-05 11:03:20 -0700
revno: 969
branch-nick: baz
Turns out the bzr revno command has two modes: repository and tree. You can execute bzr revno --tree to find the revision of the working tree.
Related
Basically, I've got main and UnityVersion_Testing branches. The team is all using p4v, but it's an uphill battle. Our project is on an older version of Unity, and I'd like to run the automatic upgrade by running the old project in the new engine and then push to a branch we've got in Perforce specifically for such an occasion.
What I thought I was supposed to do was run the upgrade, those files that are modified are now in a new pending changelist, I shelve those files, switch streams to UnityVersion_Testing, and then I thought I'd be able to unshelve those files there. No luck. The shelved files appear to belong to the other workspace. I then tried to unshelve the files. I can't, because they're still checked out, and I can't seem to get them into a state where they'll accept being unshelved.
How do I pull latest from main, upgrade the assets in place in the new version of Unity, and then push to our existing UnityVersion_Testing branch so that I'm in a good place to merge those changes back into main when it's passed regression testing?
You can use shelves to move pending work from one stream to another, but it's easier to use p4 switch -r.
C:\Perforce\test>p4 edit foo
//stream/main/foo#4 - opened for edit
C:\Perforce\test>echo upgrade >> foo
C:\Perforce\test>p4 switch -r test
C:\Perforce\test>p4 opened
//stream/test/foo#1 - edit default change (text)
C:\Perforce\test>p4 diff
==== //stream/test/foo#1 - c:\Perforce\test\foo ====
3a4
> upgrade
If you use shelves, it's more steps -- you need to shelve, revert, switch streams, and then unshelve (using the "-S" flag to specify that you want to map the shelf through the stream view):
C:\Perforce\test>p4 edit foo
//stream/main/foo#4 - opened for edit
C:\Perforce\test>echo upgrade >> foo
C:\Perforce\test>p4 shelve
Change 209 created with 1 open file(s).
Shelving files for change 209.
edit //stream/main/foo#4
Change 209 files shelved.
C:\Perforce\test>p4 switch test
Can't switch while files are open in a numbered changelist; 'p4 revert' files or 'p4 reopen' files into the default changelist
C:\Perforce\test>p4 revert ...
//stream/main/foo#4 - was edit, reverted
C:\Perforce\test>p4 switch test
C:\Perforce\test>p4 unshelve -S //stream/test -s 209
... //stream/test/foo - must resolve //stream/main/foo#=209 before submitting
C:\Perforce\test>p4 resolve -am
c:\Perforce\test\foo - merging //stream/main/foo#=209
Diff chunks: 0 yours + 1 theirs + 0 both + 0 conflicting
//Samwise-dvcs-1509687817/foo - copy from //stream/main/foo
C:\Perforce\test>p4 diff
==== //stream/test/foo#1 - c:\Perforce\test\foo ====
3a4
> upgrade
Another option would be to use a staging branch for the upgrade, submit the upgrade there, and then merge it to the test branch rather than moving it around as a pending changelist:
C:\Perforce\test>p4 switch
main
C:\Perforce\test>p4 switch -c upgrade
upgrade
C:\Perforce\test>p4 edit foo
//stream/upgrade/foo#1 - opened for edit
C:\Perforce\test>echo upgrade >> foo
C:\Perforce\test>p4 submit -d "Try out the upgrade on the upgrade branch"
Submitting change 207.
Locking 1 files ...
edit //stream/upgrade/foo#2
Change 207 submitted.
C:\Perforce\test>p4 switch test
C:\Perforce\test>p4 merge --from upgrade #=207
//stream/test/foo#1 - integrate from //stream/upgrade/foo#2
... must resolve content from //stream/upgrade/foo#2
C:\Perforce\test>p4 resolve -am
c:\Perforce\test\foo - merging //stream/upgrade/foo#2
Diff chunks: 0 yours + 1 theirs + 0 both + 0 conflicting
//Samwise-dvcs-1509687817/foo - copy from //stream/upgrade/foo
C:\Perforce\test>p4 diff
==== //stream/test/foo#1 - c:\Perforce\test\foo ====
3a4
> upgrade
C:\Perforce\test>p4 submit -d "Merge the upgrade to the test branch"
Submitting change 208.
Locking 4 files ...
integrate //stream/test/foo#2
Change 208 submitted.
I am trying to deploy my site to Netlify, when I try to trigger deployment, I am getting this error:
1:46:02 PM: Error checking out submodules: fatal: No url found for submodule path 'startbootstrap-grayscale' in .gitmodules
1:46:02 PM: Failing build: Failed to prepare repo
1:46:02 PM: failed during stage 'preparing repo': Error checking out submodules: fatal: No url found for submodule path 'startbootstrap-grayscale' in .gitmodules
My Folder directory is the one I want to deploy and these are the contents within that directory.
LICENSE node_modules
README.md package-lock.json
css package.json
gulpfile.js scss
img startbootstrap-grayscale
index.html vendor
js
As you can see, the error is pointing to the startbootstrap-grayscale directory.
Within that startbootstrap-grayscale directory, everything you see above is within that same directory. (Not sure what I did there to have that happen). If I cd into the 2nd startbootstrap-grayscale directory, there is nothing inside of it.
I was told that I need to git submodule add <my github name> but am not sure what else to add in order to resolve this issue.
git submodule add -f asks for more info:
usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] (--all| [--] <path>...)
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...]
or: git submodule [--quiet] summary [--cached|--files] [--su mmary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
or: git submodule [--quiet] absorbgitdirs [--] [<path>...]
Any suggestions as to what to add in order to fix this issue? Appreciate any help.
I've had a similar issue in different projects a few times before. My solution was usually to decouple the submodule and move the code into my codebase (or using a managed package for this).
To decouple the module go into your submodule folder, delete the .git folder and add the files to your git repository. On the command line I would do it like this:
// going into the submodule - might need to tweaked, depending on the exact path
cd startbootstrap-grayscale
// delete the git submodule
rm -rf .git
// going out of the directory
cd ..
// adding everything to git
git add .
With these steps (and potentially minor tweaks to the paths) I've been able to resolve this issue for me.
I was able to figure it out, I needed to get rid of my startbootstrap-grayscale folder by using rm -r startbootstrap-grayscale and pushing the changes. I had too many nested folders of the same type for some reason.
Completely nuking my git directory and then starting over with a new git commit worked for me. Not ideal but I was trying to get rid of git submodules and it didn't work. Now my site is live! https://connorleech.info/
rm -rf .git
git init
git remote add origin YOUR_URL
git add .
git commit -m 'restart history'
git push origin master
I pushed my newly initialized Ionic Apps to GitHub using the common practice:
git add .
git commit -m ""
git push origin master
But after this I went to check my Ionic project, everything was there except www folder. Can anyone tell me what went wrong?
There is a file named .gitignore, which limits the content for git
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore
*~
*.sw[mnpcod]
*.log
*.tmp
*.tmp.*
log.txt
*.sublime-project
*.sublime-workspace
.vscode/
npm-debug.log*
.idea/
.ionic/
.sourcemaps/
.sass-cache/
.tmp/
.versions/
coverage/
dist/
node_modules/
tmp/
temp/
platforms/
plugins/
plugins/android.json
plugins/ios.json
www/
$RECYCLE.BIN/
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
you could edit the file(delete www/).
git status keeps on showing eclipse resources:
naaka#naaka-ux501:~/dev/workspaces/ebeans$ git status
On branch master
Your branch is up-to-date with 'watour/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: .gitignore
modified: .gitignore~
modified: .metadata/.log
deleted: .metadata/.plugins/org.eclipse.core.resources/.projects/services/org.eclipse.jdt.core/state.dat
modified: modified: .metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps
modified: .metadata/.plugins/org.eclipse.m2e.core/nexus/05b0fe8524860bd73cbb07ef30fb34cc/segments.gen
modified: .metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/segments.gen
modified: .metadata/.plugins/org.eclipse.m2e.core/nexus/fded8792ea35992e87221e67a8dea03d/segments.gen
modified: .metadata/version.ini
i tried several versions of gitignore:
/target/
/log/
**/.project
**/.classpath
**/.metadata
**/.settings
**/.recommenders
/.project
/.classpath
/.metadata
/.settings
/.recommenders
/.gitignore~
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
I also tried removing cached data and committing
git rm --cached .metadata
but they keep coming back!
You have already added .metadata folder to version control that's why it says modified
modified: .metadata/.log
you need to remove it from version control (git) and then add it to .gitignore
rm -rf .metadata
git add .
git commit -m "Remove .metadata from version control"
Then add .metadata to .gitignore
# gitignore
.metadata/
You have to clear the cache of .gitignore file too. Try with
git rm --cached .gitignore
I'm getting the following error when performing Team-> Update from eclipse/RAD. Any idea how I can resolve this?
cvs update -l -d -P "/Boss/ejbModule/com/arch/boss/dao/BossDeviceDAO.java" "/Boss/ejbModule/com/arch/boss/dao/BossDeviceDAO.java"
U ejbModule/com/arch/boss/dao/BossDeviceDAO.java
cvs server: nonmergeable file needs merge
cvs server: revision 1.17 from repository is now in ejbModule/com/arch/boss/dao/BossDeviceDAO.java
cvs server: file from working directory is now in .#BossDeviceDAO.java.1.16
C ejbModule/com/arch/boss/dao/BossDeviceDAO.java
ok (took 0:21.461)
Error: The following warnings were reported while performing the "cvs update" command.
Error: Boss: An unmergable conflict has occurred for binary file /Boss/ejbModule/com/arch/boss/dao/BossDeviceDAO.java. Revision 1.17 has been loaded and overwritten local changes have been saved in file /Boss/ejbModule/com/arch/boss/dao/.#BossDeviceDAO.java.1.16
***
I see that in the CVS folder, the Entries file contains the entry for the file that I tried to update with version of 1.6. But in CVS repository, the latest version is 1.7. I did a compare of the source on my local and version 1.7 in the repository and see that I have the latest. So, I use notepad and manually update the entry to version 1.7 and the problem went away.